V
9  
Tags
Attachments
Dobrica Pavlinušić's random unstructured stuff
Bluetooth

This page will try to document my long-living dream of having bluetooth software keyboard HID
serial port and other stuff



xkbd-bthid : a software Bluetooth HID Keyboard

My Changes




serial SP

modify systemd script

tab:~# sdptool browese local
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory

tab:~# vi /etc/systemd/system/bluetooth.target.wants/bluetooth.service 

#ExecStart=/usr/lib/bluetooth/bluetoothd
# make sdptool browse local work again!
ExecStart=/usr/lib/bluetooth/bluetoothd --compat

tab:~# systemctl daemon-reload
tab:~# systemctl restart bluetooth.service



bring up device and make it discoverable

root@rpi2:~# hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:A3:88:32  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN 
        RX bytes:9088 acl:39 sco:0 events:343 errors:0
        TX bytes:8208 acl:44 sco:0 commands:265 errors:0

root@rpi2:~# hciconfig hci0 up

root@rpi2:~# hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:A3:88:32  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN 
        RX bytes:9784 acl:39 sco:0 events:382 errors:0
        TX bytes:8967 acl:44 sco:0 commands:304 errors:0

root@rpi2:~# hciconfig hci0 piscan

serial server

root@nuc:~# sdptool browse local | grep SP
root@nuc:~# sdptool add --channel=3 SP
Serial Port service registered
root@nuc:~# mknod -m 666 /dev/rfcomm0 c 216 0
root@nuc:~# rfcomm watch /dev/rfcomm0 3 /sbin/agetty rfcomm0 115200 linux
Waiting for connection on channel 3
Connection from B8:27:EB:A3:88:32 to /dev/rfcomm0
Press CTRL-C for hangup
Disconnected
Waiting for connection on channel 3


serial client

root@rpi2:~# sdptool browse local | grep SP
root@rpi2:~# hcitool scan
Scanning ...
        E0:2A:82:90:2D:7B       nuc
root@rpi2:~# sdptool add --channel=3 SP
Serial Port service registered
root@rpi2:~# rfcomm connect /dev/rfcomm0 E0:2A:82:90:2D:7B 3
Connected /dev/rfcomm0 to E0:2A:82:90:2D:7B on channel 3
Press CTRL-C for hangup

 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: