-
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 <[email protected]>
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 <[email protected]>
kkasperczyk-no
force-pushed
the
ble_patches
branch
from
April 26, 2024 08:33
09821d2
to
332587a
Compare
pullapprove
bot
requested review from
andy31415,
andyg-apple,
anush-apple,
arkq,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
harimau-qirex,
harsha-rajendran,
hawk248,
hicklin,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
joonhaengHeo,
jtung-apple,
kpschoedel,
ksperling-apple and
lazarkov
April 26, 2024 08:33
pullapprove
bot
requested review from
tima-q,
tobiasgraf,
turon,
vivien-apple,
wiba-nordic,
woody-apple,
younghak-hwang and
yufengwangca
April 26, 2024 08:33
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)
|
kkasperczyk-no
force-pushed
the
ble_patches
branch
from
April 26, 2024 16:51
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
kkasperczyk-no
force-pushed
the
ble_patches
branch
from
May 6, 2024 08:40
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 <[email protected]>
kkasperczyk-no
force-pushed
the
ble_patches
branch
from
May 6, 2024 08:43
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 <[email protected]> * [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 <[email protected]> * [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 <[email protected]> --------- Signed-off-by: Kamil Kasperczyk <[email protected]> Signed-off-by: Marcin Kajor <[email protected]> Co-authored-by: Marcin Kajor <[email protected]>
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 <[email protected]> * [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 <[email protected]> * [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 <[email protected]> --------- Signed-off-by: Kamil Kasperczyk <[email protected]> Signed-off-by: Marcin Kajor <[email protected]> Co-authored-by: Marcin Kajor <[email protected]>
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: