-
Notifications
You must be signed in to change notification settings - Fork 1.1k
btstack: a2dp connection fails with 0x66 since 1.5.1 #1457
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
Comments
The error is I'm not aware of any changes that would be relevant for this demo in BTstack since the initial release. Could you try to put your speaker into 'pairing' mode before starting the a2dp_source_demo? |
I have tried it in pairing mode as well but it gives the same result, though I only tried with the same speaker. Commenting out this line is enough to fix it. I'm not sure why changing the address could matter for the speaker. |
Interesting find.
What addr is used with that line, what is used without?
Can you try to set a different random addresses?
The only incorrect bd addr per se would be all zeroes.
|
The address before the change is I'm assuming there's something besides the address by which the speaker can identify the device, and now since the address changed but the other kind of ID did not, the speaker suspects foul play? (I don't know anything about bluetooth, just guessing) |
The speaker probably only recognizes the Pico W only by the BD ADDR, but I got another idea. This line changes the address of the Pico W, but it's stored link keys don't change. if you connect to the speaker again, it will use the stored link key but the speaker doesn't have one for the new address. Please try this:
@peterharperuk what's the easiest way for people to erase BTstack's TLV? |
I just zeroed the whole flash and it fixed my problem. Thanks! |
@peterharperuk short summary: for those with an earlier version of the Pico SDK where the default (43:43:A2:12:1F:AC) was used and that did update, the TLV / Flash contains link keys for bonded devices, but these devices don't recognize us and cannot lookup their link key. Any idea how to document this? Zeroeing the whole flash obviously works. |
Can't btstack detect this scenario somehow and automatically forget the key? Or would that have other undesirable side effects?
|
For the desktop ports, where you could use multiple USB Bluetooth dongles, all bonding information is stored per BD_ADDR, so this cannot happen. For an embedded device, the Bluetooth address can/should/will never change on it's own. It won't happen again on the Pico W after the commit you've pointed out, as it will now always have a valid BD_ADDR. Interesting idea to reset it. But to get it right, we would need to store the BD ADDR in the TLV and can then reset TLV if it changes. However, we should not reset TLV if there's no stored BD_ADDR to compare against it - to not break working systems. |
We should probably have put something in the release notes. But it's a bit late for that now. |
I'll add a note to the readme about clearing your flash if you have issues. |
Trying to run
a2dp_source_demo
from pico-examples, I get this:The example used to work on
1.5.0
, reverting d9c88c6 seems to fix it.The text was updated successfully, but these errors were encountered: