Bluetooth Quick Start Guide on GhostBSD

Support for other hardware categories not listed below.
Post Reply
NevilleGoddard
Developer
Posts: 506
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan
Has thanked: 8 times
Been thanked: 13 times

Bluetooth Quick Start Guide on GhostBSD

Post by NevilleGoddard »

First load kernel modules:

# kldload ng_ubt
# kldload ubtbcmfw

To persist across reboots:

Put in /etc/rc.conf in the kld_list line:

sysrc kld_list+="ng_ubt"
sysrc kld_list+="ubtbcmfw"

Start services
rc-update add hcsecd
rc-update add bluetooth
rc-update add sdpd

To start these immediately:
service bluetooth start
service sdpd start

Now search for your device:
Start your phone's bluetooth


hccontrol -n ubt0hci inquiry

You should get something like:
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 38:78:88:d3:XX:b2
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 0x2
Page Scan Mode: 00
Class: 5a:02:0c
Clock offset: 0xa55
Inquiry complete. Status: No error [00]

Find out device name:

hccontrol -n ubt0hci remote_name_request 38:78:88:d3:XX:b2

You should get something like this:

BD_ADDR: 38:78:88:d3:XX:b2
Name: Xperia XZ3

Pair your device:

Edit /etc/bluetooth/hcsecd.conf

ee /etc/bluetooth/hcsecd.conf

Then edit it to look like this obviously changing bluetooth address, pin and device name to yours:

device {
bdaddr 38:78:88:d3:XX:b2;
name "Xperia XZ3";
key nokey;
pin "1234";
}

Now turn on your device to pairing
then run

#hcsecd -d

Then on your device you should see a request to pair with your computer. Enter pin that you put in at hcsecd.conf and it should pair.

If you pair successfully shut down terminal with Control C

Make a directory for the files to go to:

#mkdir /var/spool/obex

Install software to start obex server for transferring data:

#pkg ins obexapp

To transfer files from GhostBSD to phone or device:

Start obex server as root:

#obexapp -s -C OPUSH

Open another terminal as user and enter:
obexapp -c -a 38:78:88:d3:XX:b2 -C OPUSH

Then you should see in your terminal

obex>

Now choose file to transfer and use put to transfer it

obex>put /home/user$/Downloadsorwherever/file.jpg

Then on you phone you should see a request to receive file. Tap yes and the file will be transferred.

Now from phone to GhostBSD:

Choose the file then share by bluetooth, then choose GhostBSD and the file will be copied to /var/spool/obex

That's it!
Attachments
Linux oxy white.zip
(39.91 KiB) Downloaded 5 times
These users thanked the author NevilleGoddard for the post:
mapsware (Thu Jun 25, 2020 4:42 pm)
Rating: 33.33%

Post Reply