블루투스(Bluetooth) 모듈 HC-06 슬레이브 보드
설명
시리얼 포트 블루투스, 드롭 인 (drop-in) 유선 직렬 연결, 투명한 사용을 위해 교체. 당신은 MCU 및 GPS 사이의 연결을 설정하는 직렬 포트 교체를 위해 간단하게 사용할 수 있습니다, PC 임베디드 프로젝트 등을
HC-06은 마스터 또는 슬레이브 공장, 사용자 않았어 \\\ 't 역할을 변경 설계 할 수있다.
사양
* 블루투스 프로토콜 : 블루투스 사양 V2.0+EDR
* 주파수 : 2.4GHz ISM 밴드
* 변조 : GFSK(Gaussian Frequency Shift Keying)
* 방사 전력 : ≤4dBm, Class 2
* 감도 : ≤-84dBm at 0.1% BER
* 속도 : 비동기 - 2.1Mbps(Max) / 160 kbps, 동기 - 1Mbps / 1Mbps
* 보안 : 인증 및 암호화
* 프로파일 : 블루투스 시리얼 포트
입력 전압 : +3.3~6.0VDC
동작 전압 : +.3VDC 50mA
동작 온동 : 섭씨 -20 ~ +75
치수 : 26.9mm x 13mm x 2.2 mm
응용
* 컴퓨터 및 병렬 디바이스
* GPS 수신기
* 산업 제어
* MCU 프로젝트
사용방법
BAUD 변경
명령어 : AT+BAUD1
해 설 : AT+BAUD와 1~C 를 파라메터로 주면 1200bps ~ 1382400bps까지 변경가능합니다.
예) 115200bps로 변경시 “AT+BAUD8” 을 주면 됩니다.
접속이름 변경
명령어 : AT+NAMEtest
해 설 : AT+NAME뒤에 접속시 사용할 이름을 지정해 주면 됩니다. 영문 최대 20자까지 입력가능합니다.
예) 접속이름을 KOREA로 할시 “AT+NAMEKOREA” 로 명령을 주면됩니다.
접속암호 변경
명령어 : AT+PIN0000
해 설 : AT+PIN뒤에 접속시 사용할 암호를 지정해 주면 됩니다. 공장출하 암호는 1234입니다.
예) 접속암호를 4321로 변경시 “AT+PIN4321” 로 명령을 주면됩니다.
* 설정된 파라메터는 전원OFF시에도 내부 플래쉬 메모리에 계속 유지됩니다.
1. Set working MODE
\r\n+STWMOD=0\r\n | Set device working mode as client (slave). Save and Rest. |
\r\n+STWMOD=1\r\n | Set device working mode as server (master). Save and Rest. |
Note: \r\n is necessary for operation and the value of are 0x0D 0x0A in Hex. \r and \n represent carriage-return and line-feed(or next line),
2.Set BAUDRATE
\r\n+STBD=115200\r\n | Set baudrate 115200. Save and Rest. |
Supported baudrate: 9600, 19200,38400,57600,115200,230400,460800. |
3. Set Device NAME
\r\n+STNA=abcdefg | Set device name as “abcdefg”. Save and Rest. |
4. Auto-connect the last paired device on power
\r\n+STAUTO=0\r\n | Auto-connect forbidden. Save and Rest. |
\r\n+STAUTO=1\r\n | Permit Auto-connect. Save and Rest. |
5. Permit Paired device to connect me
\r\n+STOAUT=0\r\n | Forbidden. Save and Rest. |
\r\n+STOAUT=1\r\n | Permit. Save and Rest. |
6. Set PINCODE
\r\n +STPIN=2222\r\n | Set pincode “2222”, Save and Rest. |
7. Delete PINCODE(input PINCODE by MCU)
\r\n+DLPIN\r\n | Delete pincode. Save and Rest. |
8. Read local ADDRESS CODE
\r\n+RTADDR\r\n | Return address of the device. |
9. Auto-reconnecting when master device is beyond the valid range (slave device will auto-reconnect in 30 min when it is beyond the valid range)
\r\n+LOSSRECONN=0\r\n | Forbid auto-reconnecting. |
\r\n+LOSSRECONN=1\r\n | Permit auto-reconnecting. |
1. Inquire
a) Master | |
\r\n+INQ=0\r\n | Stop Inquiring |
\r\n+INQ=1\r\n | Begin/Restart Inquiring |
b) Slave | |
\r\n+INQ=0\r\n | Disable been inquired |
\r\n+INQ=1\r\n | Enable been inquired |
When +INQ=1 command is successful, the red and green LEDS blink alternatively.
2. Bluetooth module returns inquiring result
\r\n+RTINQ=aa,bb,cc,dd,ee,ff;name\r\n | Serial Bluetooth device with the address “aa,bb,cc,dd,ee,ff” and the name “name” is inquired |
3. Connect device
\r\n+CONN=aa,bb,cc,dd,ee,ff\r\n | Connect to a device with address of "aa,bb,cc,dd,ee,ff” |
4. Bluetooth module requests inputting PINCODE
\r\n+INPIN\r\n
5. Input PINCODE
\r\n+RTPIN=code\r\n | |
Example: RTPIN=0000 | Input PINCODE which is four zero |
6. Disconnect device Pulling PIO0 high will disconnect current working Bluetooth device.
7. Return status \r\n+BTSTA:xx\r\n
xx status:
(Note: This is not a command, but the information returned from the module after every command)