Bluetooth: Controller: Connection Interval seems wrong with multiple connections #71383
Replies: 15 comments
-
what code sample do you mean? |
Beta Was this translation helpful? Give feedback.
-
sorry, posted on the wrong issue! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I will try to create a minimal sample to demonstrate it and also try to verify that it works correct with the console application. Maybe this is harder to replicate than I thought. What I know for sure right now is that with LL_SW_SPLIT it behaves "wrong" and then I only set LL_SW_SPLIT=n and everything works as it should. I will update this issue with my findings once I have some more time todo specific testing. |
Beta Was this translation helpful? Give feedback.
-
Thank you for reporting this. However - unless you are able to reproduce this issue with upstream Zephyr CC: @carlescufi |
Beta Was this translation helpful? Give feedback.
-
I thought that it would fit better here, because its about the Zephyr BLE Controller implementation and not about the softdevice, but If you think Its better to put it in the devzone I will do that. |
Beta Was this translation helpful? Give feedback.
-
@cvinayak I have created a sample to demonstrate the problem. To reproduce the issue, upload central and peripheral to two nRF52840s , then start a sniffer before connecting. in the sniff I can see that everything is correct, until the connection interval gets updated. The used value seems to be about double the negotiated interval. As soon as the device that connected to the central disconnects, the Interval goes back to the expected value: I know I cant have unlimited devices with fast connection intervals connected, but I think 2 devices with 36ms Interval should be achievable with constant connection intervals. IMPORTANT:
EDIT: I was able to reproduce this issue with the Softdevice Controller now. This could mean that its not a Controller Issue but dont know what it is then though?! EDIT2: After reading https://devzone.nordicsemi.com/f/nordic-q-a/89298/increase-throughput-in-multi-role-multi-connection-system |
Beta Was this translation helpful? Give feedback.
-
as Vidar Berg pointed out in his analysis on the Devzone post, the Controller is skipping every other event. The cause is unknown though. Is there any log that I can enable where I would see this skipping happen? Also, could this all be because of a misalignment of event scheduling? like somehow the events are scheduled for the same time? as far as I know, the LL connection update has a offset field for exactly this purpose, but neither the Softdevice nor the Opensource Controller are using this feature. Maybe this would solve the problem..? |
Beta Was this translation helpful? Give feedback.
-
You could try the Zephyr Controller in Zephyr v3.3 release with |
Beta Was this translation helpful? Give feedback.
-
wireshark_wrongintervaldemo.pcapng.txt I cant upload .pcapng files, so i just added .txt at the end, so just rename it. |
Beta Was this translation helpful? Give feedback.
-
If I remember correct there was some automatic detection of drift and the connection parameter request was auto-initiated, but I do not think it is there anymore in any release of Zephyr. Alternatively, applications can periodically initiate connection parameter request to mitigate the eventual overlap... may be you can try that, say a connection parameter update every 30 seconds or so. |
Beta Was this translation helpful? Give feedback.
-
yeah, that could work, BUT in order for that to work, it first has to work at all after the update. Currently as you see in the log, there is a offset of 5msec applied, but they seem to still overlapp / Controller is still skipping events right after the update. |
Beta Was this translation helpful? Give feedback.
-
In your sniffer trace your Peripheral (I think a non Zephyr Controller) is not using the LL Connection Parameter Request (but L2CAP Connection Parameter Update), hence the Central device (I think a Zephyr Controller) is not provided with the scheduling offset hints. Anyway, we are diverging away from the fact that Central clock would drift and that any measure taken will eventually lead to the Central connection events drifting into and overlapping with other roles in the Peripheral. LL Connection Parameter Request Control Procedure would to some extent help as long as all devices in the topology co-operate in the scheduling. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@CodingGhost moved this to a discussion since it's not really a bug. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
using the Zephyr Controller Implementation,if coded PHY support is enabled but 1M connection is used, the connection interval seems to 108 Milliseconds regardless of of what is negotioated. This can be seen with wireshark, I attached the logs. when using the Softdevice controller it is behaving like expected.
Im not sure if my Wireshark maybe skews the results but as it measures correctly with the softdevice it seems to be working. It would be Interesting if someone could verify this behaviour.
I am currently using NCS 2.5, but as I tried with both Controllers, this shouldnt be a NCS only Issue.
at this stage I would first like to know if anyone can reproduce this or if its specific to my setup.
@cvinayak
wireshark.zip
Beta Was this translation helpful? Give feedback.
All reactions