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

How to check if SoftDevice is alive?

Hello.

How can I monitor that SoftDevice is working properly?

I am trying to monitor using Radio notification, but RADIO Active does not guarantee that the SoftDevice is working properly, and the interrupt frequency is high.

There is also a way to monitor SDH events, but these do not occur all the time, so I don't think they are suitable for monitoring normality.

There also does not seem to be an API to monitor the status of SoftDevice by polling.

If you have any good ideas, please let me know.

best regards.

Parents Reply Children
  • Hello Jonathan

    > What is it that you are trying to achieve with checking if the softdevice is alive? 

    What I want to do is have the main loop monitor for any abnormal behavior in the soft device and reset the device.

    Believe it or not, this is actually happening, and the reasons why are under investigation.

    See this ticket.: Beacon output suddenly stops

    In rare cases, for some reason, events from the SoftDevice are not sent from the start of a BLE connection and the SoftDevice becomes unresponsive to requests, but application processing, including UART, continues to function normally.

    > there is a check if enabled function

    I don't want to know if it's enabled, I just want to know if it's working.

    best regards,

  • hiroiwas said:

    What I want to do is have the main loop monitor for any abnormal behavior in the soft device and reset the device.

    Believe it or not, this is actually happening, and the reasons why are under investigation.

    Thanks for the info


    hiroiwas said:
    I don't want to know if it's enabled, I just want to know if it's working.

    I will check if the is enabled function is possible to use as an indicator to if the SD is ok or not. It might be that it would fail to return a value and that way you can use it to see if the SD is ok or not. Will investigate to see if this is a possible use case. 


    Regards,
    Jonathan

  • There is no good way to monitor this, what can be done si check that the SD is responding to requests and have a timeout in events pulling loops. So using the radio active is one way to do it. 

    Regards,
    Jonathan

  • Hello Jonathan,

    > There is no good way to monitor this,

    Hmm, that was a disappointing result.

    So are there any harmless requests for which the SD will return an event?

    This refers to events that are responded to as events but do not affect BLE operation.

    One thing that came to mind is sd_flash_write, but you cannot write a size of 0, and it will stop the CPU for up to one word (41us).

    If such an API exists, it would be possible to monitor the response of SD events by calling it periodically.

    Best regards,

  • can try sd_ble_gap_rssi_start(conn_handle, 0, 0)->receive BLE_GAP_EVT_RSSI_CHANGED->sd_ble_gap_rssi_stop(conn_handle)

    https://docs.nordicsemi.com/bundle/s140_v7.2.0_api/page/group_b_l_e_g_a_p_r_s_s_i_f_i_l_t_m_s_c.html

    That will only work if:

    • they have at least one active connection
    • peer sends something (even an empty packet). That makes RSSI sample available.

    But the radio active solution is likely a better option for you use case. 

    hiroiwas said:
    If such an API exists, it would be possible to monitor the response of SD events by calling it periodically.

    Sadly it does not. 


    Regards,
    Jonathan

Related