Skip to content
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

[Linux] Dispatch BlueZ signals in BluezObjectManager #32709

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Mar 26, 2024

Problem

BlueZ signals dispatching is done in BluezEndpoint and ChipDeviceScanner. This can be simplified by moving BlueZ management related logic to the BluezObjectManager class. Also, this way we can handle (in the future) adapter added/removed events.

Changes

  • Dispatch BlueZ signals in BluezObjectManager
  • Notification facility for BLE adapter added/removed for future use (it will be used in the follow-up PR)

Testing

Locally tested BLE commissioning on Linux with chip-tool and lighting app.

Copy link

github-actions bot commented Mar 26, 2024

PR #32709: Size comparison from d26d2e5 to a94ae30

Increases above 0.2%:

platform target config section d26d2e5 a94ae30 change % change
linux air-purifier-app debug (read only) 2624373 2637717 13344 0.5
.data.rel.ro 74376 74536 160 0.2
.text 2261957 2275093 13136 0.6
all-clusters-app debug (read only) 5930521 5943737 13216 0.2
.text 5147459 5160579 13120 0.3
all-clusters-minimal-app debug (read only) 5211369 5224569 13200 0.3
.text 4687939 4701043 13104 0.3
bridge-app debug (read only) 4605769 4618985 13216 0.3
.text 4156147 4169267 13120 0.3
lighting-app debug+rpc+ui (read only) 5529313 5542529 13216 0.2
.text 4928339 4941459 13120 0.3
lock-app debug (read only) 4673049 4686265 13216 0.3
.text 4206179 4219299 13120 0.3
shell debug (read only) 2898513 2912057 13544 0.5
.data.rel.ro 86528 86704 176 0.2
.text 2539554 2552738 13184 0.5
tv-app debug (read only) 5720249 5733465 13216 0.2
.text 5187811 5200899 13088 0.3
Increases (11 builds for linux)
platform target config section d26d2e5 a94ae30 change % change
linux air-purifier-app debug (read only) 2624373 2637717 13344 0.5
(read/write) 129112 129336 224 0.2
.bss 46544 46608 64 0.1
.data.rel.ro 74376 74536 160 0.2
.text 2261957 2275093 13136 0.6
all-clusters-app debug (read only) 5930521 5943737 13216 0.2
(read/write) 480552 480776 224 0.0
.bss 134848 134912 64 0.0
.data.rel.ro 333720 333896 176 0.1
.text 5147459 5160579 13120 0.3
all-clusters-minimal-app debug (read only) 5211369 5224569 13200 0.3
(read/write) 236504 236728 224 0.1
.bss 127680 127744 64 0.1
.data.rel.ro 97304 97480 176 0.2
.text 4687939 4701043 13104 0.3
bridge-app debug (read only) 4605769 4618985 13216 0.3
(read/write) 217416 217608 192 0.1
.bss 118208 118272 64 0.1
.data.rel.ro 86240 86400 160 0.2
.text 4156147 4169267 13120 0.3
chip-tool debug (read only) 12047729 12060961 13232 0.1
(read/write) 521664 521856 192 0.0
.bss 94424 94488 64 0.1
.data.rel.ro 414872 415040 168 0.0
.rodata 448761 448793 32 0.0
.text 10892963 10906067 13104 0.1
chip-tool-ipv6only arm64 (read only) 11368100 11384212 16112 0.1
(read/write) 586080 586432 352 0.1
.bss 103528 103608 80 0.1
.data.rel.ro 454648 454816 168 0.0
.got 16944 16968 24 0.1
.text 10135144 10151016 15872 0.2
lighting-app debug+rpc+ui (read only) 5529313 5542529 13216 0.2
(read/write) 226144 226368 224 0.1
.bss 119144 119208 64 0.1
.data.rel.ro 94608 94784 176 0.2
.text 4928339 4941459 13120 0.3
lock-app debug (read only) 4673049 4686265 13216 0.3
(read/write) 204968 205192 224 0.1
.bss 113632 113696 64 0.1
.data.rel.ro 80488 80648 160 0.2
.text 4206179 4219299 13120 0.3
shell debug (read only) 2898513 2912057 13544 0.5
(read/write) 156504 156728 224 0.1
.bss 62768 62832 64 0.1
.data.rel.ro 86528 86704 176 0.2
.text 2539554 2552738 13184 0.5
tv-app debug (read only) 5720249 5733465 13216 0.2
(read/write) 352768 352992 224 0.1
.bss 244400 244464 64 0.0
.data.rel.ro 94520 94680 160 0.2
.rodata 290122 290154 32 0.0
.text 5187811 5200899 13088 0.3
tv-casting-app debug (read only) 9872401 9885593 13192 0.1
(read/write) 340448 340704 256 0.1
.bss 156272 156336 64 0.0
.data.rel.ro 174272 174464 192 0.1
.text 9023779 9036883 13104 0.1
Decreases (10 builds for efr32, linux)
platform target config section d26d2e5 a94ae30 change % change
efr32 lighting-app BRD4161A+rs9116 (read/write) 934688 934680 -8 -0.0
.text 735284 735276 -8 -0.0
linux air-purifier-app debug .got 4536 4528 -8 -0.2
all-clusters-app debug .got 5352 5336 -16 -0.3
all-clusters-minimal-app debug .got 5272 5256 -16 -0.3
bridge-app debug .got 5240 5224 -16 -0.3
chip-tool debug .got 5760 5744 -16 -0.3
lighting-app debug+rpc+ui .got 5880 5864 -16 -0.3
lock-app debug .got 5192 5176 -16 -0.3
tv-app debug .got 5488 5472 -16 -0.3
tv-casting-app debug .got 5064 5048 -16 -0.3
Full report (56 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32)
platform target config section d26d2e5 a94ae30 change % change
bl602 lighting-app bl602 (read/write) 1438534 1438534 0 0.0
.bss 85360 85360 0 0.0
.data 9504 9504 0 0.0
.rodata 158488 158488 0 0.0
.text 1104536 1104536 0 0.0
bl602+mfd (read/write) 1452958 1452958 0 0.0
.bss 85520 85520 0 0.0
.data 9480 9480 0 0.0
.rodata 157448 157448 0 0.0
.text 1119854 1119854 0 0.0
bl602+rpc (read/write) 1486182 1486182 0 0.0
.bss 93392 93392 0 0.0
.data 9880 9880 0 0.0
.rodata 166056 166056 0 0.0
.text 1136182 1136182 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1202995 1202995 0 0.0
.bss 11133 11133 0 0.0
.data 3688 3688 0 0.0
.rodata 107840 107840 0 0.0
.text 973458 973458 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1214063 1214063 0 0.0
.bss 11309 11309 0 0.0
.data 3664 3664 0 0.0
.rodata 106780 106780 0 0.0
.text 985468 985468 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1294743 1294743 0 0.0
.bss 19613 19613 0 0.0
.data 4224 4224 0 0.0
.rodata 123212 123212 0 0.0
.text 1048422 1048422 0 0.0
bl706-eth (read/write) 1020673 1020673 0 0.0
.bss 23708 23708 0 0.0
.data 3264 3264 0 0.0
.rodata 101172 101172 0 0.0
.text 764552 764552 0 0.0
bl706-wifi (read/write) 1255398 1255398 0 0.0
.bss 10577 10577 0 0.0
.data 3696 3696 0 0.0
.rodata 122172 122172 0 0.0
.text 996522 996522 0 0.0
bl702l lighting-app bl702l (read only) 512 512 0 0.0
(read/write) 1172580 1172580 0 0.0
.bss 16328 16328 0 0.0
.data 5048 5048 0 0.0
.rodata 101844 101844 0 0.0
.text 966568 966568 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1183988 1183988 0 0.0
.bss 16504 16504 0 0.0
.data 5032 5032 0 0.0
.rodata 100784 100784 0 0.0
.text 978890 978890 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 774436 774436 0 0.0
(read/write) 168648 168648 0 0.0
.bss 90636 90636 0 0.0
.data 3568 3568 0 0.0
.rodata 81852 81852 0 0.0
.text 692316 692316 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 790844 790844 0 0.0
(read/write) 178896 178896 0 0.0
.bss 100884 100884 0 0.0
.data 3568 3568 0 0.0
.rodata 76028 76028 0 0.0
.text 714548 714548 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 779500 779500 0 0.0
(read/write) 173336 173336 0 0.0
.bss 95324 95324 0 0.0
.data 3568 3568 0 0.0
.rodata 102788 102788 0 0.0
.text 676444 676444 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 731692 731692 0 0.0
(read/write) 167616 167616 0 0.0
.bss 89368 89368 0 0.0
.data 3560 3560 0 0.0
.rodata 77516 77516 0 0.0
.text 653908 653908 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 717284 717284 0 0.0
(read/write) 167824 167824 0 0.0
.bss 89592 89592 0 0.0
.data 3552 3552 0 0.0
.rodata 73292 73292 0 0.0
.text 643724 643724 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 584026 584026 0 0.0
(read/write) 208000 208000 0 0.0
.bss 201228 201228 0 0.0
.data 1648 1648 0 0.0
.rodata 86666 86666 0 0.0
.text 495236 495236 0 0.0
lock CC3235SF_LAUNCHXL (read only) 629282 629282 0 0.0
(read/write) 208344 208344 0 0.0
.bss 201720 201720 0 0.0
.data 1504 1504 0 0.0
.rodata 107122 107122 0 0.0
.text 520036 520036 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 569619 569619 0 0.0
.app_xip_area 459357 459357 0 0.0
.bss 65088 65088 0 0.0
.data 752 752 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 552259 552259 0 0.0
.app_xip_area 437237 437237 0 0.0
.bss 69840 69840 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 572387 572387 0 0.0
.app_xip_area 463629 463629 0 0.0
.bss 63624 63624 0 0.0
.data 712 712 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 565331 565331 0 0.0
.app_xip_area 453293 453293 0 0.0
.bss 66824 66824 0 0.0
.data 792 792 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 934688 934680 -8 -0.0
.bss 197976 197976 0 0.0
.data 1404 1404 0 0.0
.text 735284 735276 -8 -0.0
BRD4187C (read/write) 1111448 1111448 0 0.0
.bss 195184 195184 0 0.0
.data 3424 3424 0 0.0
.text 912820 912820 0 0.0
lock-app BRD4161A+wf200 (read/write) 1123820 1123820 0 0.0
.bss 186804 186804 0 0.0
.data 2808 2808 0 0.0
.text 934188 934188 0 0.0
window-app BRD4187C (read/write) 1158608 1158608 0 0.0
.bss 167432 167432 0 0.0
.data 3336 3336 0 0.0
.text 987820 987820 0 0.0
esp32 all-clusters-app c3devkit (read only) 1211974 1211974 0 0.0
(read/write) 1749792 1749792 0 0.0
.dram0.bss 74328 74328 0 0.0
.dram0.data 13628 13628 0 0.0
.flash.rodata 252304 252304 0 0.0
.flash.text 1211974 1211974 0 0.0
.iram0.text 75530 75530 0 0.0
m5stack (read only) 1254183 1254183 0 0.0
(read/write) 536392 536392 0 0.0
.dram0.bss 81264 81264 0 0.0
.dram0.data 35180 35180 0 0.0
.flash.rodata 284028 284028 0 0.0
.flash.text 1248019 1248019 0 0.0
.iram0.text 125403 125403 0 0.0
k32w contact k32w0+release (read only) 605280 605280 0 0.0
(read/write) 79480 79480 0 0.0
.bss 67308 67308 0 0.0
.data 2188 2188 0 0.0
.text 604744 604744 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 700188 700188 0 0.0
.bss 71156 71156 0 0.0
.data 2856 2856 0 0.0
.text 586792 586792 0 0.0
light k32w0+release (read only) 607240 607240 0 0.0
(read/write) 79340 79340 0 0.0
.bss 67164 67164 0 0.0
.data 2192 2192 0 0.0
.text 606704 606704 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 791608 791608 0 0.0
.bss 80636 80636 0 0.0
.data 2056 2056 0 0.0
.text 669552 669552 0 0.0
linux air-purifier-app debug (read only) 2624373 2637717 13344 0.5
(read/write) 129112 129336 224 0.2
.bss 46544 46608 64 0.1
.data 2272 2272 0 0.0
.data.rel.ro 74376 74536 160 0.2
.dynamic 608 608 0 0.0
.got 4536 4528 -8 -0.2
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 184720 184720 0 0.0
.text 2261957 2275093 13136 0.6
all-clusters-app debug (read only) 5930521 5943737 13216 0.2
(read/write) 480552 480776 224 0.0
.bss 134848 134912 64 0.0
.data 4560 4560 0 0.0
.data.rel.ro 333720 333896 176 0.1
.dynamic 624 624 0 0.0
.got 5352 5336 -16 -0.3
.init 27 27 0 0.0
.init_array 1408 1408 0 0.0
.rodata 349456 349456 0 0.0
.text 5147459 5160579 13120 0.3
all-clusters-minimal-app debug (read only) 5211369 5224569 13200 0.3
(read/write) 236504 236728 224 0.1
.bss 127680 127744 64 0.1
.data 4464 4464 0 0.0
.data.rel.ro 97304 97480 176 0.2
.dynamic 624 624 0 0.0
.got 5272 5256 -16 -0.3
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 288490 288490 0 0.0
.text 4687939 4701043 13104 0.3
bridge-app debug (read only) 4605769 4618985 13216 0.3
(read/write) 217416 217608 192 0.1
.bss 118208 118272 64 0.1
.data 6240 6240 0 0.0
.data.rel.ro 86240 86400 160 0.2
.dynamic 624 624 0 0.0
.got 5240 5224 -16 -0.3
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 229098 229098 0 0.0
.text 4156147 4169267 13120 0.3
chip-tool debug (read only) 12047729 12060961 13232 0.1
(read/write) 521664 521856 192 0.0
.bss 94424 94488 64 0.1
.data 5122 5122 0 0.0
.data.rel.ro 414872 415040 168 0.0
.dynamic 624 624 0 0.0
.got 5760 5744 -16 -0.3
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 448761 448793 32 0.0
.text 10892963 10906067 13104 0.1
chip-tool-ipv6only arm64 (read only) 11368100 11384212 16112 0.1
(read/write) 586080 586432 352 0.1
.bss 103528 103608 80 0.1
.data 4512 4512 0 0.0
.data.rel.ro 454648 454816 168 0.0
.dynamic 512 512 0 0.0
.got 16944 16968 24 0.1
.init 24 24 0 0.0
.init_array 264 264 0 0.0
.rodata 354564 354564 0 0.0
.text 10135144 10151016 15872 0.2
lighting-app debug+rpc+ui (read only) 5529313 5542529 13216 0.2
(read/write) 226144 226368 224 0.1
.bss 119144 119208 64 0.1
.data 4864 4864 0 0.0
.data.rel.ro 94608 94784 176 0.2
.dynamic 672 672 0 0.0
.got 5880 5864 -16 -0.3
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 354068 354068 0 0.0
.text 4928339 4941459 13120 0.3
lock-app debug (read only) 4673049 4686265 13216 0.3
(read/write) 204968 205192 224 0.1
.bss 113632 113696 64 0.1
.data 4160 4160 0 0.0
.data.rel.ro 80488 80648 160 0.2
.dynamic 624 624 0 0.0
.got 5192 5176 -16 -0.3
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 254986 254986 0 0.0
.text 4206179 4219299 13120 0.3
ota-provider-app debug (read only) 4300569 4300569 0 0.0
(read/write) 193464 193464 0 0.0
.bss 113312 113312 0 0.0
.data 4368 4368 0 0.0
.data.rel.ro 69872 69872 0 0.0
.dynamic 624 624 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 208170 208170 0 0.0
.text 3899091 3899091 0 0.0
ota-requestor-app debug (read only) 4430009 4430009 0 0.0
(read/write) 197832 197832 0 0.0
.bss 114208 114208 0 0.0
.data 4768 4768 0 0.0
.data.rel.ro 72976 72976 0 0.0
.dynamic 624 624 0 0.0
.got 4472 4472 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 214282 214282 0 0.0
.text 4017875 4017875 0 0.0
shell debug (read only) 2898513 2912057 13544 0.5
(read/write) 156504 156728 224 0.1
.bss 62768 62832 64 0.1
.data 1424 1424 0 0.0
.data.rel.ro 86528 86704 176 0.2
.dynamic 592 592 0 0.0
.got 4064 4064 0 0.0
.init 27 27 0 0.0
.init_array 1088 1088 0 0.0
.rodata 185408 185408 0 0.0
.text 2539554 2552738 13184 0.5
thermostat-no-ble arm64 (read only) 4418868 4418868 0 0.0
(read/write) 244072 244072 0 0.0
.bss 121832 121832 0 0.0
.data 3392 3392 0 0.0
.data.rel.ro 103680 103680 0 0.0
.dynamic 512 512 0 0.0
.got 8616 8616 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 159500 159500 0 0.0
.text 3924536 3924536 0 0.0
tv-app debug (read only) 5720249 5733465 13216 0.2
(read/write) 352768 352992 224 0.1
.bss 244400 244464 64 0.0
.data 6560 6560 0 0.0
.data.rel.ro 94520 94680 160 0.2
.dynamic 624 624 0 0.0
.got 5488 5472 -16 -0.3
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 290122 290154 32 0.0
.text 5187811 5200899 13088 0.3
tv-casting-app debug (read only) 9872401 9885593 13192 0.1
(read/write) 340448 340704 256 0.1
.bss 156272 156336 64 0.0
.data 3008 3008 0 0.0
.data.rel.ro 174272 174464 192 0.1
.dynamic 624 624 0 0.0
.got 5064 5048 -16 -0.3
.init 27 27 0 0.0
.init_array 1192 1192 0 0.0
.rodata 382648 382648 0 0.0
.text 9023779 9036883 13104 0.1
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2532808 2532808 0 0.0
.bss 220480 220480 0 0.0
.data 5216 5216 0 0.0
.text 1495492 1495492 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1062884 1062884 0 0.0
bss 133119 133119 0 0.0
rodata 102612 102612 0 0.0
text 779948 779948 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1224332 1224332 0 0.0
bss 127155 127155 0 0.0
rodata 151200 151200 0 0.0
text 795956 795956 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1010460 1010460 0 0.0
bss 131977 131977 0 0.0
rodata 89876 89876 0 0.0
text 741284 741284 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 834416 834416 0 0.0
(read/write) 1797500 1797500 0 0.0
.bss 196244 196244 0 0.0
.data 2680 2680 0 0.0
.text 1590188 1590188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837568 837568 0 0.0
(read/write) 1719556 1719556 0 0.0
.bss 193124 193124 0 0.0
.data 2648 2648 0 0.0
.text 1515396 1515396 0 0.0
light cy8ckit_062s2_43012 (read only) 844296 844296 0 0.0
(read/write) 1638660 1638660 0 0.0
.bss 186588 186588 0 0.0
.data 2456 2456 0 0.0
.text 1441228 1441228 0 0.0
lock cy8ckit_062s2_43012 (read only) 817136 817136 0 0.0
(read/write) 1668300 1668300 0 0.0
.bss 213748 213748 0 0.0
.data 2456 2456 0 0.0
.text 1443708 1443708 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1130416 1130416 0 0.0
.bss 102488 102488 0 0.0
.data 836 836 0 0.0
.text 642800 642800 0 0.0
lock-app qpg6105+debug (read/write) 1090392 1090392 0 0.0
.bss 97232 97232 0 0.0
.data 856 856 0 0.0
.text 602772 602772 0 0.0
stm32 light STM32WB5MM-DK (read/write) 601637 601637 0 0.0
.bss 128352 128352 0 0.0
.data 676 676 0 0.0
.rodata 79732 79732 0 0.0
.text 383144 383144 0 0.0

@mergify mergify bot merged commit 6f7995b into project-chip:master Mar 27, 2024
68 checks passed
@arkq arkq deleted the bluez-object-manager-signals branch March 27, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants