Difference between revisions of "BT BoosterPack"
(→Useful Links) |
(→Overview) |
||
Line 3: | Line 3: | ||
[[File:BT Boosterpack.jpg|thumb|400px|right]] | [[File:BT Boosterpack.jpg|thumb|400px|right]] | ||
BT Boosterpack is a serial port Bluetooth [[shield]] for LaunchPad. BT Boosterpack expand the LaunchPad with Bluetooth communication functions, supports master and slave mode. It will be much easier to make your cell phone or laptop to talk with LaunchPad now. | BT Boosterpack is a serial port Bluetooth [[shield]] for LaunchPad. BT Boosterpack expand the LaunchPad with Bluetooth communication functions, supports master and slave mode. It will be much easier to make your cell phone or laptop to talk with LaunchPad now. | ||
+ | |||
+ | Go shopping [http://imall.iteadstudio.com/bt-boosterpack.html BT BoosterPack (IM120704001)] | ||
==Features== | ==Features== |
Revision as of 06:18, 11 June 2014
Contents
- 1 Overview
- 2 Features
- 3 Specifications
- 4 Electrical Characteristics
- 5 Hardware
- 6 AT command
- 6.1 1. Test command:
- 6.2 2. Reset
- 6.3 3. Get firmware version
- 6.4 4. Restore default
- 6.5 5. Get module address
- 6.6 6. Set/Check module name:
- 6.7 7. Get the Bluetooth device name:
- 6.8 8. Set/Check module mode:
- 6.9 9. Set/Check device class
- 6.10 10. Set/Check GIAC (General Inquire Access Code)
- 6.11 11. Set/Check -- Query access patterns
- 6.12 12. Set/Check PIN code:
- 6.13 13. Set/Check serial parameter:
- 6.14 14. Set/Check connect mode:
- 6.15 15. Set/Check fixed address:
- 6.16 16. Set/Check LED I/O
- 6.17 17. Set PIO output
- 6.18 18. Set/Check – scan parameter
- 6.19 19. Set/Check – SHIFF parameter
- 6.20 20. Set/Check security mode
- 6.21 21. Delete Authenticated Device
- 6.22 22. Delete All Authenticated Device
- 6.23 23. Search Authenticated Device
- 6.24 24. Get Authenticated Device Count
- 6.25 25. Most Recently Used Authenticated Device
- 6.26 26. Get the module working state
- 6.27 27. Initialize the SPP profile lib
- 6.28 28. Inquiry Bluetooth Device
- 6.29 29. Cancel Inquiring Bluetooth Device
- 6.30 30. Equipment Matching
- 6.31 31. Connect Device
- 6.32 32. Disconnect
- 6.33 33. Energy-saving mode
- 6.34 34. Exerts Energy-saving mode
- 7 Download
- 8 Useful Links
Overview
BT Boosterpack is a serial port Bluetooth shield for LaunchPad. BT Boosterpack expand the LaunchPad with Bluetooth communication functions, supports master and slave mode. It will be much easier to make your cell phone or laptop to talk with LaunchPad now.
Go shopping BT BoosterPack (IM120704001)
Features
- LaunchPad / LaucnchPad XL / LaunchPad XLL compatible, and stackable for other BoosterPack
- Up to10m communication distance in house without obstacle
- UART interface (TTL) with programmable baud rate (SPP firmware installed)
- Default baud rate: 38400(CMD MODE) / 9600(DATA MODE), data bits: 8, stop bit: 1, Parity: No parity
- Default PINCODE: 1234
- A full set of configuration commandsOn board PCB antenna
- FCC ID certificated
Specifications
Microprocessor | CSR BC417 |
PCB size | 53.34mm X 43.18mm X 1.6mm |
Indicators | PWR, status, link |
Power supply | 3.3V DC |
IO | 2 |
Communication Protocol | UART/Bluetooth 2.0 |
Electrical Characteristics
Specification | Min | Type | Max | Unit |
Power Voltage | 3 | 3.3 | 3.6 | VDC |
Input Voltage VH(Target Voltage = 3.3V ) | 3 | 3.3 | 3.6 | V |
Input Voltage VL: | -0.3 | 0 | 0.5 | V |
Current Consumption | 20 | 45 | mA |
Hardware
Figure 1 Top view of BT shield V2.2
Pin Map
MODE | P1.0 |
TX | P1.1 |
RX | P1.2 |
BT_Ret | P1.3 |
Status | P1.4 |
Link | P1.5 |
EB6 | P1.6 |
EB7 | P1.7 |
Mode Button
The Mode Button is connected with PIO11 of HC-05. When Mode Button is pressed, the PIO11 of HC-05 will be in HIGH level, and the module will change to AT command mode.
If Mode Button is pressed in different status, HC-05 module will enter different AT mode.
AT command mode 1:
When the Mode Button is pressed after power on or reset (when the boosterpack is working in DATA mode), the boosterpack will enter AT command mode 1. The UART baud rate in AT command mode 1 is the same as Data mode, default 9600bps.
AT command mode 2:
When the Mode Button is pressed before power on, and hold until power on or reset, the boosterpack will enter AT command mode 2. The UART baud rate in AT command mode 2 is 38400bps.
The PIO11 pin is also connect to the P1.0 of LaunchPad, users can use the LanchPad to change the mode of BT Boosterpack in any time.
Reset Button
The Reset Button is connected with reset pin of HC-05. When Reset Button is pressed, the PIO11 of HC-05 will be in LOW level.
When Reset Button is pressed, the BT BoosterPack will reset.
The PIO11 pin is also connect to the P1.3 of LaunchPad, users can use the LaunchPad to reset the BT boosterpack in any time.
PWR LED
PWR LED is the indicator of power supply. When power on, it will keep lighting.
Status LED
The Status LED is connected to PIO8 of HC-05. It is the indicator of the BT Boosterpack working mode.
If the Status LED blinks at 1Hz, BT Boosterpack is in AT command mode 2.
If the Status LED blinks at 2Hz, BT Boosterpack is in AT command mode 1 or in pairing mode (in this mode, cannot transfer data yet).
If the Status LED double blinks, BT Boosterpack has finished pairing, and enter DATA mode, it’s ready for data transfer.
The PIO8 pin is also connect with the P1.4 pin of LaunchPad, users can use the LaunchPad to read the BT Boosterpack working mode.
Link LED
The Link LED is connected to PIO9 of HC-05, and it’s the indicator of Link/Connection status.
- If the Link LED is light on, BT Boostpack is connected with some other
Bluetooth device, and ready for data transfer.
- If the Link LED is light off, BT Boostpack is not connected with any other
device.
The PIO9 pin is also connect with P1.5 of Launch Pad, users can use the LaunchPad to read the link/connection status of BT Boosterpack.
AT command
1. Test command:
Command | Respond | Parameter |
AT | OK | - |
2. Reset
Command | Respond | Parameter |
AT+RESET | OK | - |
3. Get firmware version
Command | Respond | Parameter |
AT+VERSION? | +VERSION:<Param> OK | Param : firmware version |
Example:
AT+VERSION?\r\n
+VERSION:2.0-20100601
OK
4. Restore default
Command | Respond | Parameter |
AT+ORGL | OK | - |
Default state:
Slave mode, pin code :1234, device name: H-C-2010-06-01 ,Baud 38400bits/s.
5. Get module address
Command | Respond | Parameter |
AT+ADDR? | +ADDR:<Param> OK | Param: address of Bluetooth module |
Bluetooth address: NAP: UAP : LAP(HEX)
Example:
AT+ADDR?\r\n
+ADDR:1234:56:abcdef
OK
6. Set/Check module name:
Command | Respond | Parameter |
AT+NAME=<Param> | OK | Param: Bluetooth module name (Default :HC-05) |
AT+NAME? | +NAME:<Param> OK (/FAIL) | Param: Bluetooth module name (Default :HC-05) |
Example:
AT+NAME=HC-05\r\n set the module name to HC-05
OK
AT+NAME=ITeadStudio\r\n
OK
AT+NAME?\r\n
+NAME: ITeadStudio
OK
7. Get the Bluetooth device name:
Command | Respond | Parameter |
AT+RNAME?<Param1> | 1. +NAME:<Param2> OK 2. FAIL | Param1,Param 2 : the address of Bluetooth device |
Example: (Device address 00:02:72:od:22:24,name:ITead)
AT+RNAME? 0002,72,od2224\r\n
+RNAME:ITead
OK
8. Set/Check module mode:
Command | Respond | Parameter |
AT+ROLE=<Param> | OK | Param: 0- Slave 1-Master 2-Slave-Loop |
AT+ ROLE? | +ROLE:<Param> OK | Param: 0- Slave 1-Master 2-Slave-Loop |
9. Set/Check device class
Command | Respond | Parameter |
AT+CLASS=<Param> | OK | Param: Device Class |
AT+ CLASS? | 1. +CLASS:<Param> OK 2. FAIL | Param: Device Class |
10. Set/Check GIAC (General Inquire Access Code)
Command | Respond | Parameter |
AT+IAC=<Param> | 1.OK 2. FAIL | Param: GIAC (Default : 9e8b33) |
AT+IAC | +IAC:<Param> OK | Param: GIAC (Default : 9e8b33) |
Example:
AT+IAC=9e8b3f\r\n
OK
AT+IAC?\r\n
+IAC: 9e8b3f
OK
11. Set/Check -- Query access patterns
Command | Respond | Parameter |
AT+INQM=<Param>,<Param2>, <Param3> | 1.OK 2. FAIL | Param: 0——inquiry_mode_standard 1——inquiry_mode_rssi Param2: Maximum number of Bluetooth devices to respond to Param3: Timeout (1-48 : 1.28s to 61.44s) |
AT+ INQM? | +INQM :<Param>,<Param2>, <Param3> OK | Param: 0——inquiry_mode_standard 1——inquiry_mode_rssi Param2: Maximum number of Bluetooth devices to respond to Param3: Timeout (1-48 : 1.28s to 61.44s) |
Example:
AT+INQM=1,9,48\r\n
OK
AT+INQM\r\n
+INQM:1, 9, 48
OK
12. Set/Check PIN code:
Command | Respond | Parameter |
AT+PSWD=<Param> | OK | Param: PIN code (Default 1234) |
AT+ PSWD? | + PSWD :<Param> OK | Param: PIN code (Default 1234) |
13. Set/Check serial parameter:
Command | Respond | Parameter |
AT+UART=<Param>,<Param2>,<Param3> | OK | Param1: Baud Param2: Stop bit Param3: Parity |
AT+UART? | +UART=<Param>,<Param2>, <Param3> OK | Param1: Baud Param2: Stop bit Param3: Parity |
Example:
AT+UART=115200,1,2,\r\n
OK
AT+UART?
+UART:115200,1,2
OK
14. Set/Check connect mode:
Command | Respond | Parameter |
AT+CMODE=<Param> | OK | Param: 0 - connect fixed address 1 - connect any
address 2 - slave-Loop |
AT+ CMODE? | + CMODE:<Param> OK | Param: 0 - connect fixed address 1 - connect any address 2 - slave-Loop |
15. Set/Check fixed address:
Command | Respond | Parameter |
AT+BIND=<Param> | OK | Param: Fixed address (Default 00:00:00:00:00:00) |
AT+ BIND? | + BIND:<Param> OK | Param: Fixed address (Default 00:00:00:00:00:00) |
Example:
AT+BIND=1234,56,abcdef\r\n
OK
AT+BIND?\r\n
+BIND:1234:56:abcdef
OK
16. Set/Check LED I/O
Command | Respond | Parameter |
AT+POLAR=<Param1,<Param2> | OK | Param1: 0- PIO8 low drive LED 1- PIO8 high drive
LED Param2: 0- PIO9 low drive LED 1- PIO9 high drive LED |
AT+ POLAR? | + POLAR=<Param1>,<Param2> OK | Param1: 0- PIO8 low drive LED 1- PIO8 high drive LED Param2: 0- PIO9 low drive LED 1- PIO9 high drive LED |
17. Set PIO output
Command | Respond | Parameter |
AT+PIO=<Param1>,<Param2> | OK | Param1: PIO number Param2: PIO level 0- low 1- high |
Example:
1. PIO10 output high level
AT+PI0=10,1\r\n
OK
18. Set/Check – scan parameter
Command | Respond | Parameter |
AT+IPSCAN=<Param1>,<Param2>,<Param3>,<Param4> | OK | Param1: Query time interval
Param2 : Query duration Param3 : Paging interval Param4 : Call duration |
AT+IPSCAN? | +IPSCAN:<Param1>,<Param2>,<Param3>,<Param4> OK | Param1: Query time interval Param2 : Query duration Param3 : Paging interval Param4 : Call duration |
Example:
AT+IPSCAN =1234,500,1200,250\r\n
OK
AT+IPSCAN?
+IPSCAN:1234,500,1200,250
19. Set/Check – SHIFF parameter
Command | Respond | Parameter |
AT+SNIFF=<Param1>,<Param2>,<Param3>,<Param4> | OK | Param1: Max time Param2: Min time Param3: Retry time Param4: Time out |
AT+ SNIFF? | +SNIFF:<Param1>,<Param2>,<Param3>,<Param4> OK | Param1: Max time Param2: Min time Param3: Retry time Param4: Time out |
20. Set/Check security mode
Command | Respond | Parameter |
AT+SENM=<Param1>,<Param2> | 1. OK 2. FAIL | Param1:
0——sec_mode0+off 1——sec_mode1+ non_secure 2——sec_mode2_ service 3——sec_mode3_l ink 4——sec_mode_u nknown Param2: 0——hci_enc_mod e_off 1——hci_enc_mod e_pt_to_pt 2——hci_enc_mod e_pt_to_pt_and_b cast |
AT+ SENM? | + SENM:<Param1>,<Param2> OK | Param1:
0——sec_mode0+off 1——sec_mode1+ non_secure 2——sec_mode2_ service 3——sec_mode3_l ink 4——sec_mode_u nknown Param2: 0——hci_enc_mod e_off 1——hci_enc_mod e_pt_to_pt 2——hci_enc_mod e_pt_to_pt_and_b cast |
21. Delete Authenticated Device
Command | Respond | Parameter |
AT+PMSAD=<Param> | OK | Param: Authenticated Device Address |
Example:
AT+PMSAD =1234,56,abcdef\r\n
OK
22. Delete All Authenticated Device
Command | Respond | Parameter |
AT+ RMAAD | OK | - |
23. Search Authenticated Device
Command | Respond | Parameter |
AT+FSAD=<Param> | 1. OK 2. FAIL | Param: Device address |
24. Get Authenticated Device Count
Command | Respond | Parameter |
AT+ADCN? | +ADCN:<Param> OK | Param: Device Count |
25. Most Recently Used Authenticated Device
Command | Respond | Parameter |
AT+MRAD? | + MRAD:<Param> OK | Param: Recently Authenticated Device Address |
26. Get the module working state
Command | Respond | Parameter |
AT+ STATE? | + STATE:<Param> OK | Param: "INITIALIZED" "READY" "PAIRABLE" "PAIRED" "INQUIRING" "CONNECTING" "CONNECTED""DISCONNECTED" "NUKNOW" |
27. Initialize the SPP profile lib
Command | Respond | Parameter |
AT+INIT | 1. OK 2. FAIL | - |
28. Inquiry Bluetooth Device
Command | Respond | Parameter |
AT+INQ | +INQ: <Param1>, <Param2>, <Param3> …. OK | Param1:Address Param2 : Device Class Param3 : RSSI Signal strength |
Example:
AT+INIT\r\n
OK
AT+IAC=9e8b33\r\n
OK
AT+CLASS=0\r\n
AT+INQM=1,9,48\r\n
At+INQ\r\n
+INQ:2:72:D2224,3E0104,FFBC
+INQ:1234:56:0,1F1F,FFC1
+INQ:1234:56:0,1F1F,FFC0
+INQ:1234:56:0,1F1F,FFC1
+INQ:2:72:D2224,3F0104,FFAD
+INQ:1234:56:0,1F1F,FFBE
+INQ:1234:56:0,1F1F,FFC2
+INQ:1234:56:0,1F1F,FFBE
+INQ:2:72:D2224,3F0104,FFBC
OK
29. Cancel Inquiring Bluetooth Device
Command | Respond | Parameter |
AT+ INQC | OK | - |
30. Equipment Matching
Command | Respond | Parameter |
AT+PAIR=<Param1>,<Param2> | 1. OK 2. FAIL | Param1 :Device Address Param2:Time out |
31. Connect Device
Command | Respond | Parameter |
AT+LINK=<Param> | 1. OK 2. FAIL | Param : Device Address |
Example:
AT+FSAD=1234,56,abcdef\r\n
OK
AT+LINK=1234,56,abcdef\r\n
OK
32. Disconnect
Command | Respond | Parameter |
AT+DISC | 1. +DISC:SUCCESS OK 2. +DISC:LINK_LOSS OK 3. +DISC:NO_SLC OK 4. +DISC:TIMEOUT OK 5. +DISC:ERROR OK | Param : Device Address |
33. Energy-saving mode
Command | Respond | Parameter |
AT+ENSNIFF=<Param> | OK | Param : Device Address |
34. Exerts Energy-saving mode
Command | Respond | Parameter |
AT+ EXSNIFF =<Param> | OK | Param : Device Address |
Application Example
This is a demo that HC-05 is a master device and communicates to hc-06.
Step 1. Push the mode switch to CMD
Step 2. Power on, module enter command state
Step 3. Using baud rate 38400, send the ―AT+ROLE=1\r\n‖ to module, with ―OK\r\n‖ means setting successes.
Step 4. Send ―AT+CMODE=1\r\n‖, set HC-05 connect to any address, with ―OK\r\n‖ means setting successes.
Download
Demo code for BT BoosterPack Loop
Demo code for BT BoosterPack Control