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

communicating with multiple units via ble

hello Nordic

i work with nrf52832 as dispersed units and an nrf52840 dongle/ BL654 Laired which also has the nrf52840 as the central unit.

stage 1 - i need to transfer data from central unit to 100 dispersed units via ble.

stage 2  - transferring data from 50 dispersed units to the one central unit

for first stage i thought of using beacon but after learning about stage 2 i wonder if it will not serve both stages to have some sort of mesh star that goes to a tree.. meaning central unit will pair with 10 middle units and each one of the ten middle units will pair with 10 dispersed units, this will serve both stages i think.

the questions are:

1. is it possible to have this star to a tree communication, and if so, if there are some examples in the sdk (i have sdk 16.0) that can show how it is done ?

2. will there not be a channel issue (if i understood correctly, the nrf52840 can keep up to 20 channels when pairing with units but ble as general have only 40 channels so what happens if i have 10 units that try to keep 10 channels each ?)

3. if there is a better option or solution or idea i would love to read about it

best regards

Ziv

  • Hi Ziv,

    1. is it possible to have this star to a tree communication, and if so, if there are some examples in the sdk (i have sdk 16.0) that can show how it is done ?

    Take a look at BLE relay example, it seems the most close to your case.

    2. will there not be a channel issue (if i understood correctly, the nrf52840 can keep up to 20 channels when pairing with units but ble as general have only 40 channels so what happens if i have 10 units that try to keep 10 channels each ?)

    We cannot give a right answer without knowing your message size and how often there will be an exchange between nodes. If you have time to query your relay nodes one-by-one, there will be no congestions, as BLE stack will schedule all connections in right way, but 10 masters working simultaneously can cause interference.

    3. if there is a better option or solution or idea i would love to read about it

    Of course, there are another options - for example, you can connect sequentially to a set of 20 devices, query them, then disconnect and go to the next set. Maybe it worth to consider Bluetooth Mesh. Again, it's not enough information to make a proper suggestion.

  • hi Dmitry Slight smile

    Maybe it worth to consider Bluetooth Mesh. Again, it's not enough information to make a proper suggestion.

    mesh to my knowledge is everybody speaking with everybody, i don't need the field units to speak with each other,  only the central unit to speak with all field units and all field units speak with the central.

    its like there is one manager of all 100 units and it sends them all instruction and needs to receive each units status. message size i guess can be something like 20-40 (depends on how many connections we would like for each middle unit to hold)  bytes of data (each unit will have 2 bytes of data in the message) 

    but 10 masters working simultaneously can cause interference.

    when sending instructions from central unit to field units then all 100 units should receive their data (each unit with its own data) in less then one second

    when field units send status to the central unit then there is no time interval defined for me yet but lets say that each one of the 50 units sends its status every one second as well

    does the above clarifications help with understanding the project goals better to advice on the proper method/s, cons prones and communication interference issue ?

    best regards

    Ziv

  • mesh to my knowledge is everybody speaking with everybody, i don't need the field units to speak with each other,  only the central unit to speak with all field units and all field units speak with the central.

    There's no problem to speak only with central unit. 

    its like there is one manager of all 100 units and it sends them all instruction and needs to receive each units status. message size i guess can be something like 20-40 (depends on how many connections we would like for each middle unit to hold)  bytes of data (each unit will have 2 bytes of data in the message) 

    With such a low data rate, there's nothing to worry about. Using your method (10 relays x 10 nodes), you can configure 2.5 ms event length, connection interval of 75-100 msec (different for each relay but equal for relay childs), latency 5 (that will minimize traffic from nodes but gives at least 4 intervals in a second for retransmitting lost packet). Assuming the real connection event is about 600 usec and all 37 data channels are in use, 100 randomly spreaded events will have about 0.3% (1-(1-0.0012)^(100/37)) probability of congestion for each single message - that's very rough estimation, but it shows that interference shouldn't be an issue.

    Using Mesh, you can configure field units as low-power nodes to prevent flooding and minimize power consumption.

  • well i am new to Bluetooth and Ble so i am not yet sure how it actually work with setting the time and even specify to a middle unit with what units it connects to prevent 2 middle units from connecting to same field units. 

    another question that maybe you can answer for me is that.. i work with a bl654 Laird dongle (it has nrf52840 SOC within, i plan to work with AT commands but i am not sure if it is possible with AT commands to order the dongle to pass the data received from the units to the pc when the data arrives which maybe be an a synchronic event

    if you are not familiar with the Laird BL654, I also have the nrf52840 dongle but i started with the Laird one because starting to work with it seemed easier just plug to the pc and communicate via serial port

    best regards

    Ziv

  • Hi Ziv,

    I don't have any experience with BL654, but I believe it has some way to configure at least connection interval. In any case, your main concern are connections between middle and field units (both based on nrf52832, right?), where you have full control over connection parameters via softdevice API. If you don't enable multiple connections on field units, you shouldn't worry about what units each master will take, or alternatively you can choose a host-controlled distribution (central module sends a command to middle one to list visible field units with their RSSI and then to connect to some of them). I don't recommend to put any logic on middle devices, as such configuration will be hard to support and reconfigure.

    another question that maybe you can answer for me is that.. i work with a bl654 Laird dongle (it has nrf52840 SOC within, i plan to work with AT commands but i am not sure if it is possible with AT commands to order the dongle to pass the data received from the units to the pc when the data arrives which maybe be an a synchronic event

    Does this module have some means to receive notifications/indications?

    if you are not familiar with the Laird BL654, I also have the nrf52840 dongle but i started with the Laird one because starting to work with it seemed easier just plug to the pc and communicate via serial port

    I understand that it's easy to start with - from other side, you're limited with AT command set written by manufacturer, and you won't get support for it here, perhaps Laird support center can give you more info.

Related