ls /dev
でttyUSBn
が見える(n
は数字、以降0
とする)sudo screen /dev/ttyUSB0 115200
でターミナルにつなげる$$$
とキーボードから入力するとCMD
という文字が出る(10Hzで緑LED点滅)D<Enter>
を押すとデバイスの情報がでる***Settings***
BTA=11:11:11:11:11:11
BTName=RNBT-XXXX
Baudrt(SW4)=115K
Mode =Slav
Authen=1
PinCod=<pin code>
Bonded=0
Rem=NONE SET
---<Enter>
と入力してデータ通信モードに戻る(END
という文字が出て、2Hzで緑LED点滅)動作確認完了
$ bluetoothctl
[NEW] Controller 11:11:11:11:11:11 mymachine [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 11:11:11:11:11:11 Discovering: yes
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11
[NEW] Device 11:11:11:11:11:11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11 11-11-11-11-11-11
[NEW] Device 11:11:11:11:11:11
[NEW] Device 11:11:11:11:11:11 RNBT-XXXX # ←これ
[NEW] Device 11:11:11:11:11:11
[bluetooth]# info 11:11:11:11:11:11
Device 11:11:11:11:11:11
Name: RNBT-XXXX
Alias: RNBT-XXXX
Class: 0x001f00
Paired: no
Trusted: no
Blocked: no
Connected: no
LegacyPairing: no
RSSI: -44
[bluetooth]# pair 11:11:11:11:11:11
Attempting to pair with 11:11:11:11:11:11
[CHG] Device 11:11:11:11:11:11 Connected: yes
[CHG] Device 11:11:11:11:11:11 UUIDs: 00001101-0000-1000-8000-00000000
[CHG] Device 11:11:11:11:11:11 Paired: yes
Pairing successful
[CHG] Device 11:11:11:11:11:11 Connected: no
[bluetooth]# exit
sudo rfcomm bind 0 <mac address>
で/dev/rfcomm0
があることを確認する.
sudo screen /dev/rfcomm0 115200`