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

Softdevice crashes with error 1405

Hi,

I have an application (central mode) which regularly connects to a number of  clients, read characteristics and then disconnects again.

Whenever there is an unintended disconnect from a client, e.g. due to bad coverage, then the next connection attempt (to another client) always crashes with error 1405 (0x057D) directly after the BLE_GAP_EVT_CONNECTED has been received. The stack seems corrupted and just garbage in the error report structures.

This happens both when using SDK 11 and SDK 14.2

Chip used is nrf52832

I saw a somewhat similar post earlier but without any conclusive answer.

Thanks for any lead on this

/Peter Lerup


  • It wasn't much to go on here. You will need to find where it is actually "crashing", I assume that there is api call that return an error code (hopefully not ignored), this typically should be caught by an assert and forwarded to the fault handler. Maybe if you set DEBUG define and disable optimization you might get some more debugging information.

    I assume the case here may be that you have a BLE_GAP_EVT_CONNECTED event shortly followed by a BLE_GAP_EVT_DISCONNECTED, if your application rely on executing a sequence of api calls and for instance start of application timers based on the BLE_GAP_EVT_CONNECTED event, I assume that may give various strange issues if you have not considered this.

    Best regards,
    Kenneth

  • Found it now. The problem was that the BLE_GAP_EVT_DISCONNECTED wasn't passed to the db_discovery module in the case with premature disconnect and this made the next discovery start to crash.

    My bad, sorry.

Related