Bluetooth UART Module 1545 Robokits
Bluetooth UART Module 1545 Robokits
Page 1
Features
Onboard regulator and Status LEDs Easy to use 4 pin communication. Just provide RX, TX, VCC and GND. Compatible with 3.3 to 5V TTL serial Easy configuration through AT commands(Soldering required) Status and Pairing LEDs Support Master & Slave Mode Serial communications: 9600-115200bps SPP (Serial Port Profile) support Support UART,USB,PCM interface to host system Encrypted connection Frequency: 2.4~2.524 GHz Bluetooth core V2.0 compliant Built-in Chip antenna
Page 2
Page 3
Please note that this devise is very sensitive to ESD and proper care must be taken while soldering. Normal soldering iron will work for the soldering job, no special equipment is needed. After configuring power down the module and remove shoring, on power up module will work as per configuration saved. You can use any terminal software for AT configuration. You can also use our terminal software for configuration. It can be downloaded here (requires .net framework 4) : http://robokits.co.in/downloads/Robokits_Super_Terminal_Setup_without_dotnet.exe
AT command set
Robokits Bluetooth UART Module (can be short for module) has two work modes: orderresponse work mode and automatic connection work mode. And there are three work roles (Master, Slave and Loopback) at the automatic connection work mode. When the module is at the automatic connection work mode, it will follow the default way set lastly to transmit the data automatically. When the module is at the order-response work mode, user can send the AT command to the module to set the control parameters and sent control order.
2. Notes.
Robokits Bluetooth modules command should end up with \r\n. It means when you finish programming, you should add terminator (ENTER or 0x0d 0x0a) to the program. The most common commands are: AT+ROLE (set master slave), AT+CMODE( set address pairing) , AT+PSWD (set password). If you want the master module has the function of remembering slave module, the most simply way is: First, set AT+CMODE=1. Make the master module pair with the slave module. Second, set AT+CMODE=0. Then the master module just can make pair with that specified slave module.
Page 4
1.Test Command AT 2. Reset Command AT+RESET 3.Get the soft version Command AT+VERSION? Response +VERSION:<Param> OK Parameter Param:Version Number Response OK Parameter None Response OK Parameter None
Example : at+version?\r\n +VERSION:2.0-20100601 OK 3. Restore default status Command AT+ ORGL The parameter of default status: Device type: 0 Inquire code: 0x009e8b33 Module work mode: Slave Mode Connection mode: Connect to the Bluetooth device specified Serial parameter: Baud rate: 38400 bits/s; Stop bit: 1 bit; Parity bit: None. Passkey: 1234 Device name: H-C-2010-06-01 Response OK Parameter None
Page 5
4. Get module Bluetooth address Command AT+ADDR? Response +ADDR:<Param> OK Parameter Param:Bluetooth Address
Bluetooth address will show as this way: NAP: UAP: LAP(Hexadecimal) Example: Module Bluetooth address: 12: 34: 56: ab: cd: ef at+addr?\r\n +ADDR:1234:56:abcdef OK 5. Set/ inquire devices name Command AT+NAME=<Param> AT+NAME? Response OK 1. +NAME:<Param> OK----success 2. FAIL----failure Parameter Param: Bluetooth device name Default: Robokits
Example: AT+NAME=Robokits \r\n OK AT+NAME= Robokits\r\n OK at+name=Bluetooth\r\ OK at+name= Bluetooth\r\n OK at+name?\r\n +NAME: Bluetooth OK ---set the module device name: Robokits
Page 6
6. Get the remote Bluetooth devices name Command Response AT+RNAME?<Param1> 1. +NAME:<Param2> OK----success 2. FAIL----failure
Parameter Param1: Remote Bluetooth device address Param2: Remote Bluetooth device address Bluetooth address will show as this way: NAP:UAP:LAP (Hexadecimal)
Example: Bluetooth device address: 00:02:72: od: 22 : 24; device name: Bluetooth at+rname? 0002,72,od2224\r\n +RNAME:Bluetooth OK 7. Set/ inquire module role Command AT+ROLE=<Param> AT+ ROLE? Response OK + ROLE:<Param> OK Param: 0 Parameter Param: 0---- Slave role 1---- Master role 2---- Slave-Loop role Default:
Role introduction: Slave (slave role)----Passive connection; Slave-Loop----Passive connection, receive the remote Bluetooth master device data and send it back to the master device; Master (master role)----Inquire the near SPP Bluetooth slave device, build connection with it positively, and build up the transparent data transmission between master and slave device. 8. Set/inquire device type Command AT+CLASS=<Param> Response OK 1. + CLASS:<Param> OK----success 2. FAIL----failure AT+ CLASS? Parameter Param: device type Bluetooth device type is a 32-bit parameter indicates the device type and what type can be supported.
Page 7
Default: 0 More information is provided at the appendix 1(device type introduction). For inquiring the custom Bluetooth device from around Bluetooth devices quickly and effectively, user can set the module to be non-standard Bluetooth device type, such as 0x1f1f (Hexadecimal).
Parameter Param: Inquire access code Default: 9e8b33 The more information is provided at the
AT+ IAC?
+IAC: <Param> OK
Access code is set to be GIAC type (General Inquire Access Code:0x9e8b33), and used for seeking ( or being sought by ) all the Bluetooth devices around. For inquiring (or being inquiring by) the custom Bluetooth device from around Bluetooth devices quickly and effectively, user can set the inquire access code to be the other type number (not GIAC nor LIAC), such as 9e8b3f. Example: AT+IAC=9e8b3f\r\n OK AT+IAC?\r\n +IAC: 9e8b3f OK
Page 8
10.Set/ inquire - Inquire access mode Command Response AT+INQM=<Param>, 1. OK----success <Param2>,<Param3> 2. FAIL----failure AT+ INQM? +INQM:<Param>,<Param2>,<P aram3> OK Param
Parameter Param: Inquire access mode 0----inquiry_mode_standard 1----inquiry_mode_rssi Param2: the maximum of Bluetooth devices response Param3:The maximum of limited inquiring time The range of limited time: 1~48 ( Corresponding time:1.28s~61.44s) Default: 1, 1, 48
Example: AT+INQM=1,9,48\r\n
----Set Inquire access mode: 1) has RSSI signal intensity indicator, 2) stop inquiring once more than 9 devices response, 3) limited time is 48*l. 28=61.44s.
OK AT+INQM\r\n +INQM:1, 9, 48 OK 12. Set/Inquire- passkey Command AT+PSWD=<Param> AT+ PSWD? Response OK + PSWD : <Param> OK Parameter Param: passkey Default: 1234
Page 9
13.Set/ Inquire- serial parameter Command AT+UART=<Param>,< Param2>,<Param3> Response OK Parameter Param1: baud rate( bits/s) The value (Decimal) should be one of the following: 4800 9600 19200 38400 57600 115200 23400 460800 921600 1382400 Param2:stop bit: 0----1 bit 1----2 bits Param3: parity bit 0----None 1----Odd parity 2----Even parity Default: 9600, 0, 0
AT+ UART?
+ UART=<Param>,<Para m2>,<Param3> OK
Example: Set baud rate to be 115200, stop bit to be 2 bits, parity bit to be even parity. AT+UART=115200,1,2,\r\n OK AT+UART? +UART:115200,1,2 OK
14. Set/ Inquire - connection mode Command AT+CMODE=<Param> AT+ CMODE? Response OK + CMODE:<Param> OK Parameter Param: 0----connect the module to the specified Bluetooth address. (Bluetooth address can be
Page 10
specified by the binding command) 1----connect the module to any address (The specifying address has no effect for this mode.) 2----Slave-Loop Default connection mode: 0
15. Set/Inquire - bind Bluetooth address Bluetooth address will show as this way: NAP: UAP:LAP(Hexadecimal) Command AT+BIND=<Param> AT+ BIND? Response OK + BIND:<Param> OK Parameter Param----Bluetooth address needed to be bind Default address: 00:00:00:00:00:00
Bluetooth address will show as this way: NAP:UAP:LAP(Hexadecimal) This command is effective only when the module wants to connect to the specified Bluetooth address.
Example: The module is at connection mode which connects to specified Bluetooth address, and the specified address is 12:34:56:ab:cd:ef. Command and the response show as follow: AT+BIND=1234, 56, abcdef\r\n OK AT+BIND?\r\n +BIND:1234:56:abcdef OK 16. Set/Inquire - drive indication of LED and connection status Command Response Parameter
Page 11
OK + POLAR=<Param1>, <Param1> OK
Param1:The value is 0----PI08 outputs low level and turn on LED 1----PI08 outputs high level and turn on LED Param2:The value is 0----PI09 output low level, indicate successful connection 1----PI09 output high level, and indicate successful connection Default: 1, 1
HC-05 Bluetooth module definition: The output of PI08 drives indication of LED work mode; the output of PI09 indicates the connection status. Example: PI08 outputs low level and turn on LED, PI09 outputs high level and indicates successful connection. Command and response show as follow: AT+POLAR=0, 1\r\n OK AT+POLAR?\r\n +POLAR=0, 1 OK
17. Set PIO single port output Command Response Parameter Param1: PIO port number(Decimal) Param2: PIO port status 0----low level 1----high level
AT+PIO=<Param1>,<Param2>
OK
HC-05 Bluetooth module provides the user with the ports (PI00~PI07 and PI010) which can extern another input and output ports.
Page 12
Example: 1. PI010 port outputs high level AT+PI0=10, 1\r\n OK 2. PI010 port outpust low level AT+PI0=10, 0\r\n OK 18. Set PIO multiple port output Command Response Parameter Param: Mask combination of PIO ports number (Decimal)
AT+MPIO=<Param>
OK
HC-05 Bluetooth module provides the ports (PI00~PI07 and PI010) which can extern another input and output ports to the user. (1) Mask of PIO port number = (1<<port number) (2) Mask combination of PIO ports number= (PIO port number mask 1|PIO port number mask 2|)
Example : PI02 port number mask=(1<<2) =0x004 PI010 port number mask =(1<<10)=0x400 Mask combination of PI02 and PI010 port number=(0x004|0x400)=0x404 Example: 1. PI010 and PI02 ports output high level AT+MPI0=404\r\n OK 2. PI04 port output high level AT+PI0=004\r\n OK
Page 13
3. PI010 port output high level AT+PI0=400\r\n OK 4. All ports output low level AT+MPI0=0\r\n OK
AT+MPIO?
+MPIO: <Param> OK
Robokits Bluetooth module provides the user with the ports (PI00~PI07 and PI010) which can extern another input and output ports.
20. Set/ Inquire page scan and inquire scan parameter Command Response Parameter Param1:time interval of inquiring Param2: duration in inquiring Param3: time interval of paging Param4: duration in paging The above parameters are decimal. Default:1024,512,1024,512
Example: at+ipscan=1234,500,1200,250\r\n OK
Page 14
at+ipscan? +IPSCAN:1234,500,1200,250
21. Set/ InquireSHIFF energy parameter Command AT+SNIFF=<Param1> ,<Param2>, <Param3>,<Param4> AT+IPSCAN? Response Parameter Param1: maximum time Param2: minimum time Param3: test time Param4: limited time The above parameters are decimal. Default : 0,0,0,0
22. Set/ Inquire safe and encryption mode Command AT+SENM=<Param >,<Param2>, AT+ SENM? Response 1. OK----success 2. FAIL----failure +SENM:<Param>,<Param 2>, OK Parameter Param: the value of safe mode: 0----sec_mode0+off 1----sec_mode1+non_secure 2----sec_mode2_service 3----sec_mode3_link 4----sec_mode_unknown Param2: the value of encryption mode: 0----hci_enc_mode_off 1----hci_enc_mode_pt_to_pt 2---hci_enc_mode_pt_to_pt_and_bcast Default: 0,0
23. Delete authenticated device in the Bluetooth pair list Command Response Parameter Param: Bluetooth device AT+PMSAD=<Param> OK address
Example: Delete the device ( address: 12:34:56:ab:cd:ef ) in the blue pair list at+rmsad=1234,56,abcdef\r\n
Page 15
OK Or
at+rmsad=1234,56,abcdef\r\n FAIL in the pair list. ----There is no the Bluetooth device whose address is 12:34:56:ab:cd:ef
24. Delete all authenticated devices in the pair list Command Response Parameter
AT+RMAAD
OK
None
Example: Move all devices away from the pair list. at+rmaad\r\n OK
25. Seek the authenticated device in the Bluetooth pair list Command Response Parameter
AT+ADCN?
+ADCN:<Param> OK
Page 16
27. Get the Bluetooth address of Most Recently Used Authenticated Device Command AT+MRAD? Response + MRAD : <Param> OK Parameter Param: the Bluetooth address of Most Recently Used Authenticated Device
Example: at+mrad? +MRAD:0:0:0 recently. OK ----There is no device that has been used
28. Get the work status of Bluetooth module Command AT+STATE? Response + STATE: <Param> OK Parameter Param: work status of module Return value INITIALIZED ---initialized status READY ---- ready status PAIRABLE ----pairable status PAIRED ----paired status INQUIRING ----inquiring status CONNECTING---connecting status CONNECTED----connected status DISCONNECTED---disconnected
Page 17
29. Initialize the SPP profile lib Command AT+INIT Response 1. OK----success 2. FAIL----failure Parameter None
30. Inquire Bluetooth device Command AT+INQ Response +INQ: <Param1>,<Param2>,<Param3>, OK Parameter Param1: Bluetooth address Param2: device type Param3: RSSI signal intensity
Example 1: at+init\r\n OK at+iac=9e8b33\r\n OK at+class=0\r\n at+inqm=1,9,48\r\n ----Inquire the Bluetooth device type ----Inquire mode: 1) has the RSSI signal intensity indication, 2) ----Inquire Bluetooth device has an access code ---- Initialize the SPP profile lib( cant repeat initialization)
stop inquiring if more than 9 Bluetooth devices response, 3) limited time in inquiring is 48*1.28=61.44s. At+inq\r\n ----inquire the Bluetooth device around
Page 18
Example 2: at+iac=9e8b33\r\n OK at+class=1f1f\r\n OK at+inqm=1,9,48\r\n----inquire mode: 1) has the RSSI signal intensity indication, 2) stop inquiring if more than 9 Bluetooth devices response, 3) limited time in inquiring is 48*1.28=61.44s At+inq\r\n ----filter and inquire the Bluetooth device around +INQ:1234:56:0,1F1F,FFC2 +INQ:1234:56:0,1F1F,FFC1 +INQ:1234:56:0,1F1F,FFC1 +INQ:1234:56:0,1F1F,FFC1 +INQ:1234:56:0,1F1F,FFC2 +INQ:1234:56:0,1F1F,FFC1 +INQ:1234:56:0,1F1F,FFC1 +INQ:1234:56:0,1F1F,FFC0 +INQ:1234:56:0,1F1F,FFC2 OK Example 3: at+iac=9e8b3f\r\n ---- inquire the Bluetooth device whose access code is 0x9e8b3f OK at+class=1f1f\r\n ----inquire the Bluetooth device whose device type is 0x1f1f OK at+inqm=1,1,20\r\n ----inquire mode: 1) Has the RSSI signal intensity indication, 2) stop inquiring if more than 1 Bluetooth device response, 3) limited time in inquiring is 20*1.28=25.6s At+inq\r\n ----filter and inquire the Bluetooth device around +INQ:1234:56:ABCDEF,1F1F,FFC2 OK ----inquire the Bluetooth device whose device type is 0x1f1f ----inquire the Bluetooth device has an access code
Page 19
32. Set pair Command AT+PAIR=<Param1>,<Param2> Response 1. OK----success 2. FAIL----failure Parameter Param1: Bluetooth address of remote device Param2: limited time of connection (second)
Example: Make pair with the remote Bluetooth device( address:12:34:56:ab:cd:ef), the limited time is 20s. At+pai=1234,56,abcdef,20\r\n OK
33. Connect device Command AT+LINK=<Param> Response 1. OK----success 2. FAIL----failure Parameter Param: Bluetooth address of remote device
Example: Connect with the remote Bluetooth device (address: 12:34:56:ab:cd:ef) at+fsad=1234,56,abcdef\r\n ----To check whether the Bluetooth device (address: 12:34:56:ab:cd:ef) is in the pair list or not. OK at+link=1234,56,abcdef\r\n ----The Bluetooth device (address: 12:34:56:ab:cd:ef) is in the pair list. The connection can be built directly without inquiring. OK
Page 20
34. Disconnection Command AT+DISC Response 1.+DISC:SUCCESS---successful Disconnection OK 2.+DISC:LINK_LOSS----lose the connection OK 3.+DISC:NO_SLC----No SLC connection OK 4+DISC:TIMEOUT---disconnection timeout OK 5+DISC:ERROR---disconnection error OK Parameter None
35. Enter to energy mode Command AT+ENSNIFF=<Param> Response OK Parameter Param: Bluetooth address of device
36. Exit energy mode Command AT+EXSNIFF=<Param> Response OK Parameter Param: Bluetooth address of device
Page 21
Page 22
Limitations and Warrantees The Robokits Bluetooth UART Module is intended for personal experimental and amusement use and in no case should be used where the health or safety of persons may depend on its proper operation. Robokits provides no warrantee of suitability or performance for any purpose for the product. Use of the product software and or hardware is with the understanding that any outcome whatsoever is at the users own risk. Robokits sole guarantee is that the software and hardware perform in compliance with this document at the time it was shipped to the best of our ability given reasonable care in manufacture and testing. All products are tested for their best performance before shipping, and no warranty or guarantee is provided on any of them. Of course the support is available on all of them for no cost.
Disclaimer
Copyright Robokits India, 2012 Neither the whole nor any part of the information contained in, or the product described in this manual, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. This document provides preliminary information that may be subject to change without notice.
Page 23