[riot-notifications] [RIOT-OS/RIOT] pkg/nimble/netif: allow to apply and enforce random and unique connection intervals (#16372)

Hauke Petersen notifications at github.com
Wed Jun 16 13:35:23 CEST 2021


Addressed comments:
- enhanced the connection interval spacing configuration: it is now configured using a single configuration value. Set to 0 to disable enforcing connection spacing...
- the default value for the connection spacing is now `0`. This has a simple reason: if a node is connection subordinate, it will check the connection interval spacing depending on this config option. But if the connection intervals in the application are defined with `itvl_min == itvl_max` (as for example in the vanilla `gnrc_networking`), the current code would allow only for a single connection...

> Does this mean doing statconn addm/adds and the ble close n? Because doing that I always get the same interval.

Yes, calling `close N` was the correct call. In the last commit I fixed a bug that was causing this interval being the same on every call: the `netif_connect` code does override the `itvl_min` and `itvl_max` values in the connection parameter struct with the random generated value before passing this to NimBLE. But `statconn` did use a static allocated params struct, that is reused for any (re)connection event. Now that the min/max values were overridden by `nimble_netif_connect`, this lead to the first generated random value to be applied for all subsequent connections. I fixed this by restoring the original values of min/max after doing the NimBLE API call in `nimble_netif_connect()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16372#issuecomment-862304777
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210616/6ac295ab/attachment.htm>


More information about the notifications mailing list