Skip to content

MTU exchange happens before pairing, causing peripherals to disconnect#10915

Open
fede2cr wants to merge 2 commits intoadafruit:mainfrom
fede2cr:bleio-smp-gap
Open

MTU exchange happens before pairing, causing peripherals to disconnect#10915
fede2cr wants to merge 2 commits intoadafruit:mainfrom
fede2cr:bleio-smp-gap

Conversation

@fede2cr
Copy link
Copy Markdown

@fede2cr fede2cr commented Apr 1, 2026

I haven't tested backporting this against released versions, will try to backport if devs agree it makes sense

I'm building a circuitpython library to talk with commercial "guitar" pedals (Valeton GP-5, Sonicake Smart Box so far) over BLE, to control them with cpy pedalboards. With both I get disconnect errors while trying to pair with them.

This patch changes the order, so that SMP security is initiated before MTU exchange, this allows the devices to pair properly.

Tested only in esp32-s3 qt with these two devices, not sure if it breaks pairing with other BLE devices.

@tannewt
Copy link
Copy Markdown
Member

tannewt commented Apr 1, 2026

Are we violating the bluetooth spec or just confusing these pedals?

@fede2cr
Copy link
Copy Markdown
Author

fede2cr commented Apr 2, 2026

I don't know enough about ble spec to know if it was currently broken. I think this patch can be described as a compatibility workaround for these devices, or as a parity patch, in the sense that the Chocotone which is a similar pedal-control software but based in c++ (arduino esp32 code v3.1.2) does negotiation in this way, which is what I used to understand and sniff why circuitpython wasn't connecting with this devices.

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.

2 participants