A BLE disconnection issue occurred randomly after the device had been functioning without any problems for many hours

Hi everyone,

We have devices using the BLE module (nRF52) deployed in clinics for testing. They have been functioning without issues until recently when we noticed occasional BLE disconnections. The following image shows data from one of the affected devices. Its RSSI value dropped significantly to -90 dBm, indicating weak BLE signal strength that could explain the disconnect. However, the device was positioned close to a tablet running the application connected to it, where the BLE signal strength should have remained strong. This inconsistency is what we find puzzling.

In another case, the RSSI value was within acceptable range (-68dBm), which couldn't lead to the BLE disconnection. 

We're thinking of if any issue with code optimization. Any suggestions to further investigate this issue would be greatly appreciated. Thanks!

Parents
  • We had a similar issue with a disconnect due to RSSI when the sensor was supposed to be next to a tablet/gateway and it turned out to be a large body of water placed in close proximity to the tablet ie someone picked the tablet up and turned away from the sensor to better read the data and the human body blocked the 2.4GHz signal pretty well. 2nd case looks odd though unless a local microwave got switched on .. SDK or nRFConnect?

  • Thanks for the reply,  ! We're using the latest SDK 17.1.0.

    Since deploying it in the clinics, people being around the device might be inevitable. Moreover, some other equipment that have interference might be introduced in the room as well. In this situation, it'd be great if you can suggest any solutions to protect the device from being disrupted by human body or other sources of interference! Thanks!

  • I wouldn't bother, just boost to max Tx +4dB. What are these set to? They will affect the reliability.

    // Connection interval: Determines how often the Central queries data from the Peripheral.
    //   Peripheral may request an update between between minimum 7.5 ms and maximum 4 sec
    // Slave latency: A Non-zero slave latency allows the Peripheral to not answer when the
    //   Central asks for data up to the slave latency number of times. However if the Peripheral
    //   has data to send it can send data at any time. This enables a peripheral to stay sleeping
    //   for a longer time, if it doesn't have data to send, but still send data fast if needed
    // Connection Supervision Timeout: Determines the timeout from the last data exchange untill
    //   a link is considered lost. A Central will not start trying to reconnect before the timeout
    //   has passed, so a short timeout is preferred for devices often going out of range
    
        gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
        gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
        gap_conn_params.slave_latency     = SLAVE_LATENCY;
        gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;
    

  • #define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.1 seconds). */
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_1_25_MS) /**< Maximum acceptable connection interval (0.2 second). */
    #define SLAVE_LATENCY 0                                    /**< Slave latency. */
    #define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)   /**< Connection supervisory timeout (4 seconds). */
    

    Please take a look at it above.

    I guess I didn't mention that the tablet is actually connecting two BLE devices using the same BLE module. However, the most of BLE disconnection happens in the device worn on the foot.

    The second set for the second BLE device is listed the following

    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(15, UNIT_1_25_MS)             /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(30, UNIT_1_25_MS)             /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */
    #define SLAVE_LATENCY                   0                                           /**< Slave latency. */
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS) 

    I'm not sure if having 2 devices, it could potentially increase the possibility of having BLE instability.

    Edit: I also boosted the TX power up to +8dBm by using sd_ble_gap_tx_power_set()

        ret_code_t err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, TX_POWER_LEVEL);
        APP_ERROR_CHECK(err_code);

  • +8dB? That's a bug; setting +8dB doesn't work on the nRF52832, which only has a max of +4dB. Setting +8 actually sets a -ve dB value, look at the pulse currents:

       // 11.35mA NRF_RADIO->TXPOWER = 0x08
       // 23.17mA NRF_RADIO->TXPOWER = 0x04
       // 17.25mA NRF_RADIO->TXPOWER = 0x00

    Just changing to +4dB alone might fix your disconnect issue :-)

  • I'm using nRF52833 actually which can be boosted to +8dBm.

  • Good news; the original tag says nRF52832

Reply Children
Related