I have a weird problem with Av96’s bluetooth when using bluetoothctl suite.
My setup looks as follows:
- PC running Linux, kernel 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64
- Avenger96 running Linux, kernel:
Debian: Avenger96 4.19.9 #1 SMP PREEMPT Thu Dec 13 08:16:23 UTC 2018
Poky: stm32mp1-av96 5.4.56 #1 SMP PREEMPT Wed Aug 5 07:59:52 UTC 2020
Now, on both PC and Av96 I run bluetoothctl and I can see devices appearing during scan. I can pair and connect my PC with other devices such as tablet. The connection stays on-line when established.
While pairing and connecting to Avenger however, I can see devices being connected, paired but the connection is established only for a short moment. After that I see messages as seen below:
[bluetooth]# pair CC:C0:79:B3:E4:0C Attempting to pair with CC:C0:79:B3:E4:0C [CHG] Device CC:C0:79:B3:E4:0C Connected: yes Request confirmation [agent] Confirm passkey 975315 (yes/no): yes [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device CC:C0:79:B3:E4:0C ServicesResolved: yes [CHG] Device CC:C0:79:B3:E4:0C Paired: yes Pairing successful [CHG] Device CC:C0:79:B3:E4:0C ServicesResolved: no [CHG] Device CC:C0:79:B3:E4:0C Connected: no
Using hcidump I’m able to see that the disconnect even comes from the machine that initiated the pairing/connection (if tried from PC then it’s PC, if from Av96, it’s the latter). On the other end of this connection I can see request to disconnect from the remote host.
Kernel log shows only this message:
Bluetooth: hci0: ACL packet for unknown connection handle 256
Doesn’t seem to be relevant. Maybe some garbage still being sent after connection is closed on the localhost side.
This behavior can be observed on both, the reference Debian Buster as well as when I build distro using ST and DH meta-layers.
Finally, I also tried to test the connection using RFCOMM and the results were exactly the opposite. I could establish the connection and transfer data without any trouble. Still, not using bluetoothctl is not the solution.
I wonder if anybody has encountered similar problem. I will be grateful for any help or new idea.