Hi,
I'm using nrf52840 to connect a mobile device via BLE.
I've noticed that when a lot of messages are sent, a disconnection occurs with reason code of NRF_ERROR_RESOURCES.
Can you please help me?
Thanks!
Hi,
I'm using nrf52840 to connect a mobile device via BLE.
I've noticed that when a lot of messages are sent, a disconnection occurs with reason code of NRF_ERROR_RESOURCES.
Can you please help me?
Thanks!
Hi,
NRF_ERROR_RESOURCES simply means that the softdevice have already buffered all notification in can hold, so you need to wait until BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry.
Best regards,
Kenneth
Hi,
Just to clarify - NRF_ERROR_RESOURCES is received as an error code for disconnections. Do you think I need to try waiting for BLE_GATTS_EVT_HVN_TX_COMPLETE?
Thanks!
If the link have disconnected, then simply ignore the error code, and wait until next connection seems like a reasonable solution.
Kenneth
Sorry, I'm not sure I understand.
How can I prevent the disconnection? Can I increase buffer size?
Thanks
Re-reading the case I think I may have misunderstood.
Can you tell me the disconnect reason on BLE_GAP_EVT_DISCONNECTED event?
It should be possible to read this by:
p_ble_evt->evt.gap_evt.params.disconnected.reason
The available disconnect reasons are listed in ble_hci.h, there is no disconnect reason NRF_ERROR_RESOURCES.