nrf5340 nus_cb does not work in peripheral_uart example

I have sdk 2.1.0 and nrf5340, trying to run peripheral_uart sample connecting nrf5340 to a module via uart. The program seems working when only works with nrf5340 based on the test instruction here https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html but while is connected to the bluetooth module via uart, bt_receive_cb prints the buffer in RRT console but nuc_cb (ble_write_thread) does not print anything to RTT console. It does not work with nrf connect app on my mobile phone: sending from mobile is okay but cant receive anything from uart_cb. 

Parents Reply
  • Hi Atilla, 
    From what you described I can only point to the issue in UART communication between your board and the module. 
    In ble_write_thread() the thread would read from UART buffer and then send it over to BLE. You may want to debug there and see why there was no data in UART buffer. What data do you send from the module to the nRF5340 ? 
    You may also want to put some log in uart_cb() and check if the function is called at all. You can start by try sending some dummy data on UART (directly to UART without BLE) to see if you receive 
    UART_TX_DONE call back or not. 

Children
Related