Data synchronization between two BLE peripheral devices with a mobile app as a central

Hi everyone,

We're trying to synchronize data coming from two different BLE modules (nRF52833 based) on a mobile application. The following is the information of two devices with one device sending data at 100Hz and another at 250Hz. Referring to this post: Wireless timer synchronization among nRF5 devices, it applied to two BLE devices with one as a peripheral role and one as a central role. I didn't find any posts regarding the synchronization associated with a mobile app. Hope to receive suggestions!

  

In the meantime, what we have done is enabling data record from two devices at the same time. Specifically, the app automatically connects with two devices and whenever we press a button 'record' on the phone app to enable notification and it will start receiving data from both devices. Since two devices have different sampling rate, we're not sure how it will affect to the synchronization process. We saved data collected from each device into one excel file and we saw two data show laggy by over a long period of time, say a couple hours of measurement. The following code is part of our mobile app to collect data transmitted from two BLE devices, we're collecting data based one characteristic UUID of each device. Our hypothesis was that the one with higher sampling rate, it's case would happen more frequently. However, sometimes, the one with 100Hz was jumped 2 times in a row before break the switch-case to collect data from another device.

  1. We would greatly appreciate if any suggestions on this. Thanks!
  2. We're trying to understand what happened on the air when two BLE devices transmit data to the mobile app. Any suggestions about the use of Sniffer to track this?

func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic,
          error: Error?) {
    var device_01_data:[Double] = []
    var device_02_data:[Double] = []

    switch characteristic.uuid {
    case DEVICE_01_UUID:
      // get data from device 01 and put it into device_01_data
    case DEVICE_02_UUID:
      // get data from device 02 and put it into device_02_data
    default:

Parents Reply Children
Related