This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Nordic Thingy 52 - BLE multiple connection throughtput issue on android

Hi, 

I'm using 5 nordic thingy 52 (nRF6936).

I connect all of them with my android smartphone using your thingylib library (github) and read only `rawDataNotification` (compass, gyroscope, accellerometer) due to the fact that if I enable other sensor data che connection crash, as I reported here on github issue .

With one or two nordic the sampling rate works as expected up to 200Hz.

When I connect more of thingy52 to my android app, I encounter the problem that out of 5 Nordic connected, at least 2 sample at half the frequency or less, even if I set a frequency of 90 Hz or 50 Hz.

I've already tried to play with MTU, advertising and connection parameters, but I can't get a constant data sampling rate between several Nordic together; yet BLE has about 30 channels for communication, and on andorid (depending on phone version or model and ROM) it's possible to have 7 or more simultaneous GATT connections. How is this possible that I cant reach that values?

What can I modify and/or try in order to be able to sample at more than 100 Hz with 4-5 nordic thingy 52 connected together?

Thanks in advice!

  • Hi,

    What can I modify and/or try in order to be able to sample at more than 100 Hz with 4-5 nordic thingy 52 connected together?

    Try to see if you are able to reduce the connection interval the phone sets. But, most likely the problem is that it's not possible to have all these devices connected at the same time with a low connection interval.

    BLE has about 30 channels for communication, and on andorid (depending on phone version or model and ROM) it's possible to have 7 or more simultaneous GATT connections. How is this possible that I cant reach that values?

    It's a single radio, it can only be on 1 channel at a time, so this limits how much time it can spend sending/receiving data for 1 device, before the radio scheduler moves to the next device that's connected.

  • thanks for the reply.

    I saw that only one bluetoothgatt object is used within the thingylib, so it seems that there is only one GATT shared between all connected devices. Could that be due as well? do you think, managing the devices in a Map<x, BluetoothGATT> having a GATT and its listener for characteristics for each device, could improve the final throughput?

    Thanks in advice!

  • > only one GATT shared between all connected devices

    There's BluetoothGatt object per connected device. Each BleManager (thingy library is using Ble Library for Android), which wraps BluetoothGatt is responsible for communication with a single device.

    As Sigurd wrote, the phone has just one radio, and has to split time between different devices. It cannot send and receive data simultaneously on different channels. Having multiple BluetoothGatt objects (or BleManagers) per each device would also not help, as it would just add more complexity, but the issue would remain.

    If you have a sniffer, you could see how much time each device takes for communication. This can be also calculated if you know how large each packet is and how often they are sent.

Related