This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ble periheral uart

Hi,

On the nRF5340-DK, i'm succesfuly using the example code:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html

..now i would like to alter some..

in the    void ble_write_thread(void), 

I would like just to send some test data  (using the bt_nus_send()  ),  So not using the fifo_rx_data.

Therefore  i would like, NOT use the waiting for   uart data :    ( struct uart_data_t *buf = k_fifo_get(&fifo_uart_rx_data,  K_FOREVER); )

Directly using    bt_nus_send()  is not OK.
it is necessary to have in the nRF-connect app,  to enable the notify of the TX-Characteristic.
So i must DETECT the Enabled Tx Charateristic first, after that i can use the    bt_nus_send()
The question:  How to dectect (within this periheral uart code)    that the    TX-Characteristic is enabled ??
Best Regards,
Theo
NOTE: Using the uart..  , in the nRF-connect app you first have to enable the TX-Characteristic, then you fill in some data, then the     fifo_rx_data  becomes filled, therfore in this case   bt_nus_send()  works.

Parents
  • Hi,

    Thanks Edvin.

    For now i did 'bypass' the problem, by sending a own command/data (Via the RX-charactaristic)) to set an EnableFlag to start the sending of Data via the TX-Charateristic.

    Im very happy with you answer, i wil look into it in more detail later.

    Manny thanks Edvin,

    Best Regards,

    Theo 

Reply
  • Hi,

    Thanks Edvin.

    For now i did 'bypass' the problem, by sending a own command/data (Via the RX-charactaristic)) to set an EnableFlag to start the sending of Data via the TX-Charateristic.

    Im very happy with you answer, i wil look into it in more detail later.

    Manny thanks Edvin,

    Best Regards,

    Theo 

Children
No Data
Related