Is there a working instruction for setting up bluetooth?

Tell me the working instructions for setting up bluetooth. I tried many options from the Internet, but could not.

The device on the laptop is detected in the system, but does not connect to another bluetooth device:

/var/log/messages

Code:
kernel: ubt0: ubt_bulk_read_callback:1119: bulk-in transfer failed: USB_ERR_STALLED
kernel: ubt0: ubt_intr_read_callback:1020: interrupt transfer failed: USB_ERR_IOERROR
kernel: ubt0: at uhub5, port 1, addr 3 (disconnected)
kernel: ubt0: detached
kernel: ubt0: <Broadcom Corp HP Integrated Module, class 224/1, rev 2.00/1.00, addr 4> on usbus4

# usbconfig
ugen4.3: <Broadcom Corp HP Integrated Module> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)

# hccontrol -n ubt0hci read_connection_list
Code:
Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
lenovo                11  ACL    0 MAST    NONE       0     0 OPEN

/etc/bluetooth/hcsecd.conf
Code:
device {
        bdaddr  00:80:37:29:19:a4;
        name    "lenovo";
        key     nokey;
        pin     "1234";
}

# hcsecd -f /var/db/hcsecd.keys -d
Code:
hcsecd 48890 - - syntax error in line 1

And what am I doing wrong?

I need to check if bluetooth works on my laptop and probably make sure that it can be used.
 
Before creating hcsecd.conf turn on the bluetooth on the other device and then use hccontrol -n ubt0hci inquiry to show the device name and it's BD_ADDR. Then create the hcsecd.conf containing it's bdaddr.
 
Before creating hcsecd.conf turn on the bluetooth on the other device and then use hccontrol -n ubt0hci inquiry to show the device name and it's BD_ADDR. Then create the hcsecd.conf containing it's bdaddr.
I already do exactly what you say. And I have read this link but as you can see I am getting an error hcsecd 48890 -- syntax error on line 1
when executing the command # hcsecd -f /var/db/hcsecd.keys -d
 
# hcsecd -f /var/db/hcsecd.keys -d
Code:
hcsecd 48890 - - syntax error in line 1
And what am I doing wrong?
Your /var/db/hcsecd.keys may need to be inspected - sometimes an unprintable character or a tab character or an extra space somewhere sneak in, and throw native BSD utilities off. I've had that kind of thing happen to me in the past. Files containing ASCII keys are pretty sensitive to having incorrect characters sneak in and mess up the whole enchilada.

Try running cat /var/db/hcsecd.keys and see if you can spot anything weird.
 
Your /var/db/hcsecd.keys may need to be inspected - sometimes an unprintable character or a tab character or an extra space somewhere sneak in, and throw native BSD utilities off. I've had that kind of thing happen to me in the past. Files containing ASCII keys are pretty sensitive to having incorrect characters sneak in and mess up the whole enchilada.

Try running cat /var/db/hcsecd.keys and see if you can spot anything weird.
Code:
root@hp:~ # cat /var/db/hcsecd.keys
root@hp:~ #
It did not give any result, it looks like there is nothing in it
 
Your /var/db/hcsecd.keys may need to be inspected - sometimes an unprintable character or a tab character or an extra space somewhere sneak in, and throw native BSD utilities off. I've had that kind of thing happen to me in the past. Files containing ASCII keys are pretty sensitive to having incorrect characters sneak in and mess up the whole enchilada.

Try running cat /var/db/hcsecd.keys and see if you can spot anything weird.
Oops, not hcsecd.keys but hcsecd.conf - I mean like hcsecd(8) says. I apologize for the confusion.
 
However, I see that nothing happens from
# hcsecd -f /etc/bluetooth/hcsecd.conf -d command.

And although my laptop and phone can see each other, it does not ask for a PIN code
 
I managed to get bluetooth to work with my bluetooth headphones, as well as with a bluetooth speaker.

I got by without hcsecd. It looks like a connection should occur when create_connection occurs.
 
Yeah, Bluetooth on FreeBSD is tricky. I struggled with the pairing of my Logitech M535 mouse, it worked, but only until next reboot. It turned out that the whole point was authentication.

During the pairing process I had to enter # hccontrol -n ubt0hci write_authentication_enable 1
As a result, /var/db/hcsecd.keys includes something like 00:1f:20:f8:90:2f cf6fc48842b49542af7fc2a4ced9b009 and pairing survives every restart.

Interestingly, the PIN did not play a role.
 
Back
Top