# How to bluetooth?



## kenny_w (Feb 21, 2018)

Hello everyone, I am just wondering how I can use bluetooth on FreeBSD. Is there a GUI bluetooth manager or must I use the terminal? And if so, how do I do that? 
Thank you.


----------



## Deleted member 9563 (Feb 22, 2018)

I assume you've see the handbook entry, 30.5. Bluetooth.


----------



## kenny_w (Feb 22, 2018)

Yep I've tried what it says but I can't seem to get it to work...

sudo service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0

Not sure what exactly I'm doing wrong here. I'm really new to BSD, I'd like to get bluetooth and sixad to work & then I'll be good to go.

sudo btsixad      
btsixad: bind() failed: Address already in use

It would be awesome if someone could help me do this, I'm not sure how to troubleshoot this... what outputs of commands can I give you?

hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
    BD_ADDR: 00:1a:7d:da:71:13
    Page Scan Rep. Mode: 0x1
    Page Scan Period Mode: 0x2
    Page Scan Mode: 00
    Class: 0c:01:0c
    Clock offset: 0x1c5c
Inquiry complete. Status: No error [00]


----------



## kenny_w (Feb 22, 2018)

I guess that this is the problem. How can I solve this?
I've ordered a new WiFi+bluetooth card, the newest intel card, just a few days ago. I imagine it'll take a few weeks to get here, but for the next two weeks I need my bluetooth to work, I REALLY need my bluetooth. Anyone have an idea how I can make this thing function? ;_; I can't manage to install rtl8821ae driver from lwfinger's github repo, it just fails

gmake -C /lib/modules/11.1-RELEASE/build M=/usr/home/kzn/Compiles/rtlwifi_new modules
gmake[1]: Entering directory '/lib/modules/11.1-RELEASE/build'
gmake[1]: *** No rule to make target 'modules'.  Stop.
gmake[1]: Leaving directory '/lib/modules/11.1-RELEASE/build'
gmake: *** [Makefile:58: all] Error 2

same thing with pmake


----------



## sidetone (Feb 22, 2018)

Bluetooth version up to 1.1 works. Some version 2 works. Bluetooth versions 3 and 4 don't work. Which version is your Bluetooth dongle?


----------



## kenny_w (Feb 22, 2018)

oh lord.... version 4 of course. So I can't use FreeBSD if I want to use bluetooth?  this is a real downer.
UFS filesystems can be resized, right? How do I install GRUB on FreeBSD? I guess I'll have to install some linux distro(probably devuan) alongside FreeBSD....
Any idea when bluetooth might actually be fully working on FreeBSD? Does bluetooth v4 work on NetBSD or OpenBSD perhaps?


----------



## Snurg (Feb 22, 2018)

BT is unmaintained on FreeBSD. Audio is not functional even the documentation suggests that it is supported.
OpenBSD removed the BT stack from the system entirely in 2014 for these reasons.


----------



## kenny_w (Feb 22, 2018)

Ouch.... Unmaintained.... thats really too bad... I'm trying to install GRUB on FreeBSD but its not seeming to work out... UFS can be resized, right?
And what about NetBSD? Do they support bluetooth?


----------



## sidetone (Feb 22, 2018)

You know what? The Handbook has been outdated for a lot. Still, at this time Bluetooth past Version 3 is not meant to work.

There is one thing, I've tried to use a Bluetooth Version 3 dongle with Bluetooth devices (a while back before looking into which versions work), and they've showed up as regular usb wireless devices. Perhaps they're not meant to work yet, but they show up, just not as Bluetooth. If a minor function happens to work, it's by chance, and not officially supposed to.


----------



## Snurg (Feb 22, 2018)

sidetone said:


> ... with Bluetooth devices (a while back before looking into which versions work), and they've showed up as regular usb wireless devices. Perhaps they're not meant to work yet, but they show up, just not as Bluetooth. If a minor function happens to work, it's by chance, and not officially supposed to.


The fact that BT is included in the handbook led me into trying to get my headset working with FreeBSD a few years ago.
What I found was that the supposedly supported chipsets showed up as bluetooth, and the ones not supported as wireless usb devices.

I managed to get pairing work on FreeBSD, but audio itself... no luck with all bt dongles and headsets I tried.

Anyway, it is not impossible to get bluetooth work: create a windows virtualbox, pass through the usb device and let windows do the work...
To prevent false hopes, the bluetooth situation on Linux is not much better.


----------



## Nicola Mingotti (Feb 22, 2018)

Snurg said:


> BT is unmaintained on FreeBSD. Audio is not functional even the documentation suggests that it is supported.
> OpenBSD removed the BT stack from the system entirely in 2014 for these reasons.



Oh, that is pity, I could have been useful in the BeagleBone


----------



## Snurg (Feb 22, 2018)

Nicola Mingotti This makes me consider using Linux for the BBB. The current Bluez stack (written by Qualcomm) is 5.48, released Dec 2017, and included in several Linux distros.


----------



## Nicola Mingotti (Feb 22, 2018)

Snurg, if you want to try, Molloy book has a chapter on Bluetooth, it is one of the few i did not read The book in general is very good, except the DTO part which is now outdated.

In general my experience with Linux and BBB has been rewarding but painful, it is very difficult to find updated info.  And the feeling I had was like be building on sand. 

I buoght today 2 BBGreen, I hope to be able to do some experiments with Freebsd shortly


----------



## Snurg (Feb 22, 2018)

Nicola Mingotti I would hate to use Linux, too.
It's a real battle inside of me.
When thinking back what I learnt in 2013 when I tried to get bluetooth audio work for me, I remember that some people back then said that bluetooth keyboards, mice and data transfer work for them. So the bluetooth stack is at least partially functional, but many things missing.
My use case would be in the final stages of my project the addition of a smartphone app to control my appliance, and to get alarm notification from the phone. Basically some simple data transfer, like kbd/mouse, nothing complex.
If the BBB bluetooth chipset is compatible with the old FreeBSD driver, it could be still possible with FreeBSD.
If this is not possible, I could still change to Linux.
I think I'll first start with FreeBSD on the BBB and see how it works.


----------



## fernandel (Feb 22, 2018)

I am using Apple Magic Mouse and I got a patch for bluetooth and works with my mouse from 2015 but there not update yet.


----------



## drhowarddrfine (Feb 22, 2018)

I didn't read through this thread but I was using a Microsoft bluetooth keyboard for a couple of years before I spilled coffee on it about six months ago. I had no issues with it at all.


----------



## Nicola Mingotti (Feb 22, 2018)

to Snurg , 
I developed some Android apps, that is another field that, as the BB, requires a lot of study.
Luckily enough, there is abundant documentation.

If your device needs to run at home, where probably you have a wifi network, you could use that
channel to let the BBB and Android comunicate. I guess It would save you a lot of troubles.

If you want to go for the bluetooth path, probably the easiest path would be to 
follow Molly book and do it first with Linux.  
Then, once you are familar with the precedure move it to FreeBSD.
(I have no idea of the level of difficulty of the last step, the first part should be easy)


----------



## Snurg (Feb 27, 2018)

Nicola Mingotti  I am still reading through Mollloy's book... it's very well written.
I guess I'll do my first steps with Debian, as I am setting up Debian on my second PC atm as well.

Not sure whether Bluetooth or wifi will be the path to go.
Web interface is probably the easiest way to control the BBB... and it is probably the only way to do it with FreeBSD.

But I'll take the time to read the most important sections of the book first


----------



## Nicola Mingotti (Feb 27, 2018)

Snurg, I support your decision. Considering there is a good book
for Linux it is reasonable to hack there first.

Addendum to Molloy book. All recent Debian distributions 
don't require you to mess with DTO. Just use the `config-pin` 
command. 

Linux is a big mess, in case you need help on something
undocumented join *#beagle* on *freenode.net*. There is a guy
there how knows all of BBB I don't remember his name, unfortunately
I did not write it into my notes. 

Maybe we could write something similar to Molloy book for 
FreeBSD with the other friends of the forum. A much shorter version, more
focused on people who already know Unix. Let's collect procedures then, in 4-5 months we will see.

I agree on the web server. If you need to control the BBB from, e.g. your phone, it is the simplest way.


----------



## Neville (Nov 22, 2018)

kenny_w said:


> oh lord.... version 4 of course. So I can't use FreeBSD if I want to use bluetooth?  this is a real downer.
> UFS filesystems can be resized, right? How do I install GRUB on FreeBSD? I guess I'll have to install some linux distro(probably devuan) alongside FreeBSD....
> Any idea when bluetooth might actually be fully working on FreeBSD? Does bluetooth v4 work on NetBSD or OpenBSD perhaps?


Hi. Sorry to bump this old thread but I'm using a CSR8510 A10 Bluetooth 4.0 device that works almost perfectly for sending and receiving files with my Android phone. What is your device?


----------



## jb_fvwm2 (Nov 22, 2018)

Does that bluetooth CSR8510 work with BSD, you wrote? And if so, any brand of the chipset?


----------



## sidetone (Nov 23, 2018)

jb_fvwm2 said:


> Does that bluetooth CSR8510 work with BSD, you wrote? And if so, any brand of the chipset?


I don't have any expectation for it to work, but I once plugged in a Bluetooth 3.0 dongle, and Bluetooth devices showed up, not as Bluetooth devices, but as regular wireless devices. I didn't look into it, because the expectation was that there would be no real premise for it to work.


----------



## Neville (Nov 23, 2018)

jb_fvwm2 said:


> Does that bluetooth CSR8510 work with BSD, you wrote? And if so, any brand of the chipset?


One of my usb devices was made by a company called PRINCETON and another that I use which was made in China and there are no brand markings on it, believe it or not. But if you're looking for one go to your favourite shop (online or otherwise) and search for "CSR 4.0 Bluetooth" and a few should come up.
Also apparently the Broadcom BCM20702 also works. They are very cheap, around $10 US.
Good luck!


----------



## ronaldlees (Nov 24, 2018)

Neville said:


> One of my usb devices was made by a company called PRINCETON and another that I use which was made in China and there are no brand markings on it, believe it or not. But if you're looking for one go to your favourite shop (online or otherwise) and search for "CSR 4.0 Bluetooth" and a few should come up.
> Also apparently the Broadcom BCM20702 also works. They are very cheap, around $10 US.
> Good luck!



Most bluetooth devices will handle the protocols of the older versions of the bluetooth spec.  The simple file transfer profile was one of the first bluetooth services (bluetooth was seen first as a file transfer technology).  It is available in version 1.0 of the bluetooth spec.  That's probably what's happening.  It doesn't mean it'll support the newer profiles (services).


----------



## ronaldlees (Nov 24, 2018)

BTW: Welcome to the forum!


----------



## Neville (Nov 25, 2018)

ronaldlees said:


> BTW: Welcome to the forum!


Thanks.
I should have been clearer. It is more accurate to say that they work but are not necessarily supported. However, I first tried out a USB 2.0 device and then tried the CSR 4.0 device and the CSR devices seem to work faster than the 2.0 devices. The main reason I posted is that it has been mentioned that versions 3.0 and 4.0 don't work, but I was pointing out that they do. Perhaps I can post some speeds later.


----------



## amulet116 (Mar 7, 2019)

I think you should make connection to a BT 4.0 device by your CSR dongle. If it works, it means BT 4.0 is supported by FreeBSD. Otherwise, it just supports low version. And it works, just because your CSR 4.0 dongle support v1.0---v4.0.


----------



## Wozzeck.Live (Mar 8, 2019)

For information....

In some cases, bluetooth audio may work.... the FreeBSD handbook is not totally false, but may be incomplete

Base system can associate devices, but it requires an additional audio "firmware layer"

This firmware layer is included in audio/virtual_oss

I haven't personally tried, but from what I have read this is working, and it seems that even under Linux, bluetooth audio is handled by 'virtual_oss'

I don't know if it supports high definition audio, but basic audio can work

To setup 'virtual_oss' you should find help on Google

Anyway.... there is no real support of Bluetooth  in FreeBSD, and this isn't a priority.
The current support is very basic, through 'netgraph' modules.
Netgraph modules are intended first to create/manage virtual network devices (for advanced users)

This is not basically the goal of Netgraph to manage bluetooth... so I always found that strange and "wobbly". It seems to be more a "workaround solution" or "quick and dirty job" for just a basic support for keyboard and mouse.

According to me, there is no guaranty for the future regarding the support of bluetooth in FreeBSD.


----------



## christhegeek (Dec 15, 2019)

Bluetooth works for me with my bluetooth headsets 




Snurg said:


> The fact that BT is included in the handbook led me into trying to get my headset working with FreeBSD a few years ago.
> What I found was that the supposedly supported chipsets showed up as bluetooth, and the ones not supported as wireless usb devices.
> 
> I managed to get pairing work on FreeBSD, but audio itself... no luck with all bt dongles and headsets I tried.
> ...


----------



## jacekkowalczyk82 (Jan 22, 2020)

Hi, 
What are you experience with BT audio connection?
I am Running FreeBSD 12.1-REALESE and using CSR 4.0 Bluetooth  USB dongle. 
I was able to connect some cheap  (below $10) Bluetooth audio receiver BTR-302 but I did not succeed with anything  else. 
I tried already JBL Flip 4 speaker and Fioo uBTR headphones amplifier without success. 

What BT audio devices did you manage to connect and what not.


----------



## christhegeek (Jan 31, 2020)

Cambridge Silicon Radio, Ltd Bluetooth Dongle
Works with my headphones just fine  (i tried two bluetooth headphones they work)


----------



## jacekkowalczyk82 (Feb 4, 2020)

I am Running FreeBSD 12.1-REALESE and using CSR 4.0 Bluetooth  USB dongle. 
I was able to connect to some cheap  (below $4) Bluetooth audio receiver BTR-302 (v3.0 + EDR )
I was NOT able to connect  to JBL Flip 4 speaker nor Fioo uBTR headphones amplifier.


----------



## jacekkowalczyk82 (Feb 10, 2020)

I wrote about my experience with Bluetooth at FreeBSD here 





						BSD Bluetooth audio
					

BT audio on devices without BT but with mini jack out and AUX ports.




					jacekkowalczyk82.github.io


----------

