Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Beacon output suddenly stops

Hello.

In the BLE software being developed, the device uses nRF52840, s140 v7.2.0 or v7.3.0, and I am building a system that periodically sends a beacon (ADV_NONCONN_IND) in the peripheral role at the same time as scanning in the central role.

In the software currently under development, after setting a beacon (ADV_NONCONN_IND) and executing ble_advertising_start, the advertisements at the set interval suddenly stops after a while.

The time it takes for the problem to occur varies, ranging from a few hours to several tens of hours, and other functions appear to be working fine even after the problem occurs.

The operation of this device is to continuously perform a sequence of transmitting beacons, connecting in a central role based on advertisements from external devices that capture the beacons, and then disconnecting after communication.
For this reason, the central role frequently start and stop scanning, connects and disconnects, but the peripheral role's beacon output has never stopped since the start advertising.

I believe that the output of ADV_NONCONN_IND started with ble_advertising_start will not stop unless sd_ble_gap_adv_stop is executed, but is it possible that external factors such as SCAN or connection of the central role can stop advertising of peripheral roles?

Also, as a failsafe, we are considering implementing code that monitors the advertisement output and restarts it when the advertisement stops, but is there a way to detect that the ADV_NONCONN_IND has been output to RADIO?
I looked into Radio Notification, but since the event callback can only receive the radio_active state, I determined that it is not possible to capture only the advertisement output in a multi-role operating environment.

Please give me some advice.

best regard.

  • Hello Hieu,

    Since the problem occurred, I have attached the trimmed raw log.

    00> ==SCAN_RSP== AdType:FF
    00> 
    00>  42 04 01 00 00 00 00 0B  55 55 55 55 00 DF C3 10  FF 0E 2F B7 F5 66 99 D6  54 0C EE C2 01
    00> 00:07:46.5214  > Continue moving average calculation with RssiList[1]
    00> 
    00> > Addr:57:6A:99:32:FA:2B (Resolvable) RSSI:-49dBm(+0) raw:-49dBm
    00> 
    00> > Suppress re-auth: elapsed 1645ms.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> > Code:55555555 UID:000-00000011 Rssi+0 Ver.1
    00> 
    00> 
    00> ==SCAN_RSP== AdType:FF
    00> 
    00>  42 04 01 00 00 00 00 0B  55 55 55 55 00 1B B8 9E  63 04 B0 F4 F4 66 99 D6  55 0C EE C3 01
    00> 00:07:46.7956  > Continue moving average calculation with RssiList[1]
    00> 
    00> > Addr:57:6A:99:32:FA:2B (Resolvable) RSSI:-48dBm(+0) raw:-48dBm
    00> 
    00> > Suppress re-auth: elapsed 1919ms.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> 00:07:46.8769  > 55555555-000-00000011/71:32:4C:9B:07:56 (Resolvable) was removed from the authentication suppression list, can auth: elapsed 2000ms.
    00> 
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> > Code:55555555 UID:000-00000011 Rssi+0 Ver.1
    00> 
    00> 
    00> ==SCAN_RSP== AdType:FF
    00> 
    00>  42 04 01 00 00 00 00 0B  55 55 55 55 00 1B B8 9E  63 04 B0 F4 F4 66 99 D6  55 0C EE C3 01
    00> 00:07:46.9318  > Continue moving average calculation with RssiList[1]
    00> 
    00> > Addr:57:6A:99:32:FA:2B (Resolvable) RSSI:-44dBm(+0) raw:-44dBm
    00> 
    00> > TicketSeedBase:(16)
    00>  55 55 55 55 00 00 00 00  0B 66 8C E7 92 00 00 00
    00> > AccInfo[0] Accumulate.
    00> 
    00> > - Authed #105 at Fri Jul 19 02:58:33 2024.
    00> 
    00> > - Addr: 57:6A:99:32:FA:2B (Resolvable) (000-00000011)
    00> 
    00> > - RSSI: -44dBm(+0)
    00> 
    00> > - Auth: 1
    00> 
    00> +++ CERT OK +++ (RSSI: -44)
    00> 
    00> 
    00> > Device has been added to the authentication suppression list, can NOT auth.
    00> 
    00> 
    00> 00:07:46.9358  > All Smartphone Suppression timer start.
    00> 
    00> *** SCAN STOP ***
    00> 
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> UART-Tx:(41)
    00>  F2 01 10 10 11 00 05 55  55 55 51 60 00 00 00 00  00 00 00 11 2C 00 00 00  00 0B FF EE C3 1B B8 9E
    00>  63 04 55 55 55 55 00 01  00
    00> UART-Rx:(2)
    00>  F3 01
    00> <debug> ser_conn: [SD_CALL]:SD_CALL_UNKNOWN
    00> 
    00> 00:07:47.0361  > All Smartphone Suppression timer has ended.
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning parameters have been changed successfully
    00> 
    00> *** SCAN START ***
    00> 
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> > Code:55555555 UID:000-00000011 Rssi+0 Ver.1
    00> 
    00> 
    00> ==SCAN_RSP== AdType:FF
    00> 
    00>  42 04 01 00 00 00 00 0B  55 55 55 55 00 1B B8 9E  63 04 B0 F4 F4 66 99 D6  55 0C EE C3 01
    00> 00:07:47.2010  > Continue moving average calculation with RssiList[1]
    00> 
    00> > Addr:57:6A:99:32:FA:2B (Resolvable) RSSI:-46dBm(+0) raw:-46dBm
    00> 
    00> > Suppress re-auth: elapsed 266ms.
    00> 
    00> 00:07:47.2018  > 1BACC0DE-50273-09551615/71:32:4C:9B:07:56 (Resolvable) was removed from the rssi moving average buffering list, calc end: elapsed 1001ms.
    00> 
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> <debug> nrf_sdh_ble: BLE event: 0x1D.
    00> 
    00> 
    00> ==SCAN_RSP== AdType:FF
    00> 
    00>  4C 00 01 00 00 00 00 0B  55 55 00 53 00 45 00 43  4F 02 4D
    00> 00:07:47.2170  > Start moving average calculation with RssiList[0]
    00> 
    00> > Addr:71:32:4C:9B:07:56 (Resolvable) RSSI:-42dBm(+0) raw:-42dBm
    00> 
    00> > No accumulated.
    00> 
    00> 
    00> @@@ scan_connect_judgement(688)->sd_ble_gap_connect
    00> +++ Connecting +++
    00> 
    00> 00:07:47.4373  > Auth Buzzer timeout.
    00> 
    00> 00:07:48.2013  > 55555555-000-00000011/57:6A:99:32:FA:2B (Resolvable) was removed from the rssi moving average buffering list, calc end: elapsed 1000ms.
    00> 
    00> 
    00> 00:07:48.2173  > 1BACC0DE-50273-09551615/71:32:4C:9B:07:56 (Resolvable) was removed from the rssi moving average buffering list, calc end: elapsed 1000ms.
    00> 
    00> 
    00> *** No radio notification for a while(1000ms).
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning parameters have been changed successfully
    00> 
    00> *** SCAN START ***
    00> 
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning
    00> 
    00> @@@ MdlBLE_vd_AdvertisingStopReq(2666)->sd_ble_gap_adv_stop
    00> @@@ ble_radio_notification_init(87)->sd_radio_notification_cfg_set
    00> @@@ flags_set(309)->sd_ble_gap_adv_set_configure
    00> @@@ ble_advertising_start(754)->sd_ble_gap_adv_set_configure
    00> sd_ble_gap_adv_start() returned NRF_SUCCESS.00:07:48.2378  BLE_ADV_EVT_IDLE(0)
    00> 00:07:48.9356  > 55555555-000-00000011/57:6A:99:32:FA:2B (Resolvable) was removed from the authentication suppression list, can auth: elapsed 2000ms.
    00> 
    00> 
    00> *** No radio notification for a while(2000ms).
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning parameters have been changed successfully
    00> 
    00> *** SCAN START ***
    00> 
    00> 
    00> @@@ nrf_ble_scan_stop(1041)->sd_ble_gap_scan_stop
    00> <debug> ble_scan: Scanning
    00> 
    00> @@@ MdlBLE_vd_AdvertisingStopReq(2666)->sd_ble_gap_adv_stop
    00> @@@ ble_radio_notification_init(87)->sd_radio_notification_cfg_set
    00> @@@ flags_set(309)->sd_ble_gap_adv_set_configure
    00> @@@ ble_advertising_start(754)->sd_ble_gap_adv_set_configure
    00> @@@ ble_advertising_start(759)->sd_ble_gap_adv_start
    00> sd_ble_gap_adv_start() returned NRF_SUCCESS.00:07:49.2378  BLE_ADV_EVT_IDLE(0)


    The addition of SoftDevice events is causing a large number of logs to be output.

    As an aside, this causes nrf_log to hang and the same log to be output repeatedly, so I have to manually reset it each time.
    Reference link: devzone.nordicsemi.com/.../nrf_log-output-sometimes-goes-crazy
    It looks like this issue is still not resolved.

    The problem begins at L.322, one second before L.346 "*** No radio notification", and it seems that the SoftDevice is unresponsive and locked in response to sd_ble_gap_connect.

    Please let me know if there is any other information you need.

    p.s.
    I tried to upload a log, but even after compressing it, I got the message "File type is not allowed" and it didn't work.
    I think there is a size limit, but how large can I upload?

    Best regards.

  • Hello Hieu,

    Has there been any progress on the Nordic investigation since then?

    It takes a while for this to happen, but it has happened a few times here.

    In order to reduce the load of SoftDevice events during connection, I tried calling sd_ble_gap_adv_stop() just before sd_ble_gap_connect() and then restarting the beacon with ble_advertising_start() when BLE_GAP_EVT_DISCONNECTED, but the issue of RadioNotification stopping persisted.

    The situation from the log when the problem occurred was exactly the same.

    I also tried putting scan_stop just before or just after sd_ble_gap_connect, but I was unable to establish a connection.

    At this point, we're running out of options, so are there any other effective methods you can think of?

    Best regards.

  • Hi

    I'm sorry you're being sent in a loop here, but now Hieu is out of office. I haven't had time to get into this case, but I have pinged the devs looking at this internally, and will let you know if they have any updates.

    Einar who initially had this ticket will return on Monday July 29th and likely take back this case then. So sorry about all the delays.

    Thus far I'm afraid there's no further updates from our side. You say that the full log can't be uploaded. Would it be possible to upload it with Google Drive or similar so we can download it on our end from there? Alternatively you can send it by mail to me, but for the mail address I'll reach out to you in direct messages if that's what you prefer.

    And just a shot in the dark from me, how many devices has the beacon connected to when this issue occurs. Could it be that the maximum number of connections is reached, and that's why the advertiser won't start again, since it seems to happen after a connection event if I'm not mistaken.

    One option you could try is to add a watchdog timer that will reset the device if no BLE events trig in X amount of time. Use the WDT example for reference here.

    Best regards,

    Simon

  • Hi,

    I have inerited this case back from Simon. For now I do not have anything to add to what he wrote, other than that if the problem with uploading logs is the file type, then I suggest putting the log in a zip file and uploading that. You can uploade large files here on DevZone as long as the file type is allowed (and .zip is).

    Br,

    Einar

  • Hello Einar,

    > but I have pinged the devs looking at this internally, and will let you know if they have any updates.

    > For now I do not have anything to add to what he wrote,

    In this case, we have no option but to reset the device, and since the problem is occurring within the SoftDevice, we would appreciate your immediate response.

    It's been two months since the problem first occurred and no progress has been made.

    If there is any information you require, please let us know and we will do our best to provide it.

    > You can uploade large files here on DevZone as long as the file type is allowed (and .zip is).

    I previously uploaded Log of the incident.zip, but when I tried to upload the log this time, I was unable to do so.
    So I wondered if there was a limit to the upload size, and inquired about it.

    Best regards,

Related