Users Guide
4. 驗證作業模式。請參閱下表的作業模式值。
$ cat /sys/module/ven_rsi_sdio/parameters/dev_oper_mode
表 10. WLAN 和藍牙的作業模式值
作業模式值 Wi-Fi 站台 支援的 BT/BLE 模式 softAP softAP 支援的用戶端
1 X N/A N/A
1 N/A X 32
13 X 雙重 (傳統 BT 和 BTLE) N/A
14 雙重 (傳統 BT 和 BTLE) X 4
5 X 傳統 BT N/A
6 傳統 BT X 32
藍牙序列埠設定檔 (SPP)
各 BT 網路卡的假設 MAC 位址。
● BT MAC(MYCLIENT): XX:XX:XX:XX:XX:XX
● BT MAC(MYSERVER): YY:YY:YY:YY:YY:YY
1. 事前準備作業 (僅適用於 Debian,Ubuntu Core 作業系統無須準備)。
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. 配對這兩個裝置。自藍牙 v2.1 起,安全簡易配對為必備功能,其提供三種配對裝置的方式,均適用於 Dell Gateway 3000 系列:
● Just Works
● Numeric Comparison
● Passkey Entry
註: 如需藍牙配對的詳細資訊,請參閱 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
接著建立新終端機執行個體,以篩選藍牙序列傳來的資料。
$ cat /dev/rfcomm0
設定作業系統 53