This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

0x3401 error in NUS peripheral and central

Hello, I'm using NRF52832 with SoftDevice S132, and SDK 14.0.0 to make NUS peripheral and central. To test it I have one NUS peripheral device, that echoes incoming data, one NUS peripheral and central device that forwards incoming data, and nrf51 dongle with nRF Connect to test it. I use dongle to connect to peripheral/central device. Peripheral/central device connects to periheral only device. I send data with nRF Connect to peripheral/central device, it sends it to peripheral device, periheral sends it back to peripheral/central, and this one should forward it to nRF Connect. Problem is when peripheral/central gets data back from peripheral and tries to to send it to nRF Connect. Function sd_ble_gatts_hvx() returns 0x3401 code. Using sd_ble_gatts_value_set() does not help. For debugging I made peripheral/central to send back to nRF connect some dummy data before forwarding received data. As long as peipheral was not connected to peripheral/central, dummy data was send back properly. Only after connection between peripheral and peripheral/central is established, 0x3401 is happening. To make this program I used SDK example for NUS central, SDK example for NUS peripheral and SDK example for central and peripheral hrs/rscs relay.


Apparently problem exists only if periheral connects to peripheral/central after nRF Connect connects to to peripheral/central. If nRF connects second, everything works fine.

Parents Reply Children
No Data
Related