# Cant pair bluetooth headset, anyone can help me?



## enkinambal (Feb 10, 2020)

FreeBSD 12.1

What configuration i have:

ASUSTek Computer, Inc. Qualcomm Bluetooth 4.1 integrated in motheboard.
JBL 500 BT Headset

Ok, what i tried to do:

1) scan with bluetooth-config always done, after i answer yes, new headset added to hcsecd.conf with nokey/nopin attributes. Looks like everything success, but headset always still blinking... Ok, after switched it off, and then turned on again, i see such thing: it is trying to search, 10-15 sec after it, is switching to blink/pairing mode again.

I ran hcsecd with -d key, and saw such picture:

Found matching entry, remote bdaddr 0:80:37:29:19:a4, name '****', link key doesn't exist

Sending Link_Key_Negative_Reply to 'ubt0hci' for remote bdaddr 0:80:37:29:19:a4

Headset start blinking, and nothing else happens, until i restart the bluetooth stack.

What am I doing wrong?


----------



## George (Feb 14, 2020)

Did you try the handbook? 31.5. Bluetooth


----------



## eternal_noob (Feb 14, 2020)

It depends on the Bluetooth version if it's supported or not.
Bluetooth V3 and V4 aren't supported afaik.

For more information, look here: Thread 64797


----------



## enkinambal (Feb 15, 2020)

freebsd_noob said:


> It depends on the Bluetooth version if it's supported or not.
> Bluetooth V3 and V4 aren't supported afaik.
> 
> For more information, look here: Thread 64797



So sad, thank you


----------



## asherikov (Mar 31, 2020)

Try with

```
hccontrol -n ubt0hci write_authentication_enable 1
hccontrol -n ubt0hci write_encryption_mode 1
```
My headset does not bind by default as well.


----------



## sdalu (May 2, 2020)

I need to run virtual_oss once connection established with `hccontrol -n ubt0hci create_connection BT_ADDR`. `sdbpd` and `hcescd` need to be running


```
virtual_oss -S -C 2 -c 2 -r 48000 -b 16 -s 1024 \
    -R /dev/null -R /dev/null -P /dev/bluetooth/SE7 \
    -T /dev/sndstat -d dsp.bt
```

Also I'm using in hcescd.conf a pin value of "0000"

Note that my headset say's "connected" only when virtual_oss has been run


----------



## christhegeek (May 2, 2020)

Have you solved the problem ? 
I remember my headset had no problems pairing with my freebsd, if you still have problems respond.






enkinambal said:


> FreeBSD 12.1
> 
> What configuration i have:
> 
> ...


----------



## enkinambal (Dec 28, 2020)

sdalu said:


> I need to run virtual_oss once connection established with `hccontrol -n ubt0hci create_connection BT_ADDR`. `sdbpd` and `hcescd` need to be running
> 
> 
> ```
> ...



Please check, am I doing right things?

The result is:

```
root@free:/home/noname # hccontrol -n ubt0hci create_connection 5c:fb:7c:72:26:91
BD_ADDR: JBL_TUNE500BT
Connection handle: 6
Encryption mode: Disabled [0]

root@free:/home/noname # kldload cuse                                                                                         

root@free:/home/noname # virtual_oss -S -C 2 -c 2 -r 48000 -b 16 -s 1024 -R /dev/null -R /dev/null -P /dev/bluetooth/5c:fb:7c:72:26:91 -T /dev/sndstat -d dsp.bt
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
backend_bt: Could not connect to HC: 13
backend_bt: PSM=0x19
```


----------



## enkinambal (Dec 28, 2020)

christhegeek said:


> *Have you solved the problem ?
> I remember my headset had no problems pairing with my freebsd, if you still have problems respond.*


No, can u help me please?


----------



## drr (Apr 8, 2022)

An old thread, but I found the instructions here useful to connect a JBL TUNE205BT headphone with a TP-Link UB400 usb bluetooth adapter.

The bluetooth adapter works out of the box with my FreeBSD
13.0-RELEASE-p11. To connect the headphone, I had to add an entry in /etc/bluetooth/hcsecd.conf with pin "0000" as suggested by sdalu, start `hcsecd` and run the commands suggested asherikov before creating the connection with `hccontrol`.

The headphone starts working (the indicator light turns blue) after the `virtual_oss` command is run.


----------

