Bluetooth earbuds?

Add your Tips and tricks to configure and tweak your GhostBSD System here.
Post Reply
alexintokyo
Posts: 12
Joined: Mon Sep 02, 2024 10:53 pm

Bluetooth earbuds?

Post by alexintokyo »

Is there a way to use bluetooth earbuds with GhostBSD? My laptop is a Lenovo Thinkpad X230, with Bluetooth 4.0 wireless capabiity...
User avatar
neville
Developer
Posts: 144
Joined: Fri Aug 13, 2021 10:27 am
Location: Japan

Re: Bluetooth earbuds?

Post by neville »

Hi . Welcome to GhostBSD!

Basic bluetooth set up. Be warned that your earbuds may not be supported yet in GhostBSD.

Edit your /etc/rc.conf file and add these

sdpd_enable="YES"
hcsecd_enable="YES"

Then save changes

Install packages
pkg ins iwmbt-firmware virtual_oss

Create a ubt0.conf file

cd /etc/bluetooth
touch ubt0.conf
Then edit ubt0.conf and add these lines

authentication_enable="YES"
connectable="YES"
discoverable="YES"
role_switch="YES"

Reboot

Run the Bluetooth configuration service (as root) so you can pair your earbuds. Make sure your earbuds are not paired with any other device.
Turn your earbuds on then run

bluetooth-config scan

Look at the output in the terminal and see if your earbuds get detected. If they aren't detected put them into pairing mode and run again

bluetooth-config scan

If your earbuds are still not detected, then they probably not compatible yet

If they are, follow the directions given in the terminal. I would recommend giving your earbuds an easy name.

# Now create a virtual sound device so you can use your Bluetooth headphones as a sound sink:
virtual_oss -T /dev/sndstat -S -a o,-4 -C 2 -c 2 -r 44100 -b 16 -s 1024 -R /dev/dsp0 -P /dev/bluetooth/headphones -d dsp -t vdsp.ctl

Change /dev/bluetooth/headphones to the name you gave your earbuds i.e. /dev/bluetooth/buds

virtual_oss -T /dev/sndstat -S -a o,-4 -C 2 -c 2 -r 44100 -b 16 -s 1024 -R /dev/dsp0 -P /dev/bluetooth/buds -d dsp -t vdsp.ctl

Try out the sound! If you had your browser open and you want to test sound in your browser, restart your browser first

If your sound is a little strange, change the 44100 to 48000

Hope it works!
alexintokyo
Posts: 12
Joined: Mon Sep 02, 2024 10:53 pm

Re: Bluetooth earbuds?

Post by alexintokyo »

Thank you very much for giving me such a great set of instructions for setting up my bluetooth earbuds.

I got to the last part, to create a virtual sound device, but after typing in:

Code: Select all

virtual_oss -T /dev/sndstat -S -a o,-4 -C 2 -c 2 -r 44100 -b 16 -s 1024 -R /dev/dsp0 -P /dev/bluetooth/headphones -d dsp -t vdsp.ctl
I get the following error message:

Code: Select all

hw.snd.basename_clone: 0 -> 0
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
Could you please let me know whether there is a way to get over this? Thank you.
User avatar
neville
Developer
Posts: 144
Joined: Fri Aug 13, 2021 10:27 am
Location: Japan

Re: Bluetooth earbuds?

Post by neville »

Sorry for the late reply but it may mean that your buds are not yet supported. I'll try connecting my own Bluetooth headphones
User avatar
neville
Developer
Posts: 144
Joined: Fri Aug 13, 2021 10:27 am
Location: Japan

Re: Bluetooth earbuds?

Post by neville »

Did you run the last command as root or normal user?
User avatar
ericbsd
Developer
Posts: 2123
Joined: Mon Nov 19, 2012 7:54 pm

Re: Bluetooth earbuds?

Post by ericbsd »

@neville what do you enter for pin?
User avatar
neville
Developer
Posts: 144
Joined: Fri Aug 13, 2021 10:27 am
Location: Japan

Re: Bluetooth earbuds?

Post by neville »

I didn't set a pin. I think I selected nopin
Post Reply