Avoid external devices disrupt a Bluetooth connection

Hi everyone! We're working on a device that is supposed to use in the operating room (OR). We're facing a serious problem with BLE connection as there are other wireless devices or sources of electromagnetic radiation in the OR. The system briefly describes as the following.

Our devices usually sit close to a mobile application (6-10 feet away). We're sending data from two BLE peripherals to the mobile app simultaneously. During the benchtop test, we never get any issues with data transmission. However, in the OR data were not successfully transmitted to the app. It jumped into the error either NRF_ERROR_RESOURCES or NRF_ERROR_BUSY, referring to the following portion of code. 

        err_code = sd_ble_gatts_hvx(p_cus->conn_handle, &hvx_params);
        if (err_code == NRF_ERROR_INVALID_STATE) {
            NRF_LOG_ERROR("ble gatts hvx error: %u", err_code)
            return err_code;
        }
        if (err_code == NRF_ERROR_RESOURCES || err_code == NRF_ERROR_BUSY) {
            // Wait for BLE_GATTS_EVT_HVN_TX_COMPLETE.
            // Drop data
            NRF_LOG_ERROR("ble gatts hvx out of resources")
            p_cus->busy = true;
        }

This issue doesn't happen frequently, we feel like those sources with wireless or electromagnetic radiation randomly disrupt the BLE connection. There are several options as mentioned the following we've implemented to mitigate this, but the issue still happens:

  • Make a short connection interval (7.5 ms).
  • Update DLE (up to 251 byte) and MTU (247) to increase the throughput.
  • Queue implementation to reduce sample drops. 

Therefore, I greatly appreciate if there are any suggestions to avoid this issue. Thanks!

Parents Reply Children
Related