Linux bluetooth development
 help / color / mirror / Atom feed
* Re: [PATCH v3] Bluetooth: btusb: Check for unexpected bytes when defragmenting HCI frames
@ 2025-09-22 13:06 Julian
  2025-09-22 17:49 ` Arkadiusz Bokowy
  0 siblings, 1 reply; 3+ messages in thread
From: Julian @ 2025-09-22 13:06 UTC (permalink / raw)
  To: arkadiusz.bokowy; +Cc: linux-bluetooth

Hi Arkadiusz,
I tested the patch with 33fa:0010. It initialized successfully and is 
working well so far.
It initially froze while scanning for more than 30 seconds, but after a 
little bit of USB Hokey-Pokey, it works better now. However, when using 
headphones, there is some choppiness in the audio during scanning, as 
if it might freeze again.

I will leave some logs in case they are helpful.

----
# cat /sys/kernel/debug/usb/devices
...
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=33fa ProdID=0010 Rev=88.91
S: Product=UGREEN BT5.4 Adapter
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
...
----

----
# dmesg
...
[ 56.023305] usb 1-8: new full-speed USB device number 4 using xhci_hcd
[ 56.398644] usb 1-8: New USB device found, idVendor=33fa, 
idProduct=0010, bcdDevice=88.91
[ 56.398653] usb 1-8: New USB device strings: Mfr=0, Product=2, 
SerialNumber=0
[ 56.398657] usb 1-8: Product: UGREEN BT5.4 Adapter
[ 56.474345] Bluetooth: Core ver 2.22
[ 56.474375] NET: Registered PF_BLUETOOTH protocol family
[ 56.474377] Bluetooth: HCI device and connection manager initialized
[ 56.474382] Bluetooth: HCI socket layer initialized
[ 56.474386] Bluetooth: L2CAP socket layer initialized
[ 56.474391] Bluetooth: SCO socket layer initialized
[ 56.503855] usbcore: registered new interface driver btusb
[ 56.566661] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 56.566667] Bluetooth: BNEP filters: protocol multicast
[ 56.566671] Bluetooth: BNEP socket layer initialized
[ 56.639531] Bluetooth: hci0: Unexpected continuation: 1 bytes
[ 56.784552] Bluetooth: hci0: Unexpected continuation: 1 bytes
[ 56.858686] Bluetooth: MGMT ver 1.23
...
----

Dongle scan fault journal segment
----
...
sep 22 08:03:31 AHost systemd[1156]: Reached target Bluetooth.
sep 22 08:03:31 AHost systemd[1]: Started Load/Save RF Kill Switch 
Status.
sep 22 08:03:32 AHost kernel: Bluetooth: hci0: Unexpected continuation: 
1 bytes
sep 22 08:03:32 AHost kernel: Bluetooth: hci0: Unexpected continuation: 
1 bytes
sep 22 08:03:32 AHost bluetoothd[549]: Battery Provider Manager created
sep 22 08:03:32 AHost kernel: Bluetooth: MGMT ver 1.23
sep 22 08:03:32 AHost bluetoothd[549]: Endpoint registered: 
sender=:1.83 path=/MediaEndpoint/A2DPSource/ldac
...
sep 22 08:03:32 AHost bluetoothd[549]: Endpoint registered: 
sender=:1.83 path=/MediaEndpoint/A2DPSource/opus_05_duplex
sep 22 08:03:36 AHost systemd[1]: systemd-rfkill.service: Deactivated 
successfully.
sep 22 08:04:44 AHost kernel: Bluetooth: hci0: Opcode 0x2042 failed: 
-110
sep 22 08:04:44 AHost kernel: Bluetooth: hci0: command 0x2042 tx timeout
sep 22 08:04:44 AHost kernel: Bluetooth: hci0: Unable to disable 
scanning: -110
sep 22 08:04:44 AHost kernel: Bluetooth: hci0: Opcode 0x0401 failed: -12
sep 22 08:04:48 AHost kernel: Bluetooth: hci0: Controller not accepting 
commands anymore: ncmd = 0
sep 22 08:04:48 AHost kernel: Bluetooth: hci0: Injecting HCI hardware 
error event
sep 22 08:04:48 AHost kernel: Bluetooth: hci0: hardware error 0x00
sep 22 08:04:48 AHost kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -12
sep 22 08:04:52 AHost kernel: Bluetooth: hci0: Controller not accepting 
commands anymore: ncmd = 0
sep 22 08:04:52 AHost kernel: Bluetooth: hci0: Injecting HCI hardware 
error event
sep 22 08:06:17 AHost kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -12
sep 22 08:06:17 AHost bluetoothd[549]: Failed to set mode: No Resources 
(0x07)
sep 22 08:06:21 AHost kernel: Bluetooth: hci0: Controller not accepting 
commands anymore: ncmd = 0
sep 22 08:06:21 AHost kernel: Bluetooth: hci0: Injecting HCI hardware 
error event
sep 22 08:06:27 AHost kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -12
sep 22 08:06:27 AHost bluetoothd[549]: Failed to set mode: No Resources 
(0x07)
sep 22 08:06:31 AHost kernel: Bluetooth: hci0: Controller not accepting 
commands anymore: ncmd = 0
sep 22 08:06:31 AHost kernel: Bluetooth: hci0: Injecting HCI hardware 
error event
...
----



^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [PATCH v2] Bluetooth: btusb: Check for unexpected bytes when defragmenting HCI frames
@ 2025-08-27 15:20 Luiz Augusto von Dentz
  2025-08-27 16:40 ` [PATCH v3] " Arkadiusz Bokowy
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 15:20 UTC (permalink / raw)
  To: Arkadiusz Bokowy; +Cc: linux-bluetooth

Hi Arkadiusz,

On Wed, Aug 27, 2025 at 11:02 AM Arkadiusz Bokowy
<arkadiusz.bokowy@gmail.com> wrote:
>
> > Looks like we are missing:
> >
> > +       /* Barrot Technology Bluetooth devices */
> > +       { USB_DEVICE(0x33fa, 0x0010), .driver_info = BTUSB_BARROT },
> > +       { USB_DEVICE(0x33fa, 0x0012), .driver_info = BTUSB_BARROT },
> >
> > We can probably add it together in the same patch, so we don't have to
> > rely on Fixes to inform the changes below needs to go together, but
> > then we should include the contents of /sys/kernel/debug/usb/devices
> > before the information why we need the changes to detect extra bytes
> > in order for it to work.
>
> OK, so, should I restore the quirk (so this check is only for Barrot
> devices)? Or add driver_info = BARROT without actually using it
> anywhere?

I don't think we need to quirk to acting on the extra bytes, but
perhaps we should leave the driver_info = BARROT in case we need some
special handling for it since I suspect it may be needed for setting
up things like firmware download, which in the event the driver is
ever fixed to not sent the extra bytes a new firmware will probably
going to be required.

-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2025-09-22 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 13:06 [PATCH v3] Bluetooth: btusb: Check for unexpected bytes when defragmenting HCI frames Julian
2025-09-22 17:49 ` Arkadiusz Bokowy
  -- strict thread matches above, loose matches on Subject: below --
2025-08-27 15:20 [PATCH v2] " Luiz Augusto von Dentz
2025-08-27 16:40 ` [PATCH v3] " Arkadiusz Bokowy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox