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

BSD error codes

extern void bsd_recoverable_error_handler(uint32_t error)

AND

extern void bsd_irrecoverable_error_handler(uint32_t error);

Will return various error codes - is there a list to decipher what they mean? Especially error code 3 seems frequent...
Parents
  • Hi,

     

    Will return various error codes - is there a list to decipher what they mean? Especially error code 3 seems frequent...

    The error codes coming from bsdlib is unfortunately not documented yet, as we are expecting these to change in the future, but this is on the "todo" list internally, along with more documentation in general for bsdlib. What is more important is to see which handler is called. recoverable error is for instance if your link is lost or connection is disrupted in any way, while the irrecoverable one will require a reset.

    If you see this error frequently, I suspect it is due to this errata:

    https://infocenter.nordicsemi.com/topic/errata_nRF9160_EngA/ERR/nRF9160/EngineeringA/latest/anomaly_160_17.html?cp=2_0_1_0_1_10

    Could you try to implement this workaround and see if it has any effect on your debugging experience?

     

    Kind regards,

    Håkon

  • Haakon,

    Thanks for your reply. The fix for the referenced errata is applied. Still there are occurrences of the error (Especially 3).

    1. I find that usually it is the recoverable error that is thrown. However - I find it that the link is not really recoverable. Meaning socket operations to the modem will never return. Alas - I do not know error code 3 - so hard to tell what is actually going on.

    2. Is there any steps required when recovering from recoverable error handler through any of the API calls in bsdlib?

  • vkbakken said:
    1. I find that usually it is the recoverable error that is thrown. However - I find it that the link is not really recoverable. Meaning socket operations to the modem will never return. Alas - I do not know error code 3 - so hard to tell what is actually going on.

    In this case, you should be able to close the socket, then reopen a new one without the application going into a bad state. What example are you running, and how are you handling the socket? 

    vkbakken said:

    2. Is there any steps required when recovering from recoverable error handler through any of the API calls in bsdlib?

    That would depend on where you are in your process. Close the socket, and try to open it. If you still get an error, could you check the signal strength using at_client (AT+CESQ)?

     

    Kind regards,

    Håkon

Reply
  • vkbakken said:
    1. I find that usually it is the recoverable error that is thrown. However - I find it that the link is not really recoverable. Meaning socket operations to the modem will never return. Alas - I do not know error code 3 - so hard to tell what is actually going on.

    In this case, you should be able to close the socket, then reopen a new one without the application going into a bad state. What example are you running, and how are you handling the socket? 

    vkbakken said:

    2. Is there any steps required when recovering from recoverable error handler through any of the API calls in bsdlib?

    That would depend on where you are in your process. Close the socket, and try to open it. If you still get an error, could you check the signal strength using at_client (AT+CESQ)?

     

    Kind regards,

    Håkon

Children
Related