agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
520 stars 407 forks source link

[raspberrypi4][kirkstone] Can't reconnect to my CM4 Bluetooth after removing it from whitelist #1135

Closed Piocky closed 1 year ago

Piocky commented 1 year ago

Hello,

I recently moved from dunfell to kirkstone, and I've got a weird behavior that I cannot explain:

Does anyone know what change could have affected this behavior? I'm on the same bluez version, as well as bluez-firmware-rpidistro. Attached are the logs of the failure connection.

BT connection failed.txt

agherzan commented 1 year ago

I haven't seen this. Are you able to reproduce this on other boards? Is RaspberryPi OS also affected?

Piocky commented 1 year ago

It happens on all my CM4 with my new image, I tried to rollback to previous bluez and bluez-firmware versions, but it doesn't change anything.. My guess is that it's somehow related to the Link Key, which should be generated again when a new connection occurs, and then rewrited on dunfell, but not on Kirkstone. I didn't try on Raspbian, so can tell about that.

Piocky commented 1 year ago

@agherzan I just tested it on my dev Raspberry Pi which is on Raspbian, and I have the exact same behavior

agherzan commented 1 year ago

In that case, I would report that to rpi directly. Sounds like a firmware issue.

Piocky commented 1 year ago

I've got some more inputs to provide: I just did some tests using the simple-agent script file provide by bluez, and I get the error only when I choose NoInputNoOutput for the capability of the agent. All the other methods work well. The annoying thing is that my device doesn't have any input or output capability, so I can't use anything else than NoInputNoOutput, but at least I narrowed down the issue.

Piocky commented 1 year ago

I found the fix to this issue: https://github.com/bluez/bluez/issues/428