3.3.3
The Configuration and Connection of Bluetooth Module
Configure by Command mode
1.
Check the Bluetooth device status.
1
root@Qing:~# hciconfig
2
hci0:
Type: BR/EDR
3
BD Address: 00:1A:7D:DA:71:13
4
UP RUNNING
5
RX bytes:574 acl:0 sco:0 events:30 errors:0
6
TX bytes:368 acl:0 sco:0 commands:30 errors:0
If there is no device showed, it means no driver or device.
2.
Enable Bluetooth service.
1
systemctl status bluetooth
2
## 如果没有 active , 你需要执行以下指令, 否则,无须执行
3
systemctl enable bluetooth.service
4
systemctl start bluetooth
1
connmanctl enable bluetooth
2
#or
3
# hciconfig hci0 up
3.
Open Bluetooth.
1
bluetoothctl
2
[bluetooth]# power on
3
[bluetooth]# pairable on
4
4.
Scanning Bluetooth device.
Start scanning:
1
## 扫描设备
2
[bluetooth]# scan on
3
Discovery started
4
[CHG] Controller 00:19:88:5E:10:B1 Discovering: yes
5
[NEW] Device 98:39:8E:1B:D8:88 Galaxy A5 (2016)
6
[CHG] Device 98:39:8E:1B:D8:88 RSSI: -86
7
Now, Copy the MAC Address of your PC
Stop scanning:
1
## 结束扫描
2
[bluetooth]# scan off
Please record the MAC address you want to connect.
Bus: USB
ACL MTU: 310:10
23
SCO MTU: 64:8
TPC-100W Series User Manual