Users Guide

Tabelle 25. Betriebsmodus-Werte für WLAN und Bluetooth (fortgesetzt)
Betriebsmodus-
Wert
STA Zugriffspunkt Bluetooth EDR Bluetooth LE Unterstützte
Clients
4 X
5 X X
6 X X 32
8 X
9 X X
13 X X X
14 X X X 4
Bluetooth SPP (Serial Port Profile)
Angenommene MAC-Adressen der Bluetooth-Adapter:
BT MAC(MYCLIENT): XX:XX:XX:XX:XX:XX
BT MAC(MYSERVER): YY:YY:YY:YY:YY:YY
1. Voraussetzungen:
# sudo apt-get install bluez bluez-tools
2. Bereiten Sie das Pairing von MYSERVER und MYCLIENT vor:
# sudo bluetoothctl
[bluetoothctl]# power on
[bluetooth]# discoverable on
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX MYCLIENT
[bluetooth]# scan off
3. Führen Sie das Pairing durch:
[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
Ab Bluetooth 2.1 bietet das SPP drei Methoden für das Geräte-Pairing, die sich auf das Edge Gateway anwenden lassen:
Just Works
Numerischer Vergleich
Passkey-Eingabe
ANMERKUNG:
Weitere Informationen zum Thema Bluetooth-Pairing finden Sie unter blog.bluetooth.com/bluetooth-pairing-
part-4.
4. Konfigurieren Sie das SPP:
Servergerät
# 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
Einrichten des Betriebssystems
79