$Id: bluetooth.md,v 1.13 2023/04/16 11:10:56 cvs Exp $
Update 2022
I recently bought the new USB-C version, the Creative BT-W3. It works way better that the BT-W2, my Bluetooth devices connects faster to the dongle and never loose connection so far.
Audio via proprietary Protocol
My employer offers Wireless Active Noise Cancellation (ANC) headphones (Jabra Evolve 2 85) for employees, so I decided to get one. I usually use the device with the corporate Windows but also tried it with OpenBSD and turns out, it works fine. Once you connect the wireless dongle via USB it announces itself as follows:
The head phone and the USB-C dongle are shown in the following picture:uhub3 at uhub0 port 3 configuration 1 interface 0 "Cambridge Silicon Radio product 0x4010" rev 2.00/15.46 add r 3
uaudio0 at uhub3 port 1 configuration 1 interface 1 " Jabra Link 380" rev 2.00/1.09 addr 4
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 4 ctls
audio1 at uaudio0
uhidev1 at uhub3 port 1 configuration 1 interface 3 " Jabra Link 380" rev 2.00/1.09 addr 4
uhidev1: iclass 3/0, 155 report ids
Photo of my Jabra
Evolve 2 85 headphone and a USB-C dongle.
Both are black lying on a wooden table.
Now just follow the steps in the section connect to sndiod and volume control below to enjoy wireless sound.
Audio via Bluetooth
OpenBSD removed Bluetooth support in 2014, so officially there is no way to connect a Bluetooth device to your OpenBSD system. However, jcs@ posted on Twitter that he found a simple way to play audio via Bluetooth. He recommended the Creative BT-W2 USB dongle.
Just plug it in and you should be good to go and see messages similar to the following in your system’s log and the stick should show a flashing blue light.
If you see nothing at all, check your BIOS settings. The USB 3.0 mode setting in mine was set to Auto. Once I switched it to Enabled the dongle was attached. I use a Thinkpad T series so the name of your option might be different.uaudio0 at uhub0 port 2 configuration 1 interface 1 "Creative Labs Creative Bluetooth Audio W2"
rev 2.00/1.00 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 0 ctls
audio1 at uaudio0https://marc.info/?l=openbsd-cvs&m=140511572108715&w=2
uhidev0 at uhub0 port 2 configuration 1 interface 3 "Creative Labs Creative Bluetooth Audio W2"
rev 2.00/1.00 addr 2
uhidev0: iclass 3/0, 3 report ids
uhid0 at uhidev0 reportid 1: input=2, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=18, output=18, feature=0
uhid2 at uhidev0 reportid 3: input=64, output=64, feature=0
Bluetooth Pairing
To pair with an audio device set the device to pairing mode and long press the button on the stick. The blue light should flash rapidly.
Attach to sndiod and Volume Control
Once the Jabra Dongle or the Bluetooth stick is connected you need to add it to sndiod. One way to do this is by using the -F option. This lets you specify an alternative device which will be used by once it’s connected. If it’s not connected sndiod switches back to the default device set with -f. As soon as the dongle is connected it will be used, as soon as you disconnect it the internal speakers/headphones will be used.
Changing volume does not work with the regular utilities, you have to install the aucatctl package. Set the volume as follows (a lower value leads to a lower volume):# rcctl set sndiod flags "-f rsnd/0 -F rsnd/1"
# rcctl restart sndiod
Update for OpenBSD 6.8. Since this version sndioctl can control the volume and there is no need for an additional package:$ aucatctl master=20
$ sndioctl output.level=+0.05
$ sndioctl output.level=-0.05