-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[zephyr] Added several improvements to the BLEMgr implementation #33189
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently the Zephyr BLE Manager rotates Bluetooth addresses on every boot and it does this by creating new Bluetooth identity. Because of that the Zephyr stack does not create default Bluetooth ID, which is required e.g. for the bonding purposes. Added creating two separate Bluetooth identities - for the Matter service advertising and for the bonding purposes. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
Matter BLEManager handles all BT connect and disconnect callbacks no matter if these are Matter related ones or not. It collides with other not Matter-related services that trigger Matter CHIPoBLE service advertising changes. Added role check that allows to at least drop all callbacks related to BT central role. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
09821d2
to
332587a
Compare
markaj-nordic
approved these changes
Apr 26, 2024
PR #33189: Size comparison from cfb9404 to 332587a Increases (14 builds for nrfconnect)
Decreases (1 build for efr32)
Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
332587a
to
5a3ce09
Compare
PR #33189: Size comparison from 29cfb7f to 5a3ce09 Increases above 0.2%:
Increases (14 builds for nrfconnect)
Decreases (1 build for efr32)
Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
andy31415
reviewed
Apr 30, 2024
andy31415
reviewed
Apr 30, 2024
5a3ce09
to
e9c4090
Compare
* allow BLE advertising restarts in case of failures * which can be triggered by calling SetBLEAdvertisingEnabled(true) ConnectivityMgr public API from the application code * do not register CHIPoBLE GATT services when the advertising cannot be started * this allows the disconnection handler to filter out non-Matter BLE connections that were terminated * fix possible underflow of connection counters Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
e9c4090
to
610aad0
Compare
PR #33189: Size comparison from 062e063 to 610aad0 Increases above 0.2%:
Increases (14 builds for nrfconnect)
Decreases (2 builds for efr32)
Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
LuDuda
approved these changes
May 6, 2024
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.
Thanks 👍
andy31415
approved these changes
May 7, 2024
kkasperczyk-no
added a commit
to kkasperczyk-no/connectedhomeip
that referenced
this pull request
May 8, 2024
…ject-chip#33189) * [zephyr] Enabled support for bonding in the BLEManager Currently the Zephyr BLE Manager rotates Bluetooth addresses on every boot and it does this by creating new Bluetooth identity. Because of that the Zephyr stack does not create default Bluetooth ID, which is required e.g. for the bonding purposes. Added creating two separate Bluetooth identities - for the Matter service advertising and for the bonding purposes. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> * [zephyr] Added check to drop handling callbacks for BT central Matter BLEManager handles all BT connect and disconnect callbacks no matter if these are Matter related ones or not. It collides with other not Matter-related services that trigger Matter CHIPoBLE service advertising changes. Added role check that allows to at least drop all callbacks related to BT central role. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> * [zephyr]: allow BLE advertising restarts * allow BLE advertising restarts in case of failures * which can be triggered by calling SetBLEAdvertisingEnabled(true) ConnectivityMgr public API from the application code * do not register CHIPoBLE GATT services when the advertising cannot be started * this allows the disconnection handler to filter out non-Matter BLE connections that were terminated * fix possible underflow of connection counters Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no> --------- Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no> Co-authored-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
kkasperczyk-no
added a commit
that referenced
this pull request
May 8, 2024
) * [zephyr] Enabled support for bonding in the BLEManager Currently the Zephyr BLE Manager rotates Bluetooth addresses on every boot and it does this by creating new Bluetooth identity. Because of that the Zephyr stack does not create default Bluetooth ID, which is required e.g. for the bonding purposes. Added creating two separate Bluetooth identities - for the Matter service advertising and for the bonding purposes. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> * [zephyr] Added check to drop handling callbacks for BT central Matter BLEManager handles all BT connect and disconnect callbacks no matter if these are Matter related ones or not. It collides with other not Matter-related services that trigger Matter CHIPoBLE service advertising changes. Added role check that allows to at least drop all callbacks related to BT central role. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> * [zephyr]: allow BLE advertising restarts * allow BLE advertising restarts in case of failures * which can be triggered by calling SetBLEAdvertisingEnabled(true) ConnectivityMgr public API from the application code * do not register CHIPoBLE GATT services when the advertising cannot be started * this allows the disconnection handler to filter out non-Matter BLE connections that were terminated * fix possible underflow of connection counters Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no> --------- Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no> Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no> Co-authored-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
maciejbaczmanski
pushed a commit
to maciejbaczmanski/connectedhomeip
that referenced
this pull request
Jan 16, 2025
…ion (project-chip#33189)" This reverts commit 2211869. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added several improvements to the Zephyr BLEMgr, that allows to: