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

[Android] Fallback to BLE Notification when Indication unsupported #25444

Merged
merged 2 commits into from
Mar 3, 2023
Merged

[Android] Fallback to BLE Notification when Indication unsupported #25444

merged 2 commits into from
Mar 3, 2023

Conversation

swan-amazon
Copy link
Contributor

To support devices based on older revisions of the SDK that did not include the GATT Server Characteristic property change (from Notification to Indication), the GATT Characteristic properties are queried to determine if Indication and/or Notification is supported. When available, Indication is preferred.

Fixes #25442

Example logs from device supporting only Notifications:

6.654011000; ATT Write Transaction (Client Characteristic Configuration: Notifications=Enabled, Indications=Disabled)                        ; 01 00; 
6.654011000;   ATT Write Request Packet (Client Characteristic Configuration: Notifications=Enabled, Indications=Disabled)                   ; 12 11 00 01 00; 
6.654011000;     L2CAP SDU (Basic, Service=ATT)                                                                                              ; 12 11 00 01 00; 
6.654011000;       L2CAP B-Frame (Service=ATT, ACL-U Flow Events)                                                                            ; 05 00 04 00 12 11 00 01 00; 
6.652025000;         HCI Number Of Completed Packets (Connection=0x0002, Packets=1)                                                          ; 13 05 01 02 00 01 00; 
6.654011000;         HCI ACL Data OUT                                                                                                        ; 02 00 09 00 05 00 04 00 12 11 00 01 00; 
6.666372000;   ATT Write Response Packet                                                                                                     ; 13; 
6.666372000;     L2CAP SDU (Basic, Service=ATT)                                                                                              ; 13; 
6.666372000;       L2CAP B-Frame (Service=ATT)                                                                                               ; 01 00 04 00 13; 
6.666372000;         HCI ACL Data IN                                                                                                         ; 02 20 05 00 01 00 04 00 13; 

Example logs from device supporting Indications:

47.677276000; ATT Write Transaction (Client Characteristic Configuration: Notifications=Disabled, Indications=Enabled)                        ; 02 00; 
47.677276000;   ATT Write Request Packet (Client Characteristic Configuration: Notifications=Disabled, Indications=Enabled)                   ; 12 0F 00 02 00; 
47.677276000;     L2CAP SDU (Basic, Service=ATT)                                                                                              ; 12 0F 00 02 00; 
47.677276000;       L2CAP B-Frame (Service=ATT, ACL-U Flow Events)                                                                            ; 05 00 04 00 12 0F 00 02 00; 
47.661667000;         HCI Number Of Completed Packets (Connection=0x0002, Packets=1)                                                          ; 13 05 01 02 00 01 00; 
47.677276000;         HCI ACL Data OUT                                                                                                        ; 02 00 09 00 05 00 04 00 12 0F 00 02 00; 
47.706433000;   ATT Write Response Packet                                                                                                     ; 13; 
47.706433000;     L2CAP SDU (Basic, Service=ATT)                                                                                              ; 13; 
47.706433000;       L2CAP B-Frame (Service=ATT)                                                                                               ; 01 00 04 00 13; 
47.706433000;         HCI ACL Data IN                                                                                                         ; 02 20 05 00 01 00 04 00 13; 

device-notifications-enabled-patch-export.txt

device-notifications-enabled-patch

rpi-indications-enabled-patch-export.txt

rpi-indications-enabled-patch

To support devices based on older revisions of the SDK that did not
include the GATT Server Characteristic property change (from
Notification to Indication), the GATT Characteristic properties are
queried to determine if Indication and/or Notification is supported.
When available, Indication is preferred.
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

PR #25444: Size comparison from be20fb0 to 1f5c3a6

Increases (1 build for cc32xx)
platform target config section be20fb0 1f5c3a6 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20262927 20262928 1 0.0
Full report (1 build for cc32xx)
platform target config section be20fb0 1f5c3a6 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643465 643465 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930213 930213 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300024 300024 0 0.0
.debug_info 20262927 20262928 1 0.0
.debug_line 2657820 2657820 0 0.0
.debug_loc 2800026 2800026 0 0.0
.debug_ranges 282240 282240 0 0.0
.debug_str 3023883 3023883 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 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 378514 378514 0 0.0
.symtab 256560 256560 0 0.0
.text 535412 535412 0 0.0

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

PR #25444: Size comparison from af3fdc5 to 43f3cfd

Full report (1 build for cc32xx)
platform target config section af3fdc5 43f3cfd change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643465 643465 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930213 930213 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300024 300024 0 0.0
.debug_info 20262928 20262928 0 0.0
.debug_line 2657820 2657820 0 0.0
.debug_loc 2800026 2800026 0 0.0
.debug_ranges 282240 282240 0 0.0
.debug_str 3023883 3023883 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 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 378514 378514 0 0.0
.symtab 256560 256560 0 0.0
.text 535412 535412 0 0.0

@andy31415 andy31415 merged commit 7bf8ceb into project-chip:master Mar 3, 2023
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…roject-chip#25444)

To support devices based on older revisions of the SDK that did not
include the GATT Server Characteristic property change (from
Notification to Indication), the GATT Characteristic properties are
queried to determine if Indication and/or Notification is supported.
When available, Indication is preferred.
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.

[Platform] Android failed to commission when BLE Indication not supported by Device
4 participants