[Bug 255542] Bluetooth Could not connect to HC: 5

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 30 Jul 2021 08:06:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255542

Nico Sonack <nsonack@outlook.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nsonack@outlook.com

--- Comment #2 from Nico Sonack <nsonack@outlook.com> ---
Chiming in here, since the reporter doesn't answer the request for more
information :

I have two machines :

root@hades:~ #  freebsd-version ; uname -a
13.0-RELEASE-p3
FreeBSD hades.herrhotzenplotz.geek 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0:
Tue Jun 29 19:46:20 UTC 2021    
root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC 
amd64


root@triton:~ # freebsd-version ; uname -a
13.0-RELEASE-p3
FreeBSD triton.herrhotzenplotz.geek 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #3
releng/13.0-n244752-b368bb75bad: Sun Jul 25 18:53:33 CEST 2021    
nico@triton.herrhotzenplotz.geek:/usr/obj/usr/src/amd64.amd64/sys/TRITON13 
amd64
root@triton:~ #


Attached to it is a USB Bluetooth dongle :

root@triton:~ # usbconfig -d ugen0.4 dump_device_desc
ugen0.4: <SiW SiW> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (50mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0110
  bDeviceClass = 0x00e0  <Wireless controller>
  bDeviceSubClass = 0x0001
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x1310
  idProduct = 0x0001
  bcdDevice = 0x1500
  iManufacturer = 0x0001  <SiW>
  iProduct = 0x0002  <SiW>
  iSerialNumber = 0x0003  <C5B1320D0B00>
  bNumConfigurations = 0x0001

I have the following script to setup an audio connection to bluetooth
headphones :

root@hades:~ # cat /usr/home/nico/.local/bin/bt
#!/bin/sh

service bluetooth restart ubt0
hccontrol -n ubt0hci create_connection headphones
trap "sysctl hw.snd.basename_clone=1" INT
virtual_oss -S -C 2 -c 2 -r 48000 -b 16 -s 1024 -R /dev/null -P
/dev/bluetooth/headphones -T /dev/sndstat -d dsp
root@hades:~ #


On one machine it does the following :

root@hades:~ # /usr/home/nico/.local/bin/bt
BD_ADDR: headphones
Connection handle: 1
Encryption mode: Disabled [0]
hw.snd.basename_clone: 1 -> 0
backend_bt: PSM=0x19
backend_bt: No frequency and mode match
backend_bt: No frequency and mode match

...And I can listen to whatever I want.

On the other machine however :

root@triton:~ # /usr/home/nico/.local/bin/bt
BD_ADDR: headphones
Connection handle: 1
Encryption mode: Disabled [0]
hw.snd.basename_clone: 1 -> 0
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 5
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 5
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 5
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 5
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 5
^Chw.snd.basename_clone: 0 -> 1
root@triton:~ #


... And it doesn't work.

I suspect, that the issue is related to virtual_oss.

Let me know, if you need any more information or want me to test
something here.

Please bear in mind that the 'hades' machine runs pretty much only
binary ports and patches from freebsd-update but the 'triton' machine
runs a custom kernel. I don't think that this is a huge difference
though.

-- 
You are receiving this mail because:
You are the assignee for the bug.