Skip to content

Conversation

@szymon-czapracki
Copy link
Contributor

Add Immediate Alert Service

@github-actions github-actions bot added area: API Changes to public APIs area: Bluetooth area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Samples Samples labels Mar 9, 2022
@szymon-czapracki
Copy link
Contributor Author

@MariuszSkamra FYI

Comment on lines 139 to 142
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all opposed to allow statically registered callbacks, but I am not sure how this is properly added.

I see that for e.g. bt_conn_cb, it is added to not only this file, but also some of the ESP32 linker.ld files.

Do you know how this is properly added? If adding it to only here, does it then not work on e.g. the ESP32 devices?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we have to manually add this in ESP32/S2/C3 as well. We are still to figure out a way to overcome this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an update. This issue regarding ESP32 linker script would/will be fixed in this #43659.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of doing it this way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Callbacks are stored in ROM instead of RAM :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That much I got ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called a sample? How about "implementation"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the ongoing alert has been stopped by the user? In that case, this should start a new one, rather than just returning.

Comment on lines 50 to 51
Copy link
Contributor

@alwa-nordic alwa-nordic Mar 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting alert_level should be outside the loop.

Copy link
Contributor

@alwa-nordic alwa-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IAS spec is not clear on behavior when multiple peers are connected. But I think clearing the alert when any peer disconnects is wrong.

The Alert Level characteristic is not readable. This makes me think that each GATT client should have a separate alert level.

Copy link
Contributor

@Thalley Thalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the condition that we mark it as experimental in the Kconfig as well, so that we may revisit the API later more easily

Comment on lines 6 to 7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a select EXPERIMENTAL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should also be " [EXPERIMENTAL]" at the end of the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Thalley
Thalley previously approved these changes Apr 7, 2022
@MariuszSkamra MariuszSkamra self-requested a review April 8, 2022 09:16
MariuszSkamra
MariuszSkamra previously approved these changes Apr 8, 2022
jhedberg
jhedberg previously approved these changes Apr 8, 2022
asbjornsabo
asbjornsabo previously approved these changes Apr 8, 2022
@mbolivar-nordic
Copy link
Contributor

@szymon-czapracki please rebase

This commits adds IAS for zephyr bluetooth.

Signed-off-by: Szymon Czapracki <[email protected]>
@szymon-czapracki
Copy link
Contributor Author

@szymon-czapracki please rebase

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: API Changes to public APIs area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth area: Samples Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants