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

ESP32: Move the BLE deinit after BLE connection is closed, post commissioning #26183

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

dhrishi
Copy link
Contributor

@dhrishi dhrishi commented Apr 20, 2023

  • Problem
    The BLE deinit is done in kCommissioningComplete event. In some cases, it might happen that BLE connection close is not received from the commissioner but stil it tries to free BLE memory

  • Solution
    Perform deinit when BLE connection is closed with atleast one fabric being active

  • Tests
    Successful commissioning followed by reclaiming the BLE memory

@github-actions
Copy link

PR #26183: Size comparison from a14e6fb to 6630bd9

Decreases (1 build for cc32xx)
platform target config section a14e6fb 6630bd9 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330829 20330828 -1 -0.0
Full report (1 build for cc32xx)
platform target config section a14e6fb 6630bd9 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330828 -1 -0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@dhrishi dhrishi force-pushed the esp32/fix_ble_deinit branch 2 times, most recently from ea9bb8a to e7fd721 Compare April 20, 2023 16:10
@github-actions
Copy link

PR #26183: Size comparison from a14e6fb to e7fd721

Full report (1 build for cc32xx)
platform target config section a14e6fb e7fd721 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330829 0 0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@dhrishi dhrishi force-pushed the esp32/fix_ble_deinit branch from 7b7782a to 06d8373 Compare April 21, 2023 08:25
@github-actions
Copy link

PR #26183: Size comparison from f3f7ecd to 06d8373

Decreases (1 build for cc32xx)
platform target config section f3f7ecd 06d8373 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330830 20330829 -1 -0.0
Full report (1 build for cc32xx)
platform target config section f3f7ecd 06d8373 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330830 20330829 -1 -0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@dhrishi
Copy link
Contributor Author

dhrishi commented Apr 24, 2023

@bzbarsky-apple @andy31415 Can we merge this?

@bzbarsky-apple
Copy link
Contributor

@dhrishi There are unresolved conversations.

@dhrishi
Copy link
Contributor Author

dhrishi commented Apr 25, 2023

@dhrishi There are unresolved conversations.

I've resolved the same. It is the restyler that made the change. If undone, the CI fails as mentioned above

@bzbarsky-apple bzbarsky-apple merged commit c2a28c8 into project-chip:master Apr 25, 2023
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