-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Rework Darwin BLE layer #37704
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
Rework Darwin BLE layer #37704
Conversation
|
PR #37704: Size comparison from 06edeee to b41d785 Full report (52 builds for bl602, bl702, bl702l, cc13x4_26x4, efr32, esp32, linux, nrfconnect, nxp, qpg, stm32, telink, tizen)
|
5c87523 to
16a06a9
Compare
|
PR #37704: Size comparison from 28c1d83 to 16a06a9 Full report (74 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
680f873 to
93614d0
Compare
|
PR #37704: Size comparison from b205837 to 93614d0 Full report (74 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
da4d736 to
feb5548
Compare
|
PR #37704: Size comparison from b205837 to feb5548 Full report (3 builds for cc32xx, stm32)
|
feb5548 to
06b4750
Compare
|
PR #37704: Size comparison from b205837 to 06b4750 Full report (74 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
af4c6d4 to
931ac9e
Compare
|
PR #37704: Size comparison from 1612d52 to 931ac9e Full report (74 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
931ac9e to
5579b97
Compare
|
PR #37704: Size comparison from 037f26c to 5579b97 Full report (74 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
5579b97 to
1a2eeb8
Compare
|
PR #37704: Size comparison from 5becd81 to 1a2eeb8 Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
|
PR #37704: Size comparison from 5becd81 to c369f68 Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
|
PR #37704: Size comparison from cf45d5d to 6e16570 Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
6e16570 to
6f90e68
Compare
|
PR #37704: Size comparison from 1eb2421 to 6f90e68 Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Build with Bluetooth enabled in CI and enable Bluetooth mocking for all tests.
This avoids a dangling pointer if the BleConnectionDelegateImpl drops the peripheral from the cache while a client still holds the browser result. Also document what BLE_CONNECTION_OBJECT is on Darwin.
Add assertChipStackLockedByCurrentThread() to CB delegate methods. Use assign instead of unsafe_unretained for non-retainable types. Add comment to BLE Base UUID.
10eed39 to
6fcbc70
Compare
|
PR #37704: Size comparison from b56134c to 6fcbc70 Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
|
Fast-tracking Darwin-only change |
* Rename Ble*Delegate headers to match .mm / class names * Simplify BLEManagerImpl, we don't need to allocate the DelegateImpls separately * Add some tests that exercise BLE code by mocking Core Bluetooth Build with Bluetooth enabled in CI and enable Bluetooth mocking for all tests. * Retain the underlying CBPeripheral in MTRCommissionableBrowserResult This avoids a dangling pointer if the BleConnectionDelegateImpl drops the peripheral from the cache while a client still holds the browser result. Also document what BLE_CONNECTION_OBJECT is on Darwin. * Use the CHIP queue instead of a separate BLE queue * Tidy up BLE delegate headers * Factor out connObj bridge casts into helper functions * Simplify UUID handling, CBUUID does most of it already * Review comments / tidyup Add assertChipStackLockedByCurrentThread() to CB delegate methods. Use assign instead of unsafe_unretained for non-retainable types. Add comment to BLE Base UUID. * Avoid leaks false positive in CoreBluetooth mock * Final round of review comments
* Rename Ble*Delegate headers to match .mm / class names * Simplify BLEManagerImpl, we don't need to allocate the DelegateImpls separately * Add some tests that exercise BLE code by mocking Core Bluetooth Build with Bluetooth enabled in CI and enable Bluetooth mocking for all tests. * Retain the underlying CBPeripheral in MTRCommissionableBrowserResult This avoids a dangling pointer if the BleConnectionDelegateImpl drops the peripheral from the cache while a client still holds the browser result. Also document what BLE_CONNECTION_OBJECT is on Darwin. * Use the CHIP queue instead of a separate BLE queue * Tidy up BLE delegate headers * Factor out connObj bridge casts into helper functions * Simplify UUID handling, CBUUID does most of it already * Review comments / tidyup Add assertChipStackLockedByCurrentThread() to CB delegate methods. Use assign instead of unsafe_unretained for non-retainable types. Add comment to BLE Base UUID. * Avoid leaks false positive in CoreBluetooth mock * Final round of review comments
* Rename Ble*Delegate headers to match .mm / class names * Simplify BLEManagerImpl, we don't need to allocate the DelegateImpls separately * Add some tests that exercise BLE code by mocking Core Bluetooth Build with Bluetooth enabled in CI and enable Bluetooth mocking for all tests. * Retain the underlying CBPeripheral in MTRCommissionableBrowserResult This avoids a dangling pointer if the BleConnectionDelegateImpl drops the peripheral from the cache while a client still holds the browser result. Also document what BLE_CONNECTION_OBJECT is on Darwin. * Use the CHIP queue instead of a separate BLE queue * Tidy up BLE delegate headers * Factor out connObj bridge casts into helper functions * Simplify UUID handling, CBUUID does most of it already * Review comments / tidyup Add assertChipStackLockedByCurrentThread() to CB delegate methods. Use assign instead of unsafe_unretained for non-retainable types. Add comment to BLE Base UUID. * Avoid leaks false positive in CoreBluetooth mock * Final round of review comments
Testing
New automated tests based on mocking CoreBluetooth.
Manual testing with Mac and iOS pairing an M5Stack.