Re: Bluetooth support on Intel AX200
- Reply: Tomasz CEDRO : "Re: Bluetooth support on Intel AX200"
- In reply to: Kevin Oberman : "Re: Bluetooth support on Intel AX200"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Jan 2022 04:56:58 UTC
On Tue, Jan 18, 2022 at 5:17 AM Kevin Oberman wrote:
> Thanks again for the help. I now have a BT500. (They are hard to find as Amzo and BH Photo are out of stock I see that FreeBSD detects it as a Realtek ASUS BT500. I get the following messages:
> Jan 17 13:32:06 ptavv kernel: ugen0.5: <Realtek ASUS USB-BT500> at usbus0
> Jan 17 13:32:06 ptavv kernel: ubt0 on uhub0
> Jan 17 13:32:06 ptavv kernel: ubt0: <Bluetooth Radio> on usbus0
> Jan 17 13:32:06 ptavv kernel: WARNING: attempt to domain_add(bluetooth) after domainfinalize()
> Jan 17 13:32:06 ptavv kernel: WARNING: attempt to domain_add(netgraph) after domainfinalize()
>
> No idea what those last two lines mean, but it's not good. No indication of fw load, though I don't know that it is required. In any case, no ubt or bluetooth device is created in /dev. both ng_ubt and bluetooth drivers are built into the kernel.
>
> Am I missing anything obvious? Any ideas about those two warnings? I suspect that they indicate my issue.
That was fast :-)
No worries about these two warnings. No firmware is necessary for this dongle.
Copy /etc/defaults/bluetooth.device.conf as /etc/bluetooth/ubt0.conf
and edit to your needs. This is a per-device configuration file used
by bluetooth service.
/etc/bluetooth/ubt0.conf:
local_name="hexagon"
discoverable="NO"
connectable="YES"
authentication_enable="1"
encryption_mode="1"
role_switch="YES"
# hci_debug_level="3"
# l2cap_debug_level="3"
Now you should be able to `service bluetooth onerestart ubt0` with no warnings.
You should be now able to see the ubt0hci node with:
hccontrol read_node_list
You should be now able to scan neighbors with:
hccontrol inquiry
You can enable bt services in /etc/rc.conf:
hcsecd_enable="YES"
bluetooth_enable="YES"
Bluetooth service will setup and bring the node up. Hcsecd is used for
secure connections to the client.
You may also want to:
sdpd_enable="YES"
ubthidhci_enable="YES"
ubthidhci_busnum="1"
ubthidhci_addr="6"
Sdpd allows others to browse your host services. Ubthidhci is used to
connect to BT HID devices.
/etc/bluetooth/hosts:
mybtdevicemac mydevice1name
/etc/bluetooth/hcsecd.conf:
device {
bdaddr mybtdevicemac;
name "mydevice1name";
pin "0000";
key 0xddeeaaddbbeeeeff;
}
hccontrol -n ubt0hci Write_Authentication_Enable 1
hccontrol -n ubt0hci write_Encryption_Mode 1
hccontrol -n ubt0hci Create_Connection mydevice1name
At this point you should have a connection (you may need to turn
pairing on on the headset).
hccontrol -n ubt0hci Read_Connection_List
You should see your device connected with assigned handle.
Now use Virtual OSS to connect to headset and create /dev/dsp like device:
virtual_oss -B -C 2 -c 2 -Q 0 -r 48000 -b 16 -s 512 -T dev/sndstat -R
/dev/null -O /dev/bluetooth/mydevice1name -d vdsp.bt.mydevice1name -t
vdsp.bt.mydevice1name.ctl -E 1
Now you should see the /dev/vdsp.bt.mydevice1name and headset should
notify about successful connection :-) You may name that device
whatever you like. I named it with prefix "vdsp.bt." to clearly
distonguish between /dev/dsp0.0 .. /dev/dsp11.0.
Also you should see the device in /dev/sndstat.
Send some random stuff to hear the noise over the headset:
cat /dev/random > /dev/vdsp.bt.mydevice1name
If that works music should work too.
It takes a while to get familiar with all of the configuration, its a
bit tricky and not yet automated, no worries, have fun! :-)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info