Users Guide

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 和更低版本安全简单配对是要求并且提供三种设备配对方法适用于 Dell Gateway 3000
直接连接
数字比较
密钥条目
: 有关蓝牙配对的更多信息请参阅 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
客户端设备
$ 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
串行端口
默认情况下RS-232RS-422 RS-485 LED 状态是 OFF。仅当传输数据时它才是 ON。设备节点从最左边端口
(RS-232) 开始按端口位置排序。
. 14: 串行端口
编号 端口类型 设备节点 制造商部件号
1 RS-232
RS-422
RS-485
COM3 JVE Global
23N6963-10D00B-15G-2.9
http://www.jve.com.cn/
设置操作系统
55