-
Notifications
You must be signed in to change notification settings - Fork 1.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
Bluetooth: Define connection event prepare callbacks #16099
Bluetooth: Define connection event prepare callbacks #16099
Conversation
1a53d5b
to
8c5a2d6
Compare
8c5a2d6
to
8d4a4f3
Compare
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
Other suggestion: Add the possibility to trigger a callback at the start of the events. Then it might make sense to define the callback as a struct so that it is possible to later add struct bt_conn_evt_cb {
void (*prepare)(struct bt_conn *conn, void *user_data);
void (*start)((struct bt_conn *conn, void *user_data);
void (*end)((struct bt_conn *conn, void *user_data);
},
int bt_conn_evt_cb_register(const struct bt_conn *conn, struct bt_conn_evt_cb cb,
void *user_data,
uint32_t prepare_distance_us); |
dd25a10
to
fc161a1
Compare
8c72532
to
1c492c7
Compare
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
1c492c7
to
a92d993
Compare
a92d993
to
e96b93b
Compare
- nrf52dk/nrf52832 | ||
- nrf52840dk/nrf52840 | ||
- nrf5340dk/nrf5340/cpunet | ||
platform_allow: nrf52dk/nrf52832 nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpunet |
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 not work on 54?
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.
Not yet. Need to add EGU definitions here: https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/hal_nordic/nrfx/Kconfig#L64. I believe we can do that separately to unblock other work
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.
Will be possible after zephyrproject-rtos/zephyr#75866 is in NCS
4ecc58a
to
0e71b11
Compare
The device may wake up more often if, for example, it has data to send. | ||
The central device assumes that the peripheral will wake up at every connection event. | ||
|
||
The :c:member:`ble_radio_notification_conn_cb.prepare` callback will be called before every connection event for both the peripheral and central device. |
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.
Should we combine this with the previous paragraph? I think they logically belong together.
0e71b11
to
f6b8ff6
Compare
The Radio Notification callback feature replaces the radio notification feature. It can be used to synchronize data sampling with Bluetooth connection events. The old feature had several weaknesses: - It was not possible to know which connection the notification belonged to. - The trigger also happened upon flash access. - The time from trigger until event start was fixed. That is, not configurable per use case. The new feature is built on top of the connection event trigger feature and is therefore able to known which connection a given notification belongs to. The feature is marked as experimental. Currently this feature will cancels out peripheral latency which we indent to change. Signed-off-by: Rubin Gerritsen <[email protected]>
The sample demonstrates how the Radio Notification connection callback feature can used to minimize latency between data sampling and on air transmission. Signed-off-by: Rubin Gerritsen <[email protected]>
f6b8ff6
to
04ec46d
Compare
Dismissing Aleksanders' review. The changes pushed later were pairprogrammed with him
The connection event callback feature replaces
the radio notification feature. It can be used to
synchronize data sampling with Bluetooth connection events.
The old feature had several weaknesses:
the notification belonged to.
That is, not configurable per use case.
The new feature is built on top of the connection event
trigger feature and is therefore able to known
which connection a given notification belongs to.
This PR is done on top of #15798 to simplify the implementation