Skip to content

hci: reply Pairing Not Supported to SMP requests - #535

Open
deadprogram wants to merge 1 commit into
hci-foundationsfrom
hci-smp-not-supported
Open

deadprogram wants to merge 1 commit into
hci-foundationsfrom
hci-smp-not-supported

Conversation

@deadprogram

@deadprogram deadprogram commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

This builds on #532, so the base is its branch. GitHub moves the base when #532 merges. It does not need #534.

The HCI stack dropped every packet on the SMP channel (CID 0x0006). A central that sent a Pairing Request, or a peripheral that sent a Security Request, waited for the 30 s SMP timeout.

The stack now replies with Pairing Failed, reason 0x05 Pairing Not Supported (Core v5.4 Vol 3 Part H section 3.5.5). Other SMP codes are still ignored.

This is the first step toward Just Works pairing on HCI.

Testing:

  • unit tests for both requests and for codes that are ignored
  • builds for pico-w and nano-rp2040
$ tinygo flash -target=pico-w -size short ./examples/heartrate
   code    data     bss |   flash     ram
 388000    4924    6992 |  392924   11916

$ bluetoothctl 
Waiting to connect to bluetoothd...[bluetooth]# hci0 new_settings: powered bondable ssp br/edr le secure-conn cis-central cis-peripheral 
[bluetooth]# Agent registered
[bluetooth]# [CHG] Controller E4:C7:67:65:0E:4A Pairable: yes
[bluetooth]# scan on
[bluetooth]# SetDiscoveryFilter success
[bluetooth]# Discovery started
[bluetooth]# [CHG] Controller E4:C7:67:65:0E:4A Discovering: yes
[bluetooth]# [NEW] Device 43:43:A2:12:1F:AC Go HRS
[bluetooth]# pair 43:43:A2:12:1F:AC 
Attempting to pair with 43:43:A2:12:1F:AC
[CHG] Device 43:43:A2:12:1F:AC Connected: yes
[Go HRS]# Failed to pair: org.bluez.Error.AuthenticationFailed

@deadprogram
deadprogram added this pull request to stack #533 December 1, 2026 12:41
@deadprogram
deadprogram force-pushed the hci-smp-not-supported branch from 95e3ed0 to 4bd6ce0 Compare December 1, 2026 12:43
A Pairing Request or Security Request on the security channel was dropped,
so the peer waited for the 30 s SMP timeout. Reply with Pairing Failed and
reason Pairing Not Supported.
@deadprogram
deadprogram force-pushed the hci-smp-not-supported branch 2 times, most recently from 7954d82 to 4bd6ce0 Compare December 1, 2026 12:53
@deadprogram
deadprogram removed this pull request from stack #533 December 1, 2026 12:54
@deadprogram
deadprogram changed the base branch from nrf-data-length to hci-foundations December 1, 2026 12:55
@deadprogram
deadprogram force-pushed the hci-smp-not-supported branch from 4bd6ce0 to 7954d82 Compare December 1, 2026 12:55
@deadprogram
deadprogram added this pull request to stack #536 December 1, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant