Users Guide
● BT MAC(MYCLIENT): XX:XX:XX:XX:XX:XX
● BT MAC(MYSERVER): YY:YY:YY:YY:YY:YY
1. 事前要件(Debian のみ、Ubuntu Core OS には不要)。
sudo apt-get install bluez bluez-tools
2. MYSERVER と MYCLIENT をペアリングする準備をします。
$ sudo bluez.bluetoothctl -a
[bluetoothctl]# power on
[bluetooth]# discoverable on
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX MYCLIENT
[bluetooth]# scan off
3. 相互にペアリングします。Bluetooth v2.1 の時点では、セキュア シンプル ペアリングは必要条件であり、次の 3 つのデバイス
ペアリング方式を提供しています。Dell Gateway 3000 シリーズではこれらの方法を使用できます。
● Just Works
● Numeric Comparison
● Passkey Entry
メモ: Bluetooth ペアリングの詳細については、https://blog.bluetooth.com/bluetooth-pairing-part-4 を参照してください。
[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
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 コマンドは使用できません。必要に応じて、Ubuntu 16.04 以上を実行している AMD64 ベー
スのシステムから Edge Gateway へバイナリをコピーできます。
セキュリティ
信頼済みプラットフォームモジュール(TPM)
メモ: TPM の詳細については、https://developer.ubuntu.com/en/snappy/guides/security-whitepaper/を参照してください。
オペレーティング システムのセット アップ 55