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.

  • Hello,

    EarlBread said:
    Out of range will be happen randomly depend on customer.

    Sure, but how important is it that data is not lost, for example?
    This will narrow down which error handling for the NRF_ERROR_RESOURCES error you may implement.
    For example, if there is a unexpected overflow of packets due to poor signal strength, should the data be buffered separately - awaiting future transfer - or should you instead discard the data because it is no longer relevant? Keep in mind that I do not know anything about your application, so I also do not know anything about its requirements.

    EarlBread said:
    If I use internal pullup resistor for GPIO pin,  I don't need to use the external pull up resistor?

    This is correct. The value of the internal pullup and pulldown resistance is typically 13 k Ohm.

    EarlBread said:

    I found little bit difference result without extend buffer and any action.

    I didn't have NRF_ERROR_RESOURCES any more. What can I do?

    EarlBread said:
    I just delete checking function as followings

    Are you saying that you are no longer receiving the error after having deleted the error checking function?
    That sounds to me like you are very much still receiving the error, but you have masked it so that it goes unseen.
    I can not recommend this at all, since you will have no way to know whether your notifications are ever successfully queued for transfer, or anything else unexpectedly has happened.
    If you wish to just discard the data that you unsuccessfully attempted to queue you should instead add a check for NRF_ERROR_RESOURCE to the block of error codes which are not sent to the APP_ERROR_CHECK. Note that this will discard the failed notification.

    Best regards,
    Karl

Related