Bluetooth pairing is a complete headache

Bluetooth protocol is 25 years old, yes it is true, a quarter part of a century.
But in FreeBSD seems it's not yet there and no one seems to care.
I invested 2 days trying to figure out how to connect a phone or a headset and man, what a waste of time.
I must be masochist or something to keep on trying to make stuff work in FreeBSD for the good feeling of having a completely free open source OS.

I've searched in forums for a complete wiki on how to connect a headset and found several posts showing this and that way on doing it.
Seems somehow abstract to have a proper way on enabling it because some posts have 7 years old or more and some newer post tell you don't need to do this and that any longer.
No matter what I follow nothing seems to work, no sound nor filesystem, nothing.

Why FreeBSD community despises bluetooth?
Because it's peripheral device protocol and it's not totally necessary?
Forget it and use USB?

Well...I'm sorry guys.
Just got desperate here.

I just need an updated wiki on how to do it for this latest 13.2 version.
My goal is:
- connect a headset (headphone with mic)
- connect a phone to get some files

Why?
Just because I'm still trying to figure out if I can use this system for good.

Thanks.
 
Whining here due to your frustrations won't help you or anyone else.

Figure out what specific hardware you have, websearch for freebsd + your hardware model and see what others with the same hardware has done, and if you are still stuck ,you can tell us the exact steps you tried, what error message you saw and may be someone can help. Another thing to try is to post to the freebsd-bluetooth mailing list with the same information. There is also the FreeBSD discord server you can try.
 
Why FreeBSD community despises bluetooth?
Don't need it. I have a Windows laptop for AutooCAD and it does BT too.
The only time I use is is to transfer contact list from one flip phone to new flip phone.
And then its only when I bust the screen so bad I can't see it to pair.
Otherwise I do BT to BT with just phones to transfer contact list..

So I don't despise it. It is just another tool in the box. FreeBSD could rip the whole BT stack and I wouldn't care.
 
"Whining here due to your frustrations won't help you or anyone else."
Yes I know, just had to say it, please don't mind.
I still "just need an updated wiki on how to do it for this latest 13.2 version."
 
I invested 2 days trying to figure out how to connect a phone or a headset and man, what a waste of time.
I must be masochist or something to keep on trying to make stuff work in FreeBSD for the good feeling of having a completely free open source OS.
But you finally get it, right? This isn't a waste of time, If you see learning to solve problems as a waste of time, maybe you're not on the right track.
Do not forget that most hardware companies are not kind with FreeBSD.

it's peripheral device protocol and it's not totally necessary
Forget it and use USB
Yeah...
 
But you finally get it, right? This isn't a waste of time, If you see learning to solve problems as a waste of time, maybe you're not on the right track.
Learning is when we get it to work.
I still hope I will get it to work or it will become a waste of time... well, in fact it's not totally a waste when you're enjoying what you're doing.
 
I still "just need an updated wiki on how to do it for this latest 13.2 version."
It is a volunteer project (a relatively small one compared to Linux) and people put in time to work on things based on their own needs and expertise. You can help (them) by providing specific info about your hardware and by willing to experiment. Hopefully in the process you will learn enough to help others!
 
I haven't attempted Bluetooth on FreeBSD yet. I have some dongles for bt and may want to use a headset and a keyboard at some point.

So whatever you discover may help later when I do.

Please do post your hardware details here.
 
I've news
I was able to pair but still no sound at all, that was a small step.
edited and added the device in (I'm not sure if it's necessary in both files)
/etc/bluetooth/hosts
Code:
xx:xx:xx:xx:xx:xx    plt-focus
and
/etc/bluetooth/hcsecd.conf
Code:
device {
        bdaddr  xx:xx:xx:xx:xx:xx;
        name    "PLT Focus";
        key     nokey;
        pin     "0000";
}
then
$ sudo hccontrol -n ubt0hci create_connection plt-focus

and finally (got this one from some other post)
$ sudo virtual_oss -T /dev/sndstat -C 2 -c 2 -r 48000 -b 16 -s 20ms -P /dev/bluetooth/plt-focus -R /dev/null -w vdsp.ctl -d dsp -l mixer

and was able to ear a soft voice saying "pc connected"

I'm using XFCE and pulseaudio plugin so this one is using virtual_oss, it doesn't even get listed in the volume control devices.

Still working on it.
 
Before setting up the bluetooth headset I can see in VLC several audio pcm devices.
After running the virtual_oss command VLC shows dsp device only all other devices disappeared and the only way to get it back is with a reboot.
So something conflicts with pulseaudio and oss.
pulseaudio plugin never shows the dsp device created by virtual_oss.
VLC plays sound in the bluetooth device paired but all other system sounds don't.

I'm quite confused.
 
Got something more now.
Found that FreeBSD version of pulseaudio does not include the module-bluetooth-discover.
But found a way to force some discovery.
After the pairing succeeded I had to:
$ pacmd unload-module module-oss
$ pacmd unload-module module-detect
$ pacmd load-module module-oss
$ pacmd load-module module-detect
and got all devices in the pulseaudio plugin list so I can select the device I want the sound output

This may be a workaround but not yet the solution as VLC still shows only the bluetooth dsp.
 
I'm trying to connect using a normal user/operator but it gets an error:
Code:
$ hccontrol -n ubt0hci create_connection plt-focus
Could not execute command "create_connection". Operation not permitted
It only works with sudo.
So is there a way to workaround this problem?
 
I think in a few years Bluetooth will be gone. At the moment this is what we've got.


And that there will be some new and open ways to do digital stuff over radio:

 
Yes, true.
Bluetooth may have it's days counted but meanwhile I can't just throw away these devices, right?
I just created a /usr/local/etc/sudoers.d/hccontrol file and added
%wheel ALL=(ALL) NOPASSWD: /usr/sbin/hccontrol

and it should do it.
Power users should now be able to run that with no password needed.
 
Yes, true.
Bluetooth may have it's days counted but meanwhile I can't just throw away these devices, right?
I just created a /usr/local/etc/sudoers.d/hccontrol file and added
%wheel ALL=(ALL) NOPASSWD: /usr/sbin/hccontrol

and it should do it.
Power users should now be able to run that with no password needed.
Different users have different needs, but when the audio latency is the same like from Norway to UK by fibre and back, and the local wireless distance is only 0.5 meters, don't buy it at all. Every time you have a conversation with anyone, and the conversation changes between speaker and receiver, you add 30ms of latency or more. When you only listen to music, the latency is not that critical, but anyway ... my hardware rant of the day ...

Maybe something is already going via space - and that's why it is so terribly slow - who knows :)

 
Thread howto-enabling-multimedia-keys-gamepads-joysticks-for-desktop-usbhid.84464
While this isn't about sound and phone devices, posts #15 and #19 are relevant to allowing specific permissions and setting up Bluetooth. Permissions for classes of devices can also be set up, as an alternative to setting up individual devices.


And that there will be some new and open ways to do digital stuff over radio:

I have been wondering about opensource alternatives to Bluetooth and about obstacles for hardware manufacturers to use an open standardized technology.
 
Meanwhile I'm developing it myself
Screenshot_2023-06-17_10-18-01.png
 
Bluetooth protocol is 25 years old, yes it is true, a quarter part of a century.
But in FreeBSD seems it's not yet there and no one seems to care.
I invested 2 days trying to figure out how to connect a phone or a headset and man, what a waste of time.
I must be masochist or something to keep on trying to make stuff work in FreeBSD for the good feeling of having a completely free open source OS.

I've searched in forums for a complete wiki on how to connect a headset and found several posts showing this and that way on doing it.
Seems somehow abstract to have a proper way on enabling it because some posts have 7 years old or more and some newer post tell you don't need to do this and that any longer.
No matter what I follow nothing seems to work, no sound nor filesystem, nothing.

Why FreeBSD community despises bluetooth?
Because it's peripheral device protocol and it's not totally necessary?
Forget it and use USB?

Well...I'm sorry guys.
Just got desperate here.

I just need an updated wiki on how to do it for this latest 13.2 version.
My goal is:
- connect a headset (headphone with mic)
- connect a phone to get some files

Why?
Just because I'm still trying to figure out if I can use this system for good.

Thanks.
I wish I knew how to save certain post/threads in a separate area of my account for my quick where did I put that searches to get what I already found post.

I had to google this again


I got it to work but it is still a bit of a hassle because that is how far FreeBSD has gotten on development on bluetooth, so I went back to plugin earbuds on my laptop whenever I'm in FreeBSD.
 
After resetting the confs to test the scripts and the code I'm no longer to connect to the device.
I'm following the exact precise steps as I did before.
This is so frustrating.
 
after playing around with
sudo hccontrol -n ubt0hci write_authentication_enable 1
sudo hccontrol -n ubt0hci write_encryption_mode 1

sudo hccontrol -n ubt0hci write_authentication_enable 0
sudo hccontrol -n ubt0hci write_encryption_mode 0

it's back!
I'm still far to understand this.
 
Back
Top