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 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.

    Exactly which function returns this error?
    Could you also confirm that you have DEBUG defined in your preprocessor defines, like shown in the included image?

    This will make a the logger output a detailed error message whenever a non-NRF_SUCCESS error is passed to an APP_ERROR_CHECK.

    I already set NRF_SDH_BLE_GAP_EVENT_LENGTH as 100 and used BLE_GATTS_EVT_HVN_TX_COMPLETE.

    Could you elaborate on what you mean when you say that you already use BLE_GATTS_EVT_HVN_TX_COMPLETE? What do you do when this event is generated?

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

    What is your connection interval, and what is your hvn_tx_queue_size? I suppose what might be happening here is that packets does not make it across the link due to the increasing distance, and thus the hvn buffer is filled, so when the next notification then is attempted queued it will return with the NRF_ERROR_RESOURCES.
    To rectify this we could either balance your connection interval, supervision timeout and hvn buffer so this can not happen, or we could implement a local error handling for the NRF_ERROR_RESOURCE right after it is returned.

    Best regards,
    Karl

Reply
  • Hello,

    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.

    Exactly which function returns this error?
    Could you also confirm that you have DEBUG defined in your preprocessor defines, like shown in the included image?

    This will make a the logger output a detailed error message whenever a non-NRF_SUCCESS error is passed to an APP_ERROR_CHECK.

    I already set NRF_SDH_BLE_GAP_EVENT_LENGTH as 100 and used BLE_GATTS_EVT_HVN_TX_COMPLETE.

    Could you elaborate on what you mean when you say that you already use BLE_GATTS_EVT_HVN_TX_COMPLETE? What do you do when this event is generated?

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

    What is your connection interval, and what is your hvn_tx_queue_size? I suppose what might be happening here is that packets does not make it across the link due to the increasing distance, and thus the hvn buffer is filled, so when the next notification then is attempted queued it will return with the NRF_ERROR_RESOURCES.
    To rectify this we could either balance your connection interval, supervision timeout and hvn buffer so this can not happen, or we could implement a local error handling for the NRF_ERROR_RESOURCE right after it is returned.

    Best regards,
    Karl

Children
No Data
Related