Bluetooth41 en
Bluetooth41 en
Bluetooth41 en
Datasheet
SIG members
acquisition module
---- Master and slave role in one
---- Remote control without other MCU
---- The PIO data acquisition without other MCU
13. Product parameters
2. Product overview
Thanks for you choose our products. If you want to know more,
www.jnhuamao.cn can help you (Videos, New version datasheet, Module work
flow, project Codes, etc.)
HM Bluetooth module use CYPress IC, Master and slave roles in one,
transmission version and remote control version in one, Support the AT
command modify module parameters, Convenient and flexible.
Transmission version can be used to transmit data between two Bluetooth
devices.
Remote Control version can be used to Control PIO ports output high or low
level without any other MCU.
HM-01, HM-02, HM-03, HM-04, HM-05, HM-06, HM-07, HM-08, HM-09 is
Bluetooth V2.1 version. Use CSR Chip.
HM-10, HM-11, HM-12 is Bluetooth V4.0 BLE version. Use TI Chip.
HM-16, HM-17 is Bluetooth V4.1 BLE version. Use CYPRESS Chip.
HM-18, HM-19 is Bluetooth V4.2 BLE version. Use CYPRESS Chip.
HM-01, HM-09, HM-10, HM-12, HM-16, HM-18 have same size and same
pins.
HM-06, HM-07, HM-11, HM-13, HM-17, HM-19 have same size and same
pins.
3. Product model
Modules VDD Size(mm) Flash Chip BT Version
4. Product certificate
Most products have FCC-ID, CE, RoHS. You can download certification
from www.jnhuamao.cn or www.huamaosoft.com
5. Product pictures
HM-11 BLE 4.0 HM-12S Dual (EDR 4.0 & BLE 4.0)
HMSoft V544 HMSoft V316
HM-12C Dual (EDR 4.0 & BLE 4.0) HM-12T Dual (EDR 4.0 & BLE 4.0)
HMSoft V316 HMSoft V311
HM-13 Dual (EDR 4.0 & BLE 4.0) HM-14 Dual (EDR 4.0 & BLE 4.0)
HMSoft V316 HMSoft V218
WIFI WIFI+BLE
Testing Testing
Coming soon Coming soon
HM-20 HM-21
5 NC NC PIN27
6 NC NC PIN26
7 NC NC PIN41
8 NC NC PIN42
9 NC NC NC
10 NC NC NC
11 RESETB Reset if low >100ms. RESET
12 VCC VCC VCC
13 GND Ground Groud
14 GND Ground Groud
15 NC NC NC
16 NC NC NC
17 NC NC NC
18 NC NC NC
19 NC NC NC
20 NC NC NC
10 NC NC or VCC
11 RESETB Reset if low <100ms RESET
12 GND Ground Ground
13 PIO3 input/output pin PIN5
14 PIO2 input/output pin PIN6
7. System function
How to wake up module from sleep mode?
Send I am iron man, I am iron man, I am iron man I am iron.. string.
Yes, that is a joke, in sleep mode, you can send a long string (Length > 80
or more), that string can made module wake up, and you will receive
OK+WAKE string through UART. That string cant include any AT commands.
After wake up module, you can send and receive AT commands.
How to let module into sleep mode?
In discoverable mode, send AT+SLEEP string through UART, if all is okay,
module will return OK+SLEEP string then into sleep mode.
System advert packet
In iOS cant get model MAC address directly. So we put MAC address
information into advert packet.
You can use CBAdvertisementDataManufactureDataKey property to get it,
string format like follow:
0x48, 0x4D, 0xB4, 0x99, 0x4C, 0xXX, 0xXX, 0xXX (Length 8 Bytes)
0x48 and 0x4D is HM string.
0xB4: 0x99: 0x4C: 0xXX: 0xXX: 0xXX is BLE MAC Address.
Default: 9
Default: 0
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.
6. Query/Set Module pin output state, After power on
Send Receive Parameter
AT+BEFC? OK+ Get:[P] P: 000~ 3FF (HM-16)
AT+BEFC[P] OK+ Set:[P] P: 000~ B00 (HM-17)
Default: 000
3FF == 001111111111, left to right side is map to PIO0~PIOB, For HM-16
PIO0 and PIo1 is used by system. Only Pio2~PIOB pins is available. For
HM-17 only PIO0, PIO2, PIO3 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.
7. Query/Set battery monitor switch (*)
Send Receive Parameter
@Override
byte[] scanRecord) {
......<Other code>......
//Since V522
if(scanRecord[i + 7] > 0)
if(scanRecord[i + 5] > 0)
if(scanRecord[i + 6] > 0)
......<Other code>......
};
iOS:
c. Included in LeScan function result NSDictionary struct, service id is
0xB000.
9. Query/Set baud rate
Send Receive Parameter
AT+BAUD? OK+Get:[P] P: Baud rate No.
AT+BAUD[P] OK+Set:[P] 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:
Send: AT+BAUD?
Receive: OK+Get:0
Setup baud:
Send: AT+BAUD1
Receive: OK+Set:1
Note: If setup to Value 7, After next power on, module will not support any
AT Commands, until PIO0 is pressed, Module will change Baud to 9600.
10. Query/Set Characteristic
Send Receive Parameter
AT+CHAR? OK+Get:<P1> P1: 0x0001~0xFFFE
AT+CHAR<P1> OK+Set:<P1> Default: 0xFFE1
1: Update
Default: 1(update)
This command is only use when module is in slave role.
Note: This command is added since V116
16. Clear Last Connected device address
Send Receive Parameter
If the device not enable iBeacon function, P0, P1, P2 will use 0 fill.
e.g.
Query PIO2
Send: AT+PIO2?
Setup PIO2 output high
Send: AT+PIO21
Receive: OK+PIO21
HM-16 HMSensor version: para1 value is 2~A
HM-16 HMSoft version: para1 value is 2~B
4: 4 Seconds
5: 5 Seconds
Default: 3
This parameter is used for AT+DISC? or AT+DISI? command
59. Query/Set Module save connected remote device address parameter
Send Receive Parameter
AT+SAVE? OK+Get:<P1> None
1:Show name
Default: 0
Resource:
Bluetooth Module 2.1 datasheet:
http://www.jnhuamao.cn/Bluetooth_en.zip
Bluetooth Module 4.0 datasheet:
http://www.jnhuamao.cn/Bluetooth40_en.zip
Bluetooth Module 4.0 USB Dongle
http://www.jnhuamao.cn/HMDongle40_en.zip
Bluetooth 2.1 Com Assistant for android:
http://www.jnhuamao.cn/HMComAssistant.rar
Bluetooth 4.0 Com Assistant for android 4.3:
http://www.jnhuamao.cn/HMBLEComAssistant.rar
Bluetooth 4.0 IOS Code:
http://www.jnhuamao.cn/HMSoft_iso7.zip