-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/ble/skald: make advertising interval configurable per context #17834
Conversation
b442a24
to
ef925b5
Compare
rebased |
#ifndef CONFIG_SKALD_INTERVAL_MS | ||
#define CONFIG_SKALD_INTERVAL_MS (1000U) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to keep this? Maybe not as a CONFIG_
define, but at least as a default? This way you would not need to duplicate the defines it in the main.c
s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not really. That 1000ms is a pretty arbitrary value and far from a BLE advertising default... So I don't see a benefit of keeping it.
Otherwise tested: I can see both beacons with the nRF connect app. |
@miri64 are you satisfied by my comment and would you consent to continue with this PR? |
I am satisfied. |
Contribution description
Until now,
skald
was implemented in a way that all active advertisings were using the same, compile-time-configured, advertising interval. But making the interval configurable per context makeskald
much more flexible, trading 4 byte in RAM overhead and a single pointer deref - quite OK I'd say :-) The actual change consists of two lines, adding theadv_itvl_ms
field to the context struct and substitutingCONFIG_SKALD_INTERVAL_MS
forctx->adv_itvl_ms
in the implementation. All the rest is just the adaption of the two ibeaon and eddystone wrappers...Testing procedure
Run the two provided
skald
examples (examples/skald_ibeacon
) and (examples/skald_eddystone
) and verify they still advertise as expected.Issues/PRs references
none