Users Guide

25. WLAN Bluetooth 작동 모드 (계속)
작동 모드 STA AP BT EDR BLE 지원되는 클라이언
8 X
9 X X
13 X X X
14 X X X 4
Bluetooth SPP(Serial Port Profile)
BT 어댑터의 MAC 주소에 대한 가정:
BT MAC(MYCLIENT): XX:XX:XX:XX:XX:XX
BT MAC(MYSERVER): YY:YY:YY:YY:YY:YY
1. 사전 요구 사항입니다.
# sudo apt-get install bluez bluez-tools
2. MYSERVER MYCLIENT 페어링을 준비합니다.
# sudo bluetoothctl
[bluetoothctl]# power on
[bluetooth]# discoverable on
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX MYCLIENT
[bluetooth]# scan off
3. 서로 페어링합니다.
[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
Bluetooth V2.1부터 SPP Edge Gateway 적용 가능한 가지 디바이스 페어링 방법을 제공합니다.
Just Works(바로 작동)
Numeric Comparison(숫자 비교)
Passkey Entry(패스키 입력)
노트: Bluetooth 페어링에 대한 자세한 내용은 blog.bluetooth.com/bluetooth-pairing-part-4 참조하십시오.
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
78 운영 체제 설정