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

Multiple peripheral connections collisions

Hello, everyone, I have an issue where I could use some help!

I have this setup.

- One nrf52840 ble peripheral (the data collector) that accepts multiple central connections (this device does advertising and other devices connect to it).

- Multiple nrf52840 ble centrals (data producers) that scan for the data collector and connects (calls sd_ble_gap_connect) to it.

I have setup so that the data collector can accept up to 5 simultaneous connections with the following parameters:

Connection interval: 150ms

Gap data length: 251

Ble Gatt Max mtu: 247

Gap event length: 20ms

(I have confirmed via an osciloscope that this parameters do correlate with current consumption).

If I connect 5 data producers connect to the data collector simultaneously (at this point the data collector will stop advertising so that doesn't come into play) I can see in the oscilloscope while measuring the current consumption of one of the nodes that the nodes will skip a lot of connection intervals (3 out of 4 interval is something regular) I see this because they don't consume current for the whole 20ms gap event length but only for the first 1-2ms.

And the problem with all the connections intervals skipped is that the data transfer is a lot more slowly when I have a single producer connected vs when I have five (when there's only one connection I can see that most of the connections interval have the full 20ms of data transfers (usually I can see something like 1 out of 10 intervals skipped or something like that).

My current theory is that the data collector is NOT spacing the connections evenly so they are clashing with each other (in theory if I have a 150ms connection interval and 20ms gap event length I could fit up to 150/20 =  7 connections without them interfering with each other).

Anyway, my question is if my theory is correct and that if there's any way to evenly space the connection. I'm aware that what mostly controls the connection is the central and in my setup I have this kind of backwards as I have multiple centrals and a single peripheral.

(I'm using s140 6.0.0 and sdk 15.0.0 in both the data collertor and data producers but I migrated the data collector to s140 6.1.1 and it didn't improve things).

(I'm hoping I got the central/peripheral correct as it's a bit confusing in ble, just remember that data collector does advertising and data producer does scanning and calls sd_ble_gap_connect()).

Parents Reply
  • I talked to another engineer, and he said (as you figured out) that there is not much you can do. Since the centrals control the timing independently of each other. You may get better performance over time if some of the links drift away from the other.

    Could you change the master/slave relation, such that one central connects to several peripherals?

    Best regards,

    Simon

Children
No Data
Related