☆ Bluetooth Module : HM-10
☆ Size: 13 * 28 * 2.2 mm
☆ BT Version: BLE V4.0
☆ Hardware: CC54x; On board 32MHz; On Board 32.768KHz
☆ Firmware: V608/V704
☆ Status: In production
Professional Bluetooth products suppliers.
Remote control module provider
Data transmission module provider
PIO state acquisition module provider
Customizable Bluetooth modules and Bluetooth solutions
Edong high and new technology enterprise
The most complete, most convenient, the most stable of Bluetooth data transmission, Remote control and PIO input status acquisition module
—- Remote control PIO with AT Commands
—- Master and slave role in one
—- Remote acquisition of PIO input status with AT Commands
1. Product Parameters
Ø BT Version: BT Specification V4.0 BLE
Ø Working frequency: 2.4GHz ISM band
Ø Modulation method: GFSK (Gaussian Frequency Shift Keying)
Ø RF Power: -23dbm, -6dbm, 0dbm, 6dbm
Ø Speed: Asynchronous: 2-6K Bytes
Synchronous: 2-6K Bytes
Ø Security: Authentication and encryption
Ø Service: 0xFFE0 (Modifiable use AT+UUID command)
Ø Characteristic: 0xFFE1 (Modifiable use AT+CHAR command)
Ø Characteristic: Notify and Write (Modifiable use AT+RESP command)
Ø Power: +2.5V~3.5VDC 50mA
Ø Power: Active state 8.5mA; Sleep state 50~200uA
Ø Working temperature: –20 ~ +105 Centigrade
Ø Size: HM-10 27mm x 13mm x 2.2 mm
Ø Size: HM-11 18mm x 13mm x 2.2mm
Ø Size: HM-15 65mm x 32mm x 16mm
2. Product overview
HM Bluetooth modules use CSR or TI CC2xxx or cypress chips, Master and slave roles in one, data transmission version and remote-control version and PIO status acquisition versions in one, Support the AT commands modify module parameters, Convenient and flexible.
Data Transmission Mode:
Before connect:
You can configure module parameters with AT Commands through UART After connect:
1) Send and receive Bluetooth data through UART.
Remote Control Mode:
Before connect:
You can configure module parameters with AT Commands through UART After connect:
1) Send and receive Bluetooth data through UART.
2) Remote device could configure module parameters with AT Commands
3) Remote device could control PIO2~PIO11 output low or high
PIO acquisition Mode:
Before connect
You can configure module parameters with AT Commands through UART After connect
1) Send and receive Bluetooth data through UART.
2) Remote device could configure module parameters with AT Commands
3) Remote device could control PIO2, 3 output low or high with AT Commands HM-11 has no this function
4) Remote device could get PIO4 ~ 11 input status with AT Commands
HM-11 only has PIO2 and PIO3.
Module version:
HM-01 to HM-09 is Bluetooth V2.1 version. HM-10, HM-11 is Bluetooth V4.0 BLE version.
HM-12, HM-13 is Bluetooth Dual mode support EDR 4.0 and BLE 4.0 HM-16, HM-17 is Bluetooth V4.1 and V4.2 BLE version.
HM-18, HM-19 is Bluetooth V4.2 and V5.0 BLE version.
HM-01, HM-02, HM-09, HM-10, HM-16 and HM-18 is Pins to Pins. HM-05, HM-06, HM-07, HM-11, HM-17 and HM-19 is Pins to Pins.
3. Product model
Modules |
VDD |
Size(mm) |
Flash |
Chip |
BT Version |
HM-01 |
2.5-3.7V |
27 * 13 * 2.2 |
8M |
BC417143 |
V2.1+EDR |
HM-02A |
2.5-3.7V |
27 * 13 * 2.2 |
6M |
BC31A223 |
V2.1 |
HM-02B |
2.5-3.7V |
27 * 13 * 2.2 |
6M |
BC41C671 |
V2.1+EDR |
HM-03A |
2.5-3.7V |
27 * 12.5 * 4.3 |
6M |
BC31A223 |
V2.1 |
HM-03B |
2.5-3.7V |
27 * 12.5 * 4.3 |
6M |
BC41C671 |
V2.1+EDR |
HM-04A |
2.5-3.7V |
Not for sale |
|||
HM-04B |
2.5-3.7V |
Not for sale |
|||
HM-05/06A |
2.5-3.7V |
18 * 13 * 2.2 |
6M |
BC31A223 |
V2.1 |
HM-05/06B |
2.5-3.7V |
18 * 13 * 2.2 |
6M |
BC41C671 |
V2.1+EDR |
HM-07 |
2.5-3.7V |
18 * 13 * 2.2 |
8M |
|
V2.1+EDR |
HM-08 |
2.5-3.7V |
27 * 13 * 2.5 |
8M |
Class 1 |
V2.1+EDR |
HM-09 |
2.5-3.7V |
27 * 13 * 2.2 |
8M |
|
V2.1+EDR |
HM-10 |
2.2-3.7V |
27 * 13 * 2.2 |
256Kb |
CC2540/1 |
V4.0 BLE |
HM-11 |
2.2-3.7V |
18 * 13 * 2.2 |
256Kb |
CC2540/1 |
V4.0 BLE |
HM-12 |
2.5-3.9V |
27 * 13 * 2.2 |
64KB |
Dual mode |
EDR 40 + BLE 40 |
HM-13 |
2.5-3.9V |
18 * 13 * 2.2 |
64KB |
Dual mode |
EDR 40 + BLE 40 |
HM-14 |
2.2-4.0V |
13 * 12 * 2.0 |
|
Dual mode |
EDR40 + BLE 40 |
HM-15 |
5V |
65 * 32 * 16 |
256Kb |
CC2540 |
BLE V4.0 |
HM-16 |
2.1-3.8V |
27 * 13 * 2.2 |
256KB |
|
BLE V4.2 |
HM-17 |
2.1-3.8V |
18 * 13 * 2.2 |
256KB |
|
BLE V4.2 |
HM-18 |
2.1-3.8V |
27 * 13 * 2.2 |
256KB |
|
BLE V4.2 & V5.0 |
HM-19 |
2.1-3.8V |
18 * 13 * 2.2 |
256KB |
|
BLE V4.2 & V5.0 |
4. What’s different between HM-10S and HM-10C?
Left is HM-10S, it has 34 Pads. Right is HM-10C and it only have 26 Pads HM-10C is cheaper than HM-10S.
There have a lot of fake version in the market, please look at carefully, we put “HM-10” and “HM-11” string on the top layer and the bottom layer,
5.1 HM-10 Schematic
5.2 HM-10 Size
6.3 HM-10 package information
6.4 HM-10 Device Terminal Functions
HM-10S |
HM-10C |
Name |
Description |
CC254X |
1 |
1 |
UART_TX |
UART interface |
P1_6 |
2 |
2 |
UART_RX |
UART interface |
P1_7 |
3 |
3 |
UART_CTS |
UART interface |
P1_4 |
4 |
4 |
UART_RTS |
UART interface |
P1_5 |
5 |
5 |
NC |
NC |
– |
6 |
6 |
NC |
NC |
– |
7 |
7 |
NC |
NC |
P2_2 |
8 |
8 |
NC |
NC |
P2_1 |
9 |
9 |
NC |
NC |
P2_0 |
10 |
10 |
NC |
NC |
– |
11 |
11 |
RESETB |
Reset if low >100ms. |
RESET |
12 |
12 |
VCC |
3.3V |
– |
13 |
13 |
GND |
Ground |
– |
14 |
X |
GND |
Ground HM-10C doesn’t have this pin |
– |
15 |
X |
USB_D- |
USB interface HM-10C doesn’t have this pin |
PIN3 |
16 |
X |
NC |
NC HM-10C doesn’t have this pin |
– |
17 |
X |
NC |
NC HM-10C doesn’t have this pin |
– |
18 |
X |
NC |
NC HM-10C doesn’t have this pin |
– |
19 |
X |
NC |
NC HM-10C doesn’t have this pin |
– |
20 |
X |
UB_D+ |
USB interface HM-10C doesn’t have this pin |
PIN2 |
21 |
X |
GND |
Ground HM-10C doesn’t have this pin |
GND |
22 |
22 |
GND |
Ground |
GND |
23 |
23 |
PIO0 |
System Key |
P1_3 |
24 |
24 |
PIO1 |
System LED |
P1_2 |
25 |
25 |
PIO2 |
input/output pin. PWM output |
P1_1 |
26 |
26 |
PIO3 |
input/output pin/ADC |
P1_0 |
27 |
27 |
PIO4 |
input/output pin/ADC |
P0_7 |
28 |
28 |
PIO5 |
input/output pin/ADC |
P0_6 |
29 |
29 |
PIO6 |
input/output pin/ADC |
P0_5 |
30 |
30 |
PIO7 |
input/output pin/ADC |
P0_4 |
31 |
31 |
PIO8 |
input/output pin/ADC |
P0_3 |
32 |
32 |
PIO9 |
input/output pin/ADC |
P0_2 |
33 |
33 |
PIO10 |
input/output pin/ADC |
P0_1 |
34 |
34 |
PIO11 |
input/output pin/ ADC/DS18B20/DHT11 |
P0_0 |
6.5 HM-11 Size
5.6 HM-11 Package information
5.7 HM-11 Device Terminal Functions
No |
Name |
Description |
CC254X |
1 |
UART_RTS |
UART interface |
P1_5 |
2 |
UART_TX |
UART interface |
P1_6 |
3 |
UART_CTS |
UART interface |
P1_4 |
4 |
UART_RX |
UART interface |
P1_7 |
5 |
NC |
NC |
P2_1 |
6 |
NC |
NC |
P2_2 |
7 |
NC |
NC |
PIN2 |
8 |
NC |
NC |
PIN3 |
9 |
VCC |
V3.3 |
VCC |
10 |
NC |
NC or VCC |
|
11 |
RESETB |
Reset if low >100ms |
RESET_N |
12 |
GND |
Ground |
GND |
13 |
PIO3 |
input/output pin |
P1_1 |
14 |
PIO2 |
input/output pin/PWM |
P1_0 |
15 |
PIO1 |
System LED |
P0_7 |
16 |
PIO0 |
System KEY |
P0_6 |
5.8 HM-15
HM-15 is based HM-10, a real USB interface.
5.9 HM-Sensor
HM-Sensor version is different HMSoft version. HM-Sensor support DHT11 and DS18B20.
5. System role
Module support Peripheral role and central role; Switch AT command is “AT+ROLE<P1>”. “AT+ROLE0” is peripheral role, “AT+ROLE1” is central role
Peripheral role
If AT+IMME0 is setup module will auto into discoverable mode.
If AT+IMME1 is setup, module will do nothing, you can use AT command setup module, then use AT+START to start device.
Central role
Central role support two work methods.
Automatic-scan-connect mode (AT+IMME0) and Command-scan-connect mode (AT+IMME1).
In AT+IMME0 mode, when power on, module will check if have a device addresshave already success connect before. If have, module will try to connect that device for ever, if we setup AT+TCON, when AT+TCON value timeout, module will forget that device and try scan devices, then try connect the device what we scanned; If not have a device address, then module will try scan devices and try connect them. AT+SAVE command will let module know if save devices address or not.
In AT+IMME1 modem, when power on, module do nothing, module will wait your command, now you can use AT+DISC? Or AT+DISI? Or AT+DISA? Command to scan devices. Also, you can use AT+CO command connect to a device.
6. System function
How to wake up module from sleep mode?
There are two ways to wake up module from sleep mode, if module was in sleep mode.
7.1 Send “I am iron man, I am iron man, I am iron man I am iron” strings.
Yes, that’s a joke, in sleep mode, you can send a long string (Length > 1024 or more), that string can caused module wake up, and you will be received “OK+WAKE” string from module UART. Note: That wake-up string is better not including any AT commands.
Since V607/V702, we made wakeup function better, doesn’t need 80 strings anymore, you only need send 1-3 bytes to wakeup module.
7.2 Long press system KEY >=1000 ms.
After wake-up module, you can send and receive AT commands.
How to let module into sleep mode?
1. Send “AT+SLEEP” string through UART, if all is okay, module will return “OK+SLEEP” string and into sleep mode, this command only take effect once more.
2. Execute “AT+PWRM1” command, Module will auto into sleep mode when power on or disconnect from remote device. This command only need setup once more.
System advert packet
In iOS system you can’t get module MAC address directly. So, we put MAC
address information into advert packet.
You can use CBAdvertisementDataManufactureDataKey property to get it, MAC address information string format like follow:
Total length is 8 Bytes, first of two bytes is identify string, it always is 0×48 and 0x4D, the rest 6 bytes is MAC address string
For example: 0×48, 0x4D, 0xB4, 0×99, 0x4C, 0xXX, 0xXX, 0xXX 0×48 and 0x4D is “HM” string.
0xB4: 0×99: 0x4C: 0xXX: 0xXX: 0xXX is BLE MAC Address.
System KEY function (PIO0)
Press if Low > 1000ms:
7.3.1 If Module is in sleep mode
Module will wake up immediately, if AT+NOTI value is “1”, module will send “OK+WAKE” string through UART.
7.3.2 If Module has already connected to remote device Module will disconnect from remote device.
7.3.3 If Module is standby mode
Module will reset to default configuration. Then restart. You can use AT+PIO01 command to close this function.
System LED function (PIO1)
In sleep mode, LED has turned off.
If AT+PIO10 is setup
Unconnected status: Output High 500 ms, Low 500 ms Connected status: Output High
If AT+PIO11 is setup Unconnected status: Output Low. Connected status: Output High.
System work Mode
A) Mode 0(Transmission mode, command string: “AT+MODE0”):
Before connect, you can configure module parameters with AT Commands After connect, you can send and receive Bluetooth data through UART.
B) Mode 1(PIO acquisition mode, command string: “AT+MODE1”):
Before connect, you can configure module parameters with AT Commands After connect
1) Send and receive Bluetooth data through UART.
2) Remote device could configure module parameters with AT Commands
3) Remote device could control PIO2 and PIO3 output low or high with AT Commands
HM-11 has no this function
4) Remote device could get PIO4 ~ 11 input status with AT Commands HM-11 only has PIO2 and PIO3.
C) Mode 2 (Remote control mode command string: “AT+MODE2”):
Before connect, you can configure module parameters with AT Commands After connect:
1) Send and receive Bluetooth data through UART.
2) Remote device could configure module parameters with AT Commands
3) Remote device could control PIO2~11 output low or high HM-11 only has PIO2 and PIO3.
7. AT Commands
Factory default setting:
V5xx: Name: HMSoft; Baud: 9600, N, 8, 1; AT+NOTI0; Peripheral Role;
transmit mode.
V6xx: Name: HMSoft; Baud: 9600, N, 8, 1; AT+NOTI1; Peripheral Role; Remote-Control mode.
V7xx: Name: HMSoft; Baud: 115200, N, 8, 1; AT+NOTI1; Peripheral Role; Remote-Control mode.
AT Command format:
Uppercase AT command format. string format.
V5xx, module didn’t accept command ended with any other symbol. (e.g. r orn).
V6xx, module accept more Freestyle when you use command through UART. V7xx, if you send command ended with CRLF, then module response string
would be added CRLF. If you not then module not. You jump, module jump. AT command through UART support more Freestyle.
On Transmit version: module only accept AT Commands from UART interface when Bluetooth device is not connected with remote device.
On Remote version: module could accept AT Command from UART interface when Bluetooth Device is not connected with remote device, Also could accept AT Command from remote Bluetooth device when connected that.
On PIO collection version: module only accept AT Command from UART interface when Bluetooth device is not connected with remote device. After connect with remote device, module could accept and execute AT Command send from remote side.
Note: All command value will be saved in internal flash, doesn’t need setup many times.
Note: “[” and “]” is not part of the command.
1. Test Command or Disconnect Comman
Send |
Receive |
Parameter |
AT |
OK OK+LOST |
None |
If module is in sleep mode, module will output “OK+WAKE” and into standby mode. If Module is not connected to remote device, you will receive: “OK”
If Module is connected, module will be disconnected from remote device, if “AT + NOTI” is setup to 1, module will output “OK+LOST” through UART.
2. Query module PIO ADC value
Send |
Receive |
Parameter |
AT+ADC[P1]? |
OK+Get:[P2] |
P1: 3,4,5,6,7,8,9, A, B map to PIO3~PIOB P2: return value |
HM-11 have no this function.
PIO0 is system key, PIO1 is system led, so beginning PIO is PIO3. Added since V526.
3. Query module address
Send |
Receive |
Parameter |
AT+ADDR? |
OK+ADDR:MAC Address |
None |
AT+ADDR[P1] |
OK+Set: [P1] |
P1: MAC address 12Bytes |
V707 added
3. Query/Set Advertising interval
Send |
Receive |
Parameter |
AT+ADVI? |
OK+ Get:[P1] |
None |
AT+ADVI[P1] |
OK+ Set:[P1] |
P1: 0 ~ F 0: 100ms; 1: 252.5ms; 2: 211.25ms; 3:318.75ms 4: 417.50ms; 5:546.25ms 6: 760.00ms; 7:852,50ms; 8: 1022.5ms; 9:1285ms A: 2000ms; B: 3000ms C: 4000ms; D: 5000ms E: 6000ms; F: 7000ms HMSoft Default: 0 HMSensor Default: 9 |
The maximum 1285ms recommendations from the IOS system. That mean 1285ms is apple allowed maximum value.
Added since V517 version.
V522 version added max value F.
4. Query/Set Advertising Type
Send |
Receive |
Parameter |
AT+ADTY? |
OK+ Get:[P1] |
None |
AT+ADTY[P1] |
OK+ Set:[P1] |
P1: 0 ~ 3 0: Advertising ScanResponse, Connectable 1: Only allow last device connect in 1.28 seconds 2: Only allow Advertising and ScanResponse. 3: Only allow Advertising |
|
|
Default: 0 |
Added since V519
5. Query/Set apple ANCS switch
Send |
Receive |
Parameter |
AT+ANCS? |
OK+ Get:[P1] |
None |
AT+ANCS[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
Note1: This command added in V524.
Note2: This command required AT+TYPE3 support. Note3: This command removed in V7xx firmware.
6. Query/Set white list switch
Send |
Receive |
Parameter |
AT+ALLO? |
OK+ Get:[P1] |
None |
AT+ALLO[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
Note1: This command added in V523.
Note2: White List allows three MAC address link to module. Please use AT+AD command set white list MAC address.
7. Query/Set white list MAC address
Send |
Receive |
Parameter |
AT+AD[P1]?? |
OK+ Get:[P2] |
None |
AT+AD[P1][P2] |
OK+ Set:[P2] |
P1: 1, 2, 3 P2: MAC address P1 default value: 0 |
Note1: This command added in V523.
E.g.
Send AT+AD1001122334455 Recv OK+Set:001122334455
8. Query/Set Module pin output state, After power supplied
Send |
Receive |
Parameter |
AT+BEFC? |
OK+ Get:[P1] |
None |
AT+BEFC[P1] |
OK+ Set:[P1] |
P1: 000~3FF; (Hex format string) Default: 0×000 |
This command added in V527.
Hex format 0x3FF change to binary format is 001111111111, total length is 12 bit, left to right side is mapped to module PIO0~PIOB port, PIO0 and PIo1 is used by system, So must be 0. Only Pio2~PIOB pins is available.
e.g. Set PIO2~PIOB all output high after power supplied. Send: AT+BEFC3FF
Recv: OK+Set:3FF
When next time power on, module PIO2~PIOB will output high. Note: Query PIO pins current state please use AT+PIO?? Command.
9. Query/Set Module pin output state, after connection is established
Send |
Receive |
Parameter |
AT+AFTC? |
OK+ Get:[P1] |
None |
AT+AFTC[P1] |
OK+ Set:[P1] |
P1:000~3FF;(Hex format string) Default: 000 |
This command added in V527.
Hex format 0x3FF change to binary format is 001111111111, total length is 12 bit, Left to right side is mapped to module PIO0~PIOB port, PIO0 and PIo1 is used by system. So, must be 0, Only Pio2~PIOB pins is available.
e.g. Set PIO2~PIOB all output high when connection is established. Send: AT+AFTC3FF
Recv: OK+Set:3FF
When Bluetooth connection is established, module PIO2~PIOB will output high. Note: Query PIO pins current state please use “AT+PIO??” command.
10. Query/Set battery monitor switch
Send |
Receive |
Parameter |
AT+BATC? |
OK+ Get:[P1] |
None |
AT+BATC[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
This command added in V520
When AT+BATC1 command is executed, module will add battery information into scan response data package.
11. Query battery information
Send |
Receive |
Parameter |
AT+BATT? |
OK+Get:[P1] |
P1: 000~100 |
There has three ways to get battery information:
a. Before establishing a connection, Send “AT+BATT?” through UART.
b. After established a connection, In Mode 1 or 2, remote side send “AT+BATT?” Battery information has included in scan response data package, one-hour updated once. when module has been discovered, you can get battery information from scan response package.
Data format is 0×02, 0×16, 0×00, 0xB0, [FLAG], [temperature], [ humidity], [battery]. Android:
Included in OnLeScan function result array, you can see it direct.
private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override
public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {
……<Other code>……
String sBatt = “”; //Battery
String sTemp = “”; //Temperature String sHumi = “”; //Humidity
for(int i = 0; i < scanRecord.length; i++)
{
if(i + 7 < scanRecord.length)
{
//Since V522
if(scanRecord[i] == 0×07 && scanRecord[i + 1] == 0×16
&& scanRecord[I + 2] == 0×00 && scanRecord[I + 3] == 0xB0)
{
if(scanRecord[i + 7] > 0)
sBatt = String.valueOf(scanRecord[i + 7]); if(scanRecord[i + 5] > 0)
sTemp = String.valueOf(scanRecord[i + 5]); if(scanRecord[i + 6] > 0)
sHumi = String.valueOf(scanRecord[i + 6]);
}
}
}
……<Other code>……
}
};
iOS:
c. Included in LeScan function result NSDictionary struct, service id is 0xB000.
12. Set battery information byte in advertising data
Send |
Receive |
Parameter |
AT+BATT[P1] |
OK+Set:[P1] |
P1: 0×00~0xFF |
|
|
Not include ‘?’ |
Required: AT+BATC0
This command is used to set battery information byte in advertising data when you closed module power monitor, you can use battery information byte in advertising package for other purposes.
13. Query/Set 7 Bit format
Send |
Receive |
Parameter |
AT+BIT7? |
OK+Get:[P1] |
P1: bit7 switch. |
AT+BIT7[P1] |
OK+Set:[P1] |
0Not compatible |
|
|
1Compatible |
|
|
Default: 0 |
This command is used only for compatible uses 7 data bits, 2 stop bit device. This command removed since V7xx.
14. Query/Set UART baud rate
Send |
Receive |
Parameter |
AT+BAUD? |
OK+Get:[P1] |
P1: Baud rate |
AT+BAUD[P1] |
OK+Set:[P1] |
0: 9600; 1: 19200;2: 38400; |
|
|
3: 57600; 4: 115200; 5: 4800; |
|
|
6: 2400; 7: 1200; 8: 230400; |
|
|
Default: 0(9600) |
e.g.
Query baud rate:
Send:AT+BAUD?
Receive: OK+Get:[P1] Setup baud rate to 9600:
Send:AT+BAUD1
Receive: OK+Set:1
Note: If setup to Value 7, After next power on, module will not support any AT Commands.
15. Query/Set Minimum Link Layer connection interval
Send |
Receive |
Parameter |
AT+COMI? |
OK+Get:[P1] |
P1: 0 ~ 9 |
AT+COMI[P1] |
OK+Set:[P1] |
0: 7.5ms; 1: 10ms; 2: 15ms; |
|
|
3: 20ms; 4: 25ms; 5: 30ms; |
|
|
6: 35ms; 7: 40ms; 8: 45ms; |
|
|
9: 4000ms; |
|
|
Default: 3(20ms) |
Note: This command is added since V538
16. Query/Set Maximum Link Layer connection interval
Send |
Receive |
Parameter |
AT+COMA? |
OK+Get:[P1] |
P1: 0 ~ 9 |
AT+COMA[P1] |
OK+Set:[P1] |
0: 7.5ms; 1: 10ms; 2: 15ms; |
|
|
3: 20ms; 4: 25ms; 5: 30ms; |
|
|
6: 35ms; 7: 40ms; 8: 45ms; |
|
|
9: 4000ms; |
|
|
Default: 7(40ms) |
Note: This command is added since V538
17. Query/Set Link Layer connection slave latency
Send |
Receive |
Parameter |
AT+COLA? |
OK+Get:[P1] |
P1: 0 ~ 4 Default: 0 |
AT+COLA[P1] |
OK+Set:[P1] |
Note: This command is added since V538
18. Query/Set connection supervision timeout
Send |
Receive |
Parameter |
AT+COSU? |
OK+Get:[P1] |
P1: 0 ~ 6 |
AT+COSU[P1] |
OK+Set:[P1] |
0: 100ms; 1: 1000ms; |
|
|
2: 2000ms; 3: 3000ms; |
|
|
4: 4000ms; 5: 5000ms; |
|
|
6: 6000ms; Default: 6(6000ms) |
Note: This command is added since V538
19. Query/Set the Switch of update connection Parameter
Send |
Receive |
Parameter |
AT+COUP? |
OK+Get:[P1] |
P1: 0 ~ 1 |
AT+COUP[P1] |
OK+Set:[P1] |
0: Don’t update |
|
|
1: Update |
|
|
Default: 1(update) |
This command is only use when module is in slave role. In central role you can use AT+COMI and AT+ COMA command change default connect parameters.
Note: This command is added since V538
20. Query/Set Characteristic
Send |
Receive |
Parameter |
AT+CHAR? |
OK+Get:[P1] |
P1: 0×0001~0xFFFE Default: 0xFFE1 |
AT+CHAR[P1] |
OK+Set:[P1] |
e.g. change characteristic value to 0xAAA0 Send: AT+CHAR0xAAA0
Recv: OK+Set:0xAAA0
21. Clear Last Connected device address
Send |
Receive |
Parameter |
AT+CLEAR |
OK+CLEAR |
None |
Notice: Only Central role is used.
22. Try connect to last succeeded device
Send |
Receive |
Parameter |
AT+CONNL |
OK+CONN[P1] |
P1: L, E, F, N L: Connecting E: Connect error F: Connect Fail |
|
|
N: No Address |
Notice: Only Central role is used.
Required: AT+IMME1 and AT+ROLE1 and AT+SAVE1.
If remote device is not in connectable status, “OK+CONNF” will received after about 10 seconds.
23. Try to connect a device use MAC address
Send |
Receive |
Parameter |
AT+CO[P0][P1] |
OK+CO[P0][P0][P2] |
P0: N, 0, 1, 2; 1 Byte Length N: Normal Address 0: Static MAC 1: Static random MAC 2: Random MAC P1: MAC Address Like: 0017EA090909 P2: A, E, F; 1 Byte Length A: Connecting E: Connect error F: Connect Fail |
Notice: Only central role is used.
You can get P0 value through AT+DISC? Command. Required: AT+IMME1 and AT+ROLE1.
If remote device is not in connectable status, “OK+CONNF” will received after about 10 Seconds.
e.g.
Try to connect an device which MAC address is 00:17:EA:09:09:09, this device type is normal
Send: AT+CON0017EA090909
May receive a reply:
OK+CONNA=========Accept request, connecting
OK+CONNE=========Connect error
OK+CONN=========Connected, if AT+NOTI1 is setup OK+CONNF=========Connect Failed, After 10 seconds
Note: O is not zero
24. Try to connect a device use MAC address and UUIDs
Send |
Receive |
Parameter |
AT+CO[P0][P1][P3][P4] |
OK+CO[P0][P0][P2] |
P0: N, 0, 1, 2; 1 Byte Length N: Normal Address 0: Static MAC 1: Static random MAC 2: Random MAC P1: MAC Address Like: 0017EA090909 P2: A, E, F; 1 Byte Length P3: Write UUID P4: Notify UUID A: Connecting E: Connect error F: Connect Fail |
Notice: Only central role is used.
Required: AT+IMME1 and AT+ROLE1 and AT+COMP1. This command added since V604
This command is based on AT+CO command, modified in V604, added UUIDs support.
P3: Device UUID which one is included Write or Write-Without-Response property.
4 Bytes Length, HEX format string, only accept 16-bit UUID now.
P4: Device UUID which one is included Notify property,
4 Bytes Length, HEX format string, only accept 16-bit UUID now.
This command is used to Communication with different brand BLE device. This command let module know which UUIDs are using.
If the slave module what you want to communication is using 16 Bit UUID. And this device is using one or two Characteristics to send and receive data (Notify property and Write or Write-Without-Response properties), then you can use this command to communication with it.
This command removed in V7xx.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
25. Try to connect a device use MAC address and UUIDs handle
Send |
Receive |
Parameter |
AT+LN[P0][P1][P3][P4][P5] |
OK+LN[P0][P0][P2] |
P0: N, 0, 1, 2; 1 Byte Length N: Normal Address 0: Static MAC 1: Static random MAC 2: Random MAC P1: MAC Address Like: 0017EA090909 P2: A, E, F; 1 Byte Length P3: Notify UUID Handle P4: Write UUID Handle A: Connecting E: Connect error F: Connect Fail |
Notice: Only central role is used. Required: AT+IMME1 and AT+ROLE1. This command added since V605
P3: Notify UUID handle, 4 Byte Length, HEX format, 0×0000 ~ 0xFFFF
P4: Write or Write-Without-Response UUID handle, 4 Bytes Length, HEX format,
0×0000~0xFFFF.
P5: Write method, 1 Byte length, values: 0: Write; 1: Write-Without-Response. This command is used to communication with different brand BLE devices.
This command not care UUIDs value, only care UUIDs handle, use this command, you can talk to any BLE devices, included 16 Bit UUID device and 128 Bit UUID device.
This command is removed in V7xx.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
26. Connect to a Discovered device use array index
Send |
Receive |
Parameter |
AT+CONN[P1] |
OK+CONN[P2] |
P1: 0~5 P2: E, F, 0~5 E: Link error F: Link failed 0~5: is Array index. |
This command is use after execute AT+DISC? AT+DISC? command will return discovered devices list
The first discovered device array index is 0, second device array index is 1, AT+DISC? Command could return more than 6 devices, buy only first 6 devices could use array index, other devices must use AT+CO or AT+LN command.
This command will clear all discovered devices list.
27. Query PIO04~PIO11 input(output) state
Send |
Receive |
Parameter |
AT+COL?? |
OK+ Col:[P1] |
P1: 0×00~0xFF |
P1 is a byte, has 8 bits, bit 7 ~ bit 0 is mapped to the PIO4 ~ PIO11. This command is added since V515 version.
This command required AT+MODE1.
28. Query/Set PIO collection rate
Send |
Receive |
Parameter |
AT+CYC?? |
OK+ Get:[P1] |
P1: 00~99 Unit: seconds Default: 10 |
AT+CYC[P1] |
OK+ Set:[P1] |
Required AT+MODE1, when PIO state is change, module will send OK+Col:[xx] to UART or remote side. This command is set send interval.
This command is added since V515 version.
29. Query/Set The switch of study function
Send |
Receive |
Parameter |
AT+COMP? |
OK+ Get:[P1] |
P1: 0, 1, ? ?: Query; 0: Off; 1: On Default: 0 |
AT+COMP[P1] |
OK+ Set:[P1] |
This command is used to communication with different brand BLE devices. This command is added since V542 version.
This command is removed in V7xx.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
30. Start a device discovery scan
Send |
Receive |
Parameter |
AT+DISC? |
OK+DISCS OK+DIS[P0][P1][P2] OK+DISCE |
P0: C, 0, 1, 2; 1 Byte Length C: Common string 0~2: device Address type P1: device MAC string DISCS: Start discovery DISCE: End discovery |
Required: AT+IMME1, AT+ROLE1, AT+RESET
AT+SHOW command could help you to get more devices information. OK+DISCS is mean: module start discovery now.
OK+DISCE is mean: module already stopped discovery.
e.g.
Send: AT+DISC? Recv: OK+DISCS
Recv: OK+DIS[P0]:123456789012 (discovered device address information) If AT+SHOW1 is setup, you will receive the name information like follow Recv: OK+NAME: xxx
If AT+SHOW2 is setup, you will receive the RSSI information like follow Recv: OK+RSSI: xxxrn
If AT+SHOW3 is setup, you will be received both the RSSI information and Name information
Recv: OK+DIS[P0]:234567890123
Recv: OK+NAME: xxxrn Recv: OK+RSSI: xxxrn
…..
Recv: OK+DISCE
After AT+DISC? Command, you maybe want to choose a device to made connection, now you can use AT+CONN command or AT+CO command or AT+LN command.
AT+DISI? Command and AT+DISA? Command is also used to scan devices.
31. Start an iBeacon device discovery scan
Send |
Receive |
Parameter |
AT+DISI? |
OK+DISCS OK+DISC[P0:P1:P2:P3:P4] OK+DISCE |
P0: Factory ID P1: iBeacon UUID P2: Major Value Minor Value Measured Power P3: MAC P4: RSSI |
Required AT+IMME1 and AT+ROLE1.
e.g.
Send: AT+DISI?
Recv: OK+DISCS (Scan start)
Recv: OK+DIS[P0:P1:P2:P3:P4] (if have one device) Recv: OK+DIS[P0:P1:P2:P3:P4] (if have two devices)
………..
Recv: OK+DISCE (Scan end)
P0 length is 8 Bytes; P1 length is 32 Bytes; P2 length is 10 Bytes; P3 length is 12 Bytes, P4 length is 4 Bytes, Those values all is ASCII mode.
P2 include Major Value (length 4 Bytes); Minor Value (length 4 Bytes); Measured Power (length 2 Bytes)
If the device not enable iBeacon function, P0, P1, P2 will use ‘0’ to fill in. Note: Added since V539
32. Start a full information device discovery scan
Send |
Receive |
Parameter |
AT+DISA? |
OK+DISAS -> Start scan OK+DISC[P0:P1:P2:P3:P4] OK+DISAE -> Scan finished |
P0: Device MAC (6Byte) P1: Device Type(1Byte) P2: Device RSSI(1Byte) P3: Rest Data Length (1Byte) P4: Rest Data |
Please set AT+IMME1 and AT+ROLE1.
Note: P3 and P4 All data is in Hex format, can’t show in ascii mode. Added in V547
33. Query/Set iBeacon deploy mode
Send |
Receive |
Parameter |
AT+DELO[P1] |
OK+DELO[P1] |
P1: 1, 2 1: Allowed to broadcast and |
|
|
scanning 2: Only allow broadcast |
After received OK+Set[P1], module will reset after 500ms.
This command will let module into non-connectable status until next power on.
34. Remove bond information
Send |
Receive |
Parameter |
AT+ERASE |
OK+ERASE |
NONE |
Note: Added in V524 version.
35. Find all services UUID on slave device
Send |
Receive |
Parameter |
AT+FINDSERVICES? |
******************* |
P1: Start Handle |
|
[P1]:[P2]:[P3] |
P2: End Handle |
|
******************* |
P3: Service UUID |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to find all services UUID on the slave device.
“***********” is start string, 56 Bytes. P1: 4 Bytes, Services start handle. P2: 4 Bytes, Services end handle P3: Services UUID
“***************” is end string, 56 Bytes. Possible return value
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
36. Find all Characteristic UUID on slave device
Send |
Receive |
Parameter |
AT+FINDALLCHARS? |
******************* |
P1: Chars Handle |
|
[P1]:[P2]:[P3] |
P2: Chars properties |
|
******************* |
P3: Chars UUID |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to find all Characteristic UUID on the slave device.
Characteristic properties length 14 Bytes, full string is “RD|WR|WN|NO|IN”;
WR – Write; WN – Write_Without_Response; IN – Indicate; NO – Notify; RD – Read; Usually, a characteristic maybe only has one or two properties. Unsupported property part replaced by “–”
“***********” is start string, 56 Bytes. P1: 4 Bytes, Characteristic handle. P2: 14 Bytes, “RD|WR|WN|NO|IN”,
P3: Characteristic UUID “***************” is end string, 56 Bytes. Possible return value:
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
37. Find Characteristics UUID on slave device use start handle and end handle
Send |
Receive |
Parameter |
AT+CHAR[P4][P5]? |
******************* |
P1: Chars Handle |
|
[P1:P2:P3] |
P2: Chars properties |
|
******************* |
P3: Chars UUID |
|
|
P4: Start Handle P5: End Handle |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to find Characteristics UUID on the slave device with start handle and end handle.
P4 and P5 value could get from AT+FINDSERVICES? Command. P4: start service handle, 4 bytes, possible value 0×0001 ~ 0xFFFF; P5: end services handle, 4 bytes, possible value 0×00001 ~ 0xFFFF; P5 value must large than P4 value.
Characteristic properties length 14 Bytes, full string is “RD|WR|WN|NO|IN”;
WR – Write; WN – Write_Without_Response; IN – Indicate; NO – Notify; RD – Read; Usually, a characteristic maybe only has one or two properties. Unsupported property part replaced by “–”
“***********” is start string.
P1: 4 Bytes, Characteristic handle. P2: 14 Bytes, “RD|WR|WN|NO|IN”,
P3: Characteristic UUID “***************” is end string Possible return value:
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
38. Enable Characteristic notify by characteristic handle
Send |
Receive |
Parameter |
AT+NOTIFY_ON[P1] |
OK+SEND-OK |
P1: Chars Handle |
|
OK+SEND-ER OK+DATA-ER |
4 Bytes |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to enable notify on a characteristic who owned notify property.
OK+SEND-OK – Send command successful. OK+SEND-ER – Send command error
OK+DATA-ER – This characteristic doesn’t have notify property. V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
39. Enable Characteristic indicate by characteristic handle
Send |
Receive |
Parameter |
AT+INDICA_ON[P1] |
OK+SEND-OK OK+SEND-ER OK+DATA-ER |
P1: Chars Handle 4 Bytes |
This command added since V705
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to enable indicate on a characteristic who owned indicate property.
OK+SEND-OK – Send command successful. OK+SEND-ER – Send command error
OK+DATA-ER – This characteristic doesn’t have notify property.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
40. Disable Characteristic notify or indicate by characteristic handle
Send |
Receive |
Parameter |
AT+NOTIFYOFF[P1] |
OK+SEND-OK OK+SEND-ER |
P1: Chars Handle 4 Bytes |
|
OK+DATA-ER |
|
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to disable notify on a characteristic who owned notify or indicate property.
OK+SEND-OK – Send command successful. OK+SEND-ER – Send command error.
OK+DATA-ER – This characteristic doesn’t have notify property. V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
41. Read Characteristic value by characteristic handle
Send |
Receive |
Parameter |
AT+READDATA[P1]? |
OK+SEND-OK OK+SEND-ER OK+DATA-ER |
P1: Chars Handle 4 Bytes. |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to read characteristic value who owned read property.
OK+SEND-OK – Send command successful. OK+SEND-ER – Send command error
OK+DATA-ER – This characteristic doesn’t have read property. V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
42. Set which method and which characteristic handle we are plan to use.
Send |
Receive |
Parameter |
AT+SET_WAY[P1][P2] |
OK+SEND-OK |
P1: Send data method 2 Bytes, “WR”, “WN”,”NO”, “IN” |
|
|
P2: Chars Handle 4 Bytes |
This command added since V701
Required state: after connect; Required role: Central role.
Note: after execute this command, now you can start to send and receive data without any AT commands.
Note: This command is different between AT+SEND_DATA, this command only need be executed once more.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
43. Send data to Characteristic by characteristic handle
Send |
Receive |
Parameter |
AT+SEND_DATA[P1][P2][P3] |
none |
P1: Send method 2 Bytes, “WR”, “WN” P2: Chars Handle 4 Bytes P3: data what you want to send |
This command added since V700
Required state: after connect; Required role: Central role.
Only central role device can use that command. This command is used to send data to a characteristic who owned Write or Write-Without-Response property.
P1: two bytes length, always is “WR” or “WN”
P2: characteristic handle, get by AT+CHAR or AT+FINDALLCHARS command P3: the data what you want to send.
Note: Since V701, We added AT+SET_WAY command, you can forget this command.
V7xx support powerful self-learning function, please look at “HM-10_11 Self-Learning Function Introduction.pdf”
44. Set module use one Characteristic UUID or two Characteristics UUID
Send |
Receive |
Parameter |
AT+FFE2[P1] |
OK+ Set:[P1] |
P1: ?, 0, 1, 2 ?: Query 0: Only use one Characteristic, please look at AT+CHAR command 1: Use two Characteristics Second Char value = first Char value + 1 First char value = AT+CHAR value 2: Use two Characteristic Second Char value = first Char value – 1 First char value = AT+CHAR value |
Note: This command added since V550. This command only uses on slave role.
45. Set advertising package FLAG byte
Send |
Receive |
Parameter |
AT+FLAG[P1] |
OK+ Set:[P1] |
P1: 00~FF (one byte) |
Note: This command added in V530.
This command is used to set flag information byte in advertising package for other purposes.
46. Query/Set UART flow control switch
Send |
Receive |
Parameter |
AT+FIOW? |
OK+ Get:[P1] |
P1: 0, 1 |
AT+FIOW[P1] |
OK+ Set:[P1] |
0: Off |
|
|
1: On |
|
|
Default: 0 |
47. Query/Set module RX gain
Send |
Receive |
Parameter |
AT+GAIN? |
OK+ Get:[P1] |
P1: 0, 1 0: No RX gain |
AT+GAIN[P1] |
OK+ Set:[P1] |
|
|
1: Open RX gain Default: 0 |
Note: This command is added since V535
48. System Help Information
Send |
Receive |
Parameter |
AT+HELP? |
Help Information |
None |
49. Set Humi-information byte in advertising data
Send |
Receive |
Parameter |
AT+HUMI[P1] |
OK+Set:[P1] |
P1: 0×00~0xFF |
This command is used to set humi-information byte in advertising data. Added in V544
50. Query/Set Module work type
Send |
Receive |
Parameter |
AT+IMME? |
OK+ Get:[P1] |
P1: 0, 1 1: When module is powered on, only respond the AT Command, don’t do anything. Until received a work AT command. 0: When power on, module will start work immediately Default: 0 |
AT+IMME[P1] |
OK+ Set:[P1] |
In slave role:
If AT+IMME0 is setup, module will auto in advertising status.
If AT+MODE1 is setup, module will do nothing, you can config module now, until AT+START command received, module will in advertising status.
In central role:
If AT+IMME0 is setup, module will discovery and try made connection automatic.
If AT+IMME1 is setup, module will do nothing, you can use AT+DISC? AT+DISI? Or AT+DISA? Commands or other AT commands what you want to execute. Or you can execute AT+START let module in auto work mode.
51. Query/Set Module iBeacon switch
Send |
Receive |
Parameter |
AT+IBEA? |
OK+Get:[P1] |
P1: 0, 1 |
AT+IBEA[P1] |
OK+Set:[P1] |
0: Turn off iBeacon |
|
|
1: Turn on iBeacon |
|
|
Default: 0 |
Default iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935.
This command is added since V517 version.
52. Query/Set iBeacon UUID
Send |
Receive |
Parameter |
AT+IBE0? |
OK+Get:[P1] |
P1: 00000001~ FFFFFFFE Default: 74278BDA |
AT+IBE0[P1] |
OK+Set:[P1] |
Default iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935.
This command can change red color string in iBeacon UUID. This command is added since V520 version.
e.g.: Send: AT+IBE012345678 change iBeacon UUID red color string to “12345678”
53. Query/Set iBeacon UUID
Send |
Receive |
Parameter |
AT+IBE1? |
OK+Get:[P1] |
P1: 00000001~ FFFFFFFE Default: B6444520 |
AT+IBE1[P1] |
OK+Set:[P1] |
iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935.
This command can change red color string in iBeacon UUID. This command is added since V520 version.
e.g.: Send: AT+IBE112345678 change iBeacon UUID red color string to “12345678”
54. Query/Set iBeacon UUID
Send |
Receive |
Parameter |
AT+IBE2? |
OK+Get:[P1] |
P1: 00000001~ FFFFFFFE Default: 8F0C720E |
AT+IBE2[P1] |
OK+Set:[P1] |
iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935.
This command can change red color string in iBeacon UUID. This command is added since V520 version.
e.g.: Send: AT+IBE112345678 change iBeacon UUID red color string to “12345678”
55. Query/Set iBeacon UUID
Send |
Receive |
Parameter |
AT+IBE3? |
OK+Get:[P1] |
P1: 00000001~ FFFFFFFE Default: AF059935 |
AT+IBE3[P1] |
OK+Set:[P1] |
iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935.
This command can change red color string in iBeacon UUID. This command is added since V520 version.
e.g.: Send: AT+IBE112345678 change iBeacon UUID red color string to “12345678”
56. Query/Set Module iBeacon Marjor version
Send |
Receive |
Parameter |
AT+MARJ? |
OK+Get:[P1] |
P1: 0×0001~0xFFFE Default: 0xFFE0 |
AT+MARJ[P1] |
OK+Set:[P1] |
E.g. Change marjor version to 0×0102
Send: AT+MARJ0x0102, if all is okay, module will send back OK+Set: 0×0102 This command is added since V517 version.
57. Query/Set Module iBeacon minor
Send |
Receive |
Parameter |
AT+MINO? |
OK+Get:[P1] |
P1: 0×0001,~0xFFFE Default: 0xFFE1 |
AT+MINO[P1] |
OK+Set:[P1] |
This command is added since V517 version.
58. Query/Set Module iBeacon Measured power
Send |
Receive |
Parameter |
AT+MEAS? |
OK+Get:[P1] |
P1: 0×01~ 0xFF Default: 0xC5 |
AT+MEAS[P1] |
OK+Set:[P1] |
This command is added since V519 version.
59. Query/Set Module Work Mode
Send |
Receive |
Parameter |
AT+MODE? |
OK+Get:[P1] |
P1: 0, 1, 2 |
AT+MODE[P1] |
OK+Set:[P1] |
0: Transmission Mode |
|
|
1:PIOcollectionMode+ |
|
|
Mode 0 |
|
|
2: Remote Control Mode + |
|
|
Mode 0 |
Mode 0:
Before establishing a connection, you can use the AT command configuration module through UART.
After established a connection, you can send data to remote side from each other.
Mode 1:
Before establishing a connection, you can use the AT command configuration module through UART.
After established a connection, you can send data to remote side. Remote side can do fellows:
Send AT command configuration module.
Collect PIO04 to the PIO11 pins input state of HM-10. Collect PIO03 pins input state of HM-11.
Remote control PIO2, PIO3 pins output state of HM-10. Remote control PIO2 pin output state of HM-11.
Send data to module UART port (not include any AT command and per package must less than 20 bytes).
Mode 2:
Before establishing a connection, you can use the AT command configuration module through UART.
After established a connection, you can send data to remote side. Remote side can do fellows:
Send AT command configuration module.
Remote control PIO2 to PIO11 pins output state of HM-10. Remote control PIO2, PIO3 pins output state of HM-11.
Send data to module UART port (not include any AT command and per package must less than 20 bytes).
60. Query/Set Notify information
Send |
Receive |
Parameter |
AT+NOTI? |
OK+Get:[P1] |
P1: 0, 1 0: Don’t Notify 1: Notify |
AT+NOTI[P1] |
OK+Set:[P1] |
If this value is set to 1, when link ESTABLISHED or LOSTED module will send OK+CONN or OK+LOST string through UART.
61. Query/Set notify mode
Send |
Receive |
Parameter |
AT+NOTP? |
OK+ Get[P1] |
P1: 0, 1; default: 0 0: without address 1: with address |
AT+NOTP[P1] |
OK+ Set[P1] |
This command must work with “AT+NOTI1”, if this switch is open, when the module connect to disconnect, the prompt string will include the remote address.
OK+CONN:001122334455 String “001122334455” is the MAC address string
Added since V534
62. Query/Set Module name
Send |
Receive |
Parameter |
AT+NAME? |
OK+Get[P1] |
P1: module name, Max length is 12. Default: HMSoft |
AT+NAME[P1] |
OK+Set[P1] |
e.g.
change module name to “bill_gates” Send: “AT+NAMEbill_gates”
Recv: “OK+Set:bill_gates”
63. Query/Set output driver power
Send |
Receive |
Parameter |
Query: AT+PCTL? |
OK+Get:[P1] |
None |
Set: AT+PCTL[P1] |
OK+Set:[P1] |
P1: 0,1 0: Normal power output 1: Max power output Default: 1 |
Noted: Added in V527
64. Query/Set Parity bit
Send |
Receive |
Parameter |
Query: AT+PARI? |
OK+Get:[P1] |
None |
Set: AT+PARI[P1] |
OK+Set:[P1] |
P1: 0,1,2 0: None 1: ODD 2: EVEN Default: 0 (None) |
65. Query/Set PIO1 output status (System LED)
Send |
Receive |
Parameter |
AT+PIO1? |
OK+Get:[P1] |
P1: 0, 1 |
AT+ PIO1 [P1] |
OK+Set:[P1] |
0: Unconnected output 500ms High then 500ms Low, after connected output High. 1: Unconnected output Low, After connected output High. Default: 0 |
66. Query/Set PIO pins output high or low or PWM
Send |
Receive |
Parameter |
AT+PIO[P1]? |
OK+PIO:[P1][P2] |
P1: 2~B, ? P2: 0, 1, ? HM-11 only has 4 pins. P1 is which PIO port you want to Query/Set Value: 2,3,4,5,6,7,8,9,A,B. P2 is Query or setup value. “0” is low and “1” is high and “?” is query |
AT+PIO[P1][P2] |
OK+PIO:[P1][P2] |
Required AT+MODE0 or AT+MODE2 e.g.
Query PIO2 Send: AT+PIO2?
Setup PIO2 output high Send:AT+PIO21
Receive: OK+PIO21
HM-10 HMSensor version: P1 value is 2~A HM-10 HMSoft version: P1 value is 2~B
HM-11 HMSensor version: P1 value only is 2 HM-11 HMSoft version: P1 value is 2, 3
V525 added PIO2 PWM function, P2 value support 0~9
0: output low
1: output high
2: output 100ms PWM 3: output 200ms PWM
……
9: output 800ms PWM
V527 added AT+PIO?? Format query all pins output state.
67. Query/Set multiple PIO pins output high or low
Send |
Receive |
Parameter |
AT+MPIO[P1] |
OK+Set:[P1] |
P1: 000 ~ 3FF; Hex format string |
This command added since V551
This command is used to control multiple PIO pins output HIGH or LOW. P1 is Hex format, max value 3FF changed to binary format is 001111111111, Total length is 12 bit, left side to right bit mapped to module PIO0 to PIOB, Note: HM-11 only have PIO0, PIO1, PIO2,PIO3
1: is output HIGH; 0: is output LOW.
68. Query/Set Pin Code
Send |
Receive |
Parameter |
AT+PASS? |
OK+Get:[P1] |
P1:000000~999999 Default: 000000 |
AT+PASS[P1] |
OK+Set:[P1] |
e.g.
Query Pin Code Send:AT+PASS?
Receive:OK+Get:000000 Setup Pin Code 008888 Send:AT+PASS008888
Receive:OK+Set:008888
69. Query/Set Module Power
Send |
Receive |
Parameter |
AT+POWE? |
OK+Get:[P1] |
None |
AT+ POWE [P1] |
OK+Set:[P1] |
P1: 0 ~ 3 0:-23dbm 1:-6dbm 2:0dbm 3:6dbm Default: 2 |
70. Query/Set Module sleep type
Send |
Receive |
Parameter |
AT+PWRM? |
OK+Get:[P1] |
None |
AT+PWRM[P1] |
OK+Set:[P1] |
P1: 0~1 0: Auto sleep 1: Don’t auto sleep Default: 1 |
Only support peripheral role.
71. Query/Set reliable advertising mode
Send |
Receive |
Parameter |
AT+RELI? |
OK+ Get:[P1] |
P1: 0, 1 |
AT+RELI[P1] |
OK+ Set:[P1] |
0: Normal advertising |
|
|
1: Reliable advertising |
|
|
Default: 0 |
Note: This command is added since V530
This command is used to make sure module always send advertising package when module is in long time standby mode.
72. Restore all setup value to factory setup
Send |
Receive |
Parameter |
AT+RENEW |
OK+RENEW |
None |
73. Restart module
Send |
Receive |
Parameter |
AT+RESET |
OK+RESET |
None |
74. Query/Set Master and Slaver Role
Send |
Receive |
Parameter |
AT+ROLE? |
OK+Get:[P1] |
P1: 0, 1 |
AT+ROLE[P1] |
OK+Set:[P1] |
0: Peripheral |
|
|
1: Central |
|
|
Default: 0 |
75. Query RSSI Value
Send |
Receive |
Parameter |
AT+RSSI? |
OK+RSSI:[P1] |
None |
Require: AT+MODE1 or AT+MODE2 Required status: Connected.
This command only used by Remote device query after connected.
76. Query Last Connected Device Address
Send |
Receive |
Parameter |
AT+RADD? |
OK+RADD:MAC Address |
None |
77. Query/Set Module Sensor work interval
Send |
Receive |
Parameter |
AT+RAT?? |
OK+Get:[P1] |
P1: 00~99 Default: 0 (Close) Unit: minute |
AT+RAT[P1] |
OK+Set:[P1] |
Note: This command is only used for HMSensor or V7xx
78. Query/Set Stop bit
Send |
Receive |
Parameter |
AT+STOP? |
OK+Get:[P1] |
None |
AT+STOP[P1] |
OK+Set:[P1] |
P1:0, 1 0: One stop bit 1: Two stop bit |
|
|
Default: 0 (One stop bit) |
79. Work immediately (Switch to auto work state)
Send |
Receive |
Parameter |
AT+START |
OK+START |
None |
This command is only used when AT+IMME1 is setup.
80. Let module into sleep mode
Send |
Receive |
Parameter |
AT+SLEEP |
OK+SLEEP |
None |
Only support Peripheral role.
81. Query/Set Module save connected device MAC address information
Send |
Receive |
Parameter |
AT+SAVE? |
OK+Get:[P1] |
None |
AT+SAVE[P1] |
OK+Set:[P1] |
P1: 0~1 0: Save when connected 1: Don’t Save Default: 0 |
Note: In central role, when power on, module will check if there have a device address in internal flash, if have, module will try to connect it. If not, module will start a scan device procedure.
82. Query/Set Module discovery time when module in central role
Send |
Receive |
Parameter |
AT+SCAN? |
OK+Get:[P1] |
None |
AT+SCAN[P1] |
OK+Set:[P1] |
P1: 1 ~ 9 Unit: Second Default: 3 Seconds |
Note: Add in V543
83. Query/Set sensor type on module PIO11(HM-11 is PIO3)
Send |
Receive |
Parameter |
AT+SENS? |
OK+Get:[P1] |
P1: 0, 1, 2 |
AT+SENS[P1] |
OK+Set:[P1] |
0: None 1: DHT11 2: DS18B20 Default: 0 |
Note: This command is only use for HMSensor. Or V7xx
84. Query/Set if show device information when discovery
Send |
Receive |
Parameter |
AT+SHOW? |
OK+Get:[P1] |
None |
AT+SHOW[P1] |
OK+Set:[P1] |
P1: 0, 1, 2 0: Don’t show information 1: Show name 2: Show RSSI 3: Show RSSI and Name Default: 0 |
If AT+SHOW1 is setup, AT+DISC? Command will add the device name information into scan result package.
If AT+SHOW2 is setup, AT+DISC? Command will add device RSSI information into scan result package.
If AT+SHOW3 is setup, AT+DISC? Command will add device name and RSSI information into scan result package.
85. Query/Set Module Sensor Temperature and humidity (if has a sensor)
Send |
Receive |
Parameter |
AT+TEHU? |
OK+Get:[P1][P2] |
P1: 000~120 P2: 000~100 |
Note: This command is only use for HMSensor version. This value is added into scan response data package.
Data format is 0×02, 0×16, 0×00, 0xB0, [reserved], [temperature], [ humidity], [battery].
Android:
Included in OnLeScan function result array, you can see it directly. iOS:
Included in LeScan function result NSDictionary struct, service id is 0xB000.
86. Query module temperature
Send |
Receive |
Parameter |
AT+TEMP? |
OK+Get:[P1] |
P1: 000.000~255.000 |
HMSoft version could get internal temperature.
Note1: HMSensor version, if not setup AT+SENS value, will get IC temperature. Note2: Added in V523 version, Modified at V544.
87. Set temperature information byte in advertising data
Send |
Receive |
Parameter |
AT+TEMP[P1] |
OK+Set:[P1] |
P1: 0×00~0xFF Not include ‘?’ |
This command is used to set temperature information byte in advertising data. Added in V544
88. Query/Set module connect remote device timeout value in central role
Send |
Receive |
Parameter |
AT+TCON? |
OK+Get:[P1] |
None |
AT+TCON[P1] |
OK+Set:[P1] |
P1 is timeout value. P1 value: 000000~999999 Unit is ms. Default: 000000 Connect forever |
This command is only used in central role.
In central role, when module power on, if module have a saved device MAC address, then module will not into scan procedure, module will try to connect this device. This command caused module into a scan procedure if setup value is not 000000.
89. Query/Set Module Bond Mode
Send |
Receive |
Parameter |
AT+TYPE? |
OK+Get:[P1] |
None |
AT+TYPE[P1] |
OK+Set:[P1] |
P1: 0~2 0: Not need PIN Code 1: Auth not need PIN 2: Auth with PIN 3: Auth and bonded Default: 0 |
Important: If your module version is less than V515, please don’t use this command.
Android system AT+TYPE1 is same to AT+TYPE2. Note: Value 3 is added in V524.
90. Query/Set service UUID value
Send |
Receive |
Parameter |
AT+UUID? |
OK+Get:[P1] |
P1: 0×0001~0xFFFE Default: 0xFFE0 |
AT+UUID[P1] |
OK+Set:[P1] |
e.g. Change UUID value to 0xAAA0 Send: AT+UUID0xAAA0
Recv: OK+Set:0xAAA0
91. Query/Set UART sleep type
Send |
Receive |
Parameter |
AT+UART? |
OK+Get:[P1] |
P1: 0~1 |
AT+UART[P1] |
OK+Set:[P1] |
0: When module into sleep |
|
|
mode,youcanwakeup |
|
|
module through UART. |
|
|
1: When module into sleep |
|
|
mode, also shutdown UART. |
|
|
Default: 0xFFE0 |
|
|
|
Note: This command is only use for HMSensor version.
92. Set module advertisement data
Send |
Receive |
Parameter |
AT+PACK<P1> |
OK+Set:[P1] |
P1: Length 12, Hex string 000000000000 – FFFFFFFFFFFF |
Added since V607/V702
93. Query Software Version
Send |
Receive |
Parameter |
AT+VERR? AT+VERS? |
Version Information |
None |
3. Query/Set Advertising interval
Send |
Receive |
Parameter |
AT+ADVI? |
OK+ Get:[P1] |
None |
AT+ADVI[P1] |
OK+ Set:[P1] |
P1: 0 ~ F 0: 100ms; 1: 252.5ms; 2: 211.25ms; 3:318.75ms 4: 417.50ms; 5:546.25ms 6: 760.00ms; 7:852,50ms; 8: 1022.5ms; 9:1285ms A: 2000ms; B: 3000ms C: 4000ms; D: 5000ms E: 6000ms; F: 7000ms HMSoft Default: 0 HMSensor Default: 9 |
The maximum 1285ms recommendations from the IOS system. That mean 1285ms is apple allowed maximum value.
Added since V517 version.
V522 version added max value F.
4. Query/Set Advertising Type
Send |
Receive |
Parameter |
AT+ADTY? |
OK+ Get:[P1] |
None |
AT+ADTY[P1] |
OK+ Set:[P1] |
P1: 0 ~ 3 0: Advertising ScanResponse, Connectable 1: Only allow last device connect in 1.28 seconds 2: Only allow Advertising and ScanResponse. 3: Only allow Advertising |
|
|
Default: 0 |
Added since V519
5. Query/Set apple ANCS switch
Send |
Receive |
Parameter |
AT+ANCS? |
OK+ Get:[P1] |
None |
AT+ANCS[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
Note1: This command added in V524.
Note2: This command required AT+TYPE3 support. Note3: This command removed in V7xx firmware.
6. Query/Set white list switch
Send |
Receive |
Parameter |
AT+ALLO? |
OK+ Get:[P1] |
None |
AT+ALLO[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
Note1: This command added in V523.
Note2: White List allows three MAC address link to module. Please use AT+AD command set white list MAC address.
7. Query/Set white list MAC address
Send |
Receive |
Parameter |
AT+AD[P1]?? |
OK+ Get:[P2] |
None |
AT+AD[P1][P2] |
OK+ Set:[P2] |
P1: 1, 2, 3 P2: MAC address P1 default value: 0 |
Note1: This command added in V523.
E.g.
Send AT+AD1001122334455 Recv OK+Set:001122334455
8. Query/Set Module pin output state, After power supplied
Send |
Receive |
Parameter |
AT+BEFC? |
OK+ Get:[P1] |
None |
AT+BEFC[P1] |
OK+ Set:[P1] |
P1: 000~3FF; (Hex format string) Default: 0×000 |
This command added in V527.
Hex format 0x3FF change to binary format is 001111111111, total length is 12 bit, left to right side is mapped to module PIO0~PIOB port, PIO0 and PIo1 is used by system, So must be 0. Only Pio2~PIOB pins is available.
e.g. Set PIO2~PIOB all output high after power supplied. Send: AT+BEFC3FF
Recv: OK+Set:3FF
When next time power on, module PIO2~PIOB will output high. Note: Query PIO pins current state please use AT+PIO?? Command.
9. Query/Set Module pin output state, after connection is established
Send |
Receive |
Parameter |
AT+AFTC? |
OK+ Get:[P1] |
None |
AT+AFTC[P1] |
OK+ Set:[P1] |
P1:000~3FF;(Hex format string) Default: 000 |
This command added in V527.
Hex format 0x3FF change to binary format is 001111111111, total length is 12 bit, Left to right side is mapped to module PIO0~PIOB port, PIO0 and PIo1 is used by system. So, must be 0, Only Pio2~PIOB pins is available.
e.g. Set PIO2~PIOB all output high when connection is established. Send: AT+AFTC3FF
Recv: OK+Set:3FF
When Bluetooth connection is established, module PIO2~PIOB will output high. Note: Query PIO pins current state please use “AT+PIO??” command.
10. Query/Set battery monitor switch
Send |
Receive |
Parameter |
AT+BATC? |
OK+ Get:[P1] |
None |
AT+BATC[P1] |
OK+ Set:[P1] |
P1: 0 ~ 1 0: Off 1: On Default: 0 |
This command added in V520
When AT+BATC1 command is executed, module will add battery information into scan response data package.
11. Query battery information
Send |
Receive |
Parameter |
AT+BATT? |
OK+Get:[P1] |
P1: 000~100 |
There has three ways to get battery information:
a. Before establishing a connection, Send “AT+BATT?” through UART.
b. After established a connection, In Mode 1 or 2, remote side send “AT+BATT?” Battery information has included in scan response data package, one-hour updated once.