linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* unexpected SMP command errors with controller ATS2851
@ 2023-03-24  3:17 Raul Cheleguini
  2023-03-31  5:50 ` Christopher Snowhill
  2023-04-27 18:49 ` Raul Cheleguini
  0 siblings, 2 replies; 5+ messages in thread
From: Raul Cheleguini @ 2023-03-24  3:17 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: marcel, johan.hedberg, luiz.dentz

Hi everyone,

I'm trying to understand and narrow down a pairing problem with this
controller that I'm trying to make it work in Linux.

When pairing, the negotiation does not complete and the system logs
the following messages:

Bluetooth: hci0: unexpected SMP command 0x08 from dd:5e:b9:fe:49:3f
Bluetooth: hci0: unexpected SMP command 0x09 from dd:5e:b9:fe:49:3f
Bluetooth: hci0: Opcode 0x200d failed: -110
Bluetooth: hci0: request failed to create LE connection: err -110

(dd:5e:b9:fe:49:3f is my bluetooth mouse)

After some debug I found the condition that refuses the SMP commands and
drops them:

net/bluetooth/smp.c in smp_sig_channel()

if (smp && !test_and_clear_bit(code, &smp->allow_cmd))
    goto drop;

The interesting part is that if I disable this condition with comments,
the pairing process manages to complete and my bluetooth mouse starts to work
(even with some errors in logs):

Bluetooth: hci0: Opcode 0x200d failed: -110
Bluetooth: hci0: request failed to create LE connection: err -110
hid: raw HID events driver (C) Jiri Kosina
input: Logi M650 L Mouse as /devices/virtual/misc/uhid/0005:046D:B02A.0001/
input/input6
hid-generic 0005:046D:B02A.0001: input,hidraw0: BLUETOOTH HID v0.09 Mouse
[Logi M650 L] on f4:4e:fc:c0:de:5e
Bluetooth: hci0: Opcode 0x200d failed: -110
Bluetooth: hci0: request failed to create LE connection: err -110

Logs from bluetoothd receiving the mouse data events:

bluetoothd[576]: src/shared/att.c:can_read_data() (chan 0x55f8ad8db380)
ATT PDU received: 0x1b
bluetoothd[576]: src/shared/att.c:can_read_data() (chan 0x55f8ad8db380)
ATT PDU received: 0x1b
bluetoothd[576]: src/shared/att.c:can_read_data() (chan 0x55f8ad8db380)
ATT PDU received: 0x1b

I kindly ask guidance on what could be done in these cases or any hints
how to further debug this issue.

For context, the controller works in other systems using generic drivers.

Regards,
Raul.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-27 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24  3:17 unexpected SMP command errors with controller ATS2851 Raul Cheleguini
2023-03-31  5:50 ` Christopher Snowhill
2023-04-13 13:54   ` Raul Cheleguini
2023-04-15 12:01     ` Christopher Snowhill
2023-04-27 18:49 ` Raul Cheleguini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).