I badly need to connect my bluetooth headphone ... Please help !

john_rambo

Member

Reaction score: 3
Messages: 97

Hi,
I am using GhostBSD which as you know is based of FreeBSD. Like this forum the GhostBSD forum too is very friendly. They solved almost all of my issues. The only remaining problem is about bluetooth. I use my bluetooth headphone all the time. Under Linux my usb bluetooth dongle worked out of the box but unfortunately its not working under GhostBSD/FreeBSD. I need this badly. I read the official docs but I couldn't understand anything Can someone please help ?

Please tell me which info you need I will post them as soon as possible.

This was the output of the Linux command lsusb. I no longer have Linux installed.

Code:
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

It finds my bluetooth headphone

Code:
# hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
    BD_ADDR: 3b:46:5e:7b:00:05
    Page Scan Rep. Mode: 0x1
    Page Scan Period Mode: 0x2
    Page Scan Mode: 00
    Class: 24:04:04
    Clock offset: 0x6a8
Inquiry complete. Status: No error [00]

Then I try to connect

Code:
# hccontrol -n ubt0hci create_connection 3b:46:5e:7b:00:05

When a connection is made my headset notifies me. A female voice says the word "connected" but I don't hear it.

Code:
# hccontrol -n ubt0hci read_connection_list
Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
3b:46:5e:7b:00:05     41  ACL    0 MAST    NONE       0     0 OPEN
3b:46:5e:7b:00:05     41  ACL    0 MAST    NONE       0     0 OPEN

I am so close. Any ideas are welcome.
 

sig

New Member

Reaction score: 5
Messages: 13

You might be missing this piece.

7.2.3. Setting up Bluetooth Sound Devices​

 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

sig

It worked ! But only for one time. I was able to connect my headphone, I tested by playing a song. After I rebooted & followed the exact same steps it fails to connect.

Code:
kldload ng_ubt
kldload ubtbcmfw
service bluetooth start
service sdpd start
hccontrol -n ubt0hci inquiry
kldload cuse
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/BT_ADDR -d dsp


# virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp
hw.snd.basename_clone: 0 -> 0
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
 

mark_j

Daemon

Reaction score: 680
Messages: 1,192

What's the output of kldstat? Are all the modules you loaded in the list?
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

What's the output of kldstat?
Code:
kldstat
Id Refs Address                Size Name
 1  100 0xffffffff80200000  2c0bb60 kernel
 2    1 0xffffffff82e0c000   3bacf0 zfs.ko
 3    2 0xffffffff831c7000     a448 opensolaris.ko
 4    1 0xffffffff831d2000    1e7b0 geom_eli.ko
 5    1 0xffffffff831f1000     eed8 aesni.ko
 6    1 0xffffffff83811000     87d0 tmpfs.ko
 7    1 0xffffffff8381a000     35b4 geom_uzip.ko
 8    1 0xffffffff8381e000     2e30 xz.ko
 9    1 0xffffffff83821000     1a20 fdescfs.ko
10    1 0xffffffff83823000    103f0 fuse.ko
11    1 0xffffffff83834000     2908 ums.ko
12    1 0xffffffff83837000    3c4c0 linux.ko
13    4 0xffffffff83874000     4b80 linux_common.ko
14    1 0xffffffff83879000    35ce0 linux64.ko
15    1 0xffffffff838af000     4ea4 cuse.ko
16    1 0xffffffff838b4000   12bfbc i915kms.ko
17    1 0xffffffff839e0000    75e30 drm.ko
18    4 0xffffffff83a56000    13770 linuxkpi.ko
19    3 0xffffffff83a6a000    13f30 linuxkpi_gplv2.ko
20    2 0xffffffff83a7e000      6d0 debugfs.ko
21    1 0xffffffff83a7f000     246d i915_skl_dmc_ver1_27_bin.ko
22    1 0xffffffff83a82000     54fc linprocfs.ko
23    1 0xffffffff83a88000     1f3c linsysfs.ko
24    1 0xffffffff83a8a000    25360 ipfw.ko
25    1 0xffffffff83ab0000     4260 ng_ubt.ko
26    6 0xffffffff83ab5000     9bd0 netgraph.ko
27    2 0xffffffff83abf000     9128 ng_hci.ko
28    3 0xffffffff83ac9000      9b0 ng_bluetooth.ko
29    1 0xffffffff83aca000     caf0 ng_l2cap.ko
30    1 0xffffffff83ad7000    1af20 ng_btsocket.ko
31    1 0xffffffff83af2000     2150 ng_socket.ko
32    1 0xffffffff83af5000      820 ubtbcmfw.ko
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

Does sdpcontrol -a 3b:46:5e:7b:00:05 browse output anything?
Code:
# hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
    BD_ADDR: 3b:46:5e:7b:00:05
    Page Scan Rep. Mode: 0x1
    Page Scan Period Mode: 0x2
    Page Scan Mode: 00
    Class: 24:04:04
    Clock offset: 0x7d5
Inquiry complete. Status: No error [00]
root@homepc:/home/bsd # sdpcontrol -a 3b:46:5e:7b:00:05
Usage: sdpcontrol options command
Where options are:
    -a address    address to connect to
    -c path        path to the control socket (default is /var/run/sdp)
    -h        display usage and quit
    -l        connect to the local SDP server via control socket
    command        one of the supported commands
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

mark_j

Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp

After successfully connecting my headphone using the above command I tried to disconnect by using CTRL+C but
it didn't worked so I closed the terminal window & that must have messed things up. Now as I mentioned it fails to connect even when using the same command :

Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp
 

mark_j

Daemon

Reaction score: 680
Messages: 1,192

mark_j

Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp

After successfully connecting my headphone using the above command I tried to disconnect by using CTRL+C but
it didn't worked so I closed the terminal window & that must have messed things up. Now as I mentioned it fails to connect even when using the same command :

Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp
It sounds like (pardon the pun), the device is locked by the previous terminal.
What if you reboot and see if you can run the command again, this time, place it in the background by appending & to it:
Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp &
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

It sounds like (pardon the pun), the device is locked by the previous terminal.
What if you reboot and see if you can run the command again, this time, place it in the background by appending & to it:
Code:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp &
Code:
# virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/3b:46:5e:7b:00:05 -d dsp &
[1] 13191
root@homepc:/home/bsd # hw.snd.basename_clone: 0 -> 0
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

This was after a reboot?
When CTRL+C failed I closed the terminal & rebooted then repeated all the same commands but it fails with those errors
Code:
backend_bt: Could not open SDP
backend_bt: PSM=0xffffffff
backend_bt: PSM not found
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

mark_j
I rebooted again & this time its connected but I don't know how to terminate the connection

bluetooth.png
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

Code:
# hccontrol -n ubt0hci read_connection_list
Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
3b:46:5e:7b:00:05     41  ACL    0 MAST    NONE       4     0 OPEN
root@homepc:/home/bsd # hccontrol -n ubt0hci disconnect 41
Connection handle: 41
Reason: Connection terminated by local host [0x16]

When I use the above procedure I hear "disconnected" but within a second I hear "connected" again.
 

mark_j

Daemon

Reaction score: 680
Messages: 1,192

Is /dev/bluetooth/3b:46:5e:7b:00:05 there?

Reply to #19, so you're saying you can't disconnect permanently? Is virtual_oss running in another terminal?
 

mark_j

Daemon

Reaction score: 680
Messages: 1,192

Because you've disconnected manually. Pull the dongle out, then re-insert it to see it.
To quote the handbook:
A connection handle is useful when termination of the baseband connection is required, though it is normally not required to do this by hand. The stack will automatically terminate inactive baseband connections.
Perhaps the only way is to stop the sdpd daemon. service sdpd stop.
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

Because you've disconnected manually.
To quote the handbook:

Perhaps the only way is to stop the sdpd daemon. service sdpd stop.
Okay I will try that.
I have 2 bluetooth headphones. Samsung Level U & Mi Super Bass. I am able to connect the Samsung but not the Mi.
This is the Mi >> Click here
 
OP
john_rambo

john_rambo

Member

Reaction score: 3
Messages: 97

The Level U headphone is Bluetooth 4.1.
The Mi Super Bass headphone is Bluetooth 5.0.

I am able to connect the Level U headphone but not the Mi Super Bass headphone.

So is Bluetooth 5.0 not supported under FreeBSD ?
 
Top