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

What could make the SoftDevice reset without being asked to?

We have a nRF based device being connected from a nRF51 dongle (PCA10031). We use pc-ble-driver 2.2.1.

We enable notifications and then we let the device running for a long time. At some point, we stop receiving any notifications, buy checking the log, we can se:

[12:03:23.446] Received notification, handle: 0x0023, value: 0xB7 0x04 0x1E 0x0F 0x00 0x00 
[12:03:23.466] NRF Log:94910/ 0 <-  [02 39 00 00 00 00 00 00 00 23 00 01 06 00 b9 04 79 0f 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:2 payload_length:14 data_integrity:1 header_checksum:da err_code:0x0
[12:03:23.646] NRF Log:   94906 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:23.646] Received notification, handle: 0x0023, value: 0xB9 0x04 0x79 0x0F 0x00 0x00 
[12:03:23.656] NRF Log:94911/ 0 <-  [02 39 00 00 00 00 00 00 00 23 00 01 06 00 b9 04 79 0f 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:2 payload_length:14 data_integrity:1 header_checksum:da err_code:0x0
[12:03:23.656] NRF Log:   94907 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:23.656] NRF Log:94912/ 0 <-  [02 39 00 00 00 00 00 00 00 23 00 01 06 00 b9 04 79 0f 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:2 payload_length:14 data_integrity:1 header_checksum:da err_code:0x0
[12:03:23.656] NRF Log:   94908 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:23.656] NRF Log:94913/ 0 <-  [02 39 00 00 00 00 00 00 00 23 00 01 06 00 b9 04 79 0f 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:2 payload_length:14 data_integrity:1 header_checksum:da err_code:0x0
[12:03:23.656] NRF Log:   94909 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:23.656] NRF Log:94914/ 0 <-  [02 39 00 00 00 00 00 00 00 23 00 01 06 00 b9 04 79 0f 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:2 payload_length:14 data_integrity:1 header_checksum:da err_code:0x0
[12:03:23.656] NRF Log:   94910 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:23.766] NRF Log:94915/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:23.766] NRF Log:State change: STATE_ACTIVE -> STATE_RESET

[12:03:23.766] NRF Log:   94911 ->  [N/A] type:          RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
[12:03:24.036] NRF Log:94916/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.036] NRF Log:94917/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.046] NRF Log:94918/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.056] NRF Log:94919/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.066] NRF Log:94920/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.076] NRF Log:State change: STATE_RESET -> STATE_UNINITIALIZED

[12:03:24.076] NRF Log:94921/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.076] NRF Log:   94912 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.076] NRF Log:   94913 ->  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
[12:03:24.076] NRF Log:94922/ 0 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
[12:03:24.076] NRF Log:   94914 ->  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
[12:03:24.086] NRF Log:94923/ 0 <-  [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP]
[12:03:24.086] NRF Log:94924/ 0 <-  [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
[12:03:24.086] NRF Log:State change: STATE_UNINITIALIZED -> STATE_INITIALIZED

[12:03:24.086] NRF Log:   94915 ->  [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
[12:03:24.086] NRF Log:   94916 ->  [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
[12:03:24.096] NRF Log:94925/ 0 <-  [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
[12:03:24.096] NRF Log:State change: STATE_INITIALIZED -> STATE_ACTIVE

But our app did not request the soft device to reset (I d'ont even know how this could be requested).

What could make the dongle reset it's state like that?

Note that we don't even get any BLE_GAP_EVT_DISCONNECTED notification, so our app still believe everything is still fine, while actually the connection was closed for good.

  • Hi,

    Did you reach a conclusion?

    There are some potential issues when the mass storage device on the programmer mcu is enabled, which it is by default. This may be either the operating system trying to defragment the device, or antivirus software trying to quarantine it. (I am not sure if we have experienced the latter on the nRF51 dongle, but I think we have seen it on the nRF91 DK.) Use J-Link Commander and run the command MSDDISABLE to configure the dongle not to appear as a USB device. (If you need to enable it again at a later point then you can do so with the command MSDENABLE.)

    Regards,
    Terje

Related