Users Guide
)SPP ( Bluetooth
MAC Bluetooth:
●BT MAC(MYCLIENT): XX:XX:XX:XX:XX:XX
●BT MAC(MYSERVER): YY:YY:YY:YY:YY:YY
1. .
#sudo apt-get install bluez bluez-tools
2.
MYSERVER MYCLIENT.
#sudo bluetoothctl
[bluetoothctl]# power on
[bluetooth]# discoverable on
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX MYCLIENT
[bluetooth]# scan off
3.
.
]bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# pairable on
[bluetooth]# pair XX:XX:XX:XX:XX:XX <MAC Address of Device to Pair>
[bluetooth]# connect XX:XX:XX:XX:XX:XX [CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[bluetooth]# exit
2.1 Bluetooth SPP Edge Gateway:
●
●
●
: Bluetooth blog.bluetooth.com/bluetooth-pairing-part-4.
4. SPP.
#bluez.sdptool add --channel=22 SP
# ./rfcomm -r listen /dev/rfcomm0 22
Waiting for connection on channel 22
Connection from XX:XX:XX:XX:XX:XX to /dev/rfcomm0 <These lines will be seen when client
comes>
Press CTRL-C for hangup
Bluetooth.
$cat /dev/rfcomm0
#bluez.sdptool add --channel=22 SP
# ./rfcomm -r connect /dev/rfcomm0 YY:YY:YY:YY:YY:YY 22
ssh.
#echo "test" > /dev/rfcomm0
: Rfcomm . Edge Gateway AMD64
Ubuntu 16.04 .
77