Hi, I am using nrf51822 (128k). Softdevice 6.0 (s110), SDK 5.2. How can I send an empty notification packet (data length 0) to master device? If I send a packet with data length 0, nrf51822 reset...
Thank you.
Hi, I am using nrf51822 (128k). Softdevice 6.0 (s110), SDK 5.2. How can I send an empty notification packet (data length 0) to master device? If I send a packet with data length 0, nrf51822 reset...
Thank you.
Hi
I think it would be better not to send any notification instead of trying to send an empty nofification, or why would you want to send an empty packet? The way BLE works is that empty packets (i.e. with no payload data) are sent periodically between central and peripheral when they are connected and you are not sending data. How frequently that happens is determined by the connection interval that you specify in your code.
Perhaps the softdevice does not accept payload with length 0 so it throws an error which is captured by the app_error_handler, usually implemented at the top of the main file of any BLE example in the nRF51 SDK. By default, the app_error_handler will make the device reset but you could uncomment ble_debug_assert_handler and put a breakpoint there to see the error_code and where in the code it was generated.