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

NRF_ERROR_RESOURCES occurred when the connection is disconnected

Dear

First of all, I am so sorry because of my english skill.

I got NRF_ERROR_RESOURCES when the connection between NRF Module and mobile device is disconnected  due to the reduced signal strength because of long distance.

However, if I disconnect the connection by sending the disconnection command from mobile device, it works well without any errors.

I used app_timer_start api to send data for notification every 1s as following,

err_code = app_timer_start(m_bms_measurement1_timer_id, BMS_MEASUREMENT1_TIMER_INTERVAL, NULL);
APP_ERROR_CHECK(err_code);

I already set NRF_SDH_BLE_GAP_EVENT_LENGTH as 100 and used BLE_GATTS_EVT_HVN_TX_COMPLETE.

But I had same result as before.

Thanks in advance.

Parents
  • Hello,

    I have no any error message during connection and notification and disconnect command from mobile. I just had NRF_ERROR_RESOURCES due to disconnection with weak signal because of long distance.

    I set the break point at BLE_GAP_EVT_DISCONNECTED on ble_evt_handler. but NRF_ERROR_RESOURCES occurred more faster than BLE_GAP_EVT_DISCONNECTED. Therefore, I counldn't to reach at BLE_GAP_EVT_DISCONNECTED.

    How can I get the value of the HVN_COMPLETE event's count? 

    I am not  familiar with the nRF Sniffer tool

    Thanks.

  • EarlBread said:
    I have no any error message during connection and notification and disconnect command from mobile. I just had NRF_ERROR_RESOURCES due to disconnection with weak signal because of long distance.

    Aha, I understand.
    How often does the device go out of range, and how important is it that no data is lost?
    You could for example implement error handling that buffers the data that was not queued with the sd_ble_gatts_hvx call, and instead retries to queue it once a _HVN_TX_COMPLETE event is received, or similar. How would this fit with your applications requirements and constraints?

    EarlBread said:
    How can I get the value of the HVN_COMPLETE event's count? 

    The count can be read from the HVN_TX_COMPLETE event received after a successful notification transmission.

    EarlBread said:
    I am not  familiar with the nRF Sniffer tool

    I highly recommend familiarizing with this tool. It might not be necessary for the exact issue we are working with right now - since the conditions for it seems so clear at the moment - but it will definitively be useful for future debugging.

    Best regards,
    Karl

Reply
  • EarlBread said:
    I have no any error message during connection and notification and disconnect command from mobile. I just had NRF_ERROR_RESOURCES due to disconnection with weak signal because of long distance.

    Aha, I understand.
    How often does the device go out of range, and how important is it that no data is lost?
    You could for example implement error handling that buffers the data that was not queued with the sd_ble_gatts_hvx call, and instead retries to queue it once a _HVN_TX_COMPLETE event is received, or similar. How would this fit with your applications requirements and constraints?

    EarlBread said:
    How can I get the value of the HVN_COMPLETE event's count? 

    The count can be read from the HVN_TX_COMPLETE event received after a successful notification transmission.

    EarlBread said:
    I am not  familiar with the nRF Sniffer tool

    I highly recommend familiarizing with this tool. It might not be necessary for the exact issue we are working with right now - since the conditions for it seems so clear at the moment - but it will definitively be useful for future debugging.

    Best regards,
    Karl

Children
No Data
Related