Hello,
I would like to learn a little more about the possibilities of thin planning of connection events. I rely on chapter 15, in particular on part 15.7 of the S140 SoftDevice specification v2.1.
In the particular case, I need to provide three simultaneous connections with different traffic levels. Sensors must provide real-time data transmission with a frequency of 10 Hz.
The radio is used at a speed of 1M, MTU is 247. Based on these data, I received the following requirements (the calculations in the table are estimates):
Sensor | Data Rate, byte per 100 ms | time to transfer, ms | Estimated Event Length |
1 | 2000 | 33.75 | 27 |
2 | 200 | 3.75 | 3 |
3 | 25 | 2.5 | 2 |
Note: In the calculations, I rounded up the transfer time to the value of 1.25 ms, since the exchange is made in any case only within the double timeslot.
It is also worthwhile to understand that there is nothing ideal in this world, so situations are possible when the device cannot transmit data. Therefore, damping of data is provided before sending, followed by catch-up. Based on this, it will be more optimal to select the value of the GAP_CONNECTION_EVENT equal to 10. And allow the option to expand the connection interval. Then with more data available, I can get a picture roughly similar to this one from the specification:
More precisely for my case, this picture should look like this:
Where dark color indicates the transmission of data in a normal situation and the lightest possible time to extend the interval.
With a task more or less clarified, now to the questions:
Q1. Obviously, to ensure the planned value of the data flow, the connection sequence is necessary, as indicated in the figure. Otherwise, a device with a large amount of data will not have enough time to transfer data. Is redundancy manual positioning of connections possible?
Q2. If not, then at the application level, you can try to start in the correct sequence. BUT: if a device or two were turned off and then back on, how will the scheduler behave? Will he insert a new connection into an arbitrary place? That is, how to avoid, for example, such a situation:
Q3. Regarding the choice of the duration of the connection event: should this value be the same for both the master and the slave? The MTU setting affects, as the values are matched. and here?
Q4. Should the option for permission to extend the connection interval be active for both the master and the slave? Or is it enough just to allow the master?
Q5. In the options, it is possible to control an external amplifier, namely, activate it through a pin gpio. This can be used as an indicator of radio activity when debugging a multi-connection. Or are there any pitfalls?
Best regards,
amateur in asking difficult questions, Max