Model:HM-10 Tinysine Bluetooth 4.0 BLE module User Manual Tinysine Electronics @ 2015 Version 1.
www.tinysine.com INTRODUCTION The most complete, most convenient, the most stable of Bluetooth data transmission, remote control, PIO acquisition module ---- Master and slave role in one ---- Remote control without other MCU ---- The PIO data acquisition without other MCU SPECIFICATIONS BT Version: Bluetooth Specification V4.0 BLE Send and receive no bytes limit Working frequency: 2.4GHz ISM band Modulation method: GFSK(Gaussian Frequency Shift Keying) RF Power: 0.
www.tinysine.com In discoverable mode, send “AT+SLEEP” string through UART, if all is okay, module will return “OK+SLEEP” string and into sleep mode. AT commands Factory default setting: Name: HMSoft; Baud: 9600, N, 8, 1; Pin code: 000000; Peripheral Role; transmit mode. AT Command format: Uppercase AT command format. string format, without any other symbol. (e.g. \r or \n). On Transmit version: Only accept AT Command from UART interface when Bluetooth device is not connected with remote device.
www.tinysine.com Reference voltage is 3.3V, only used in HM-10. 3. Query module MAC address Send Receive Parameter AT+ADDR? OK+ADDR:MAC Address None Send Receive Parameter AT+ADTY? OK+Get:[para] None AT+ADTY[para] OK+Set:[para] 4. Query/Set Advertising type para:0~3 0:Connect by any device 1:Allow to connect with last succeeded device(within 1.28s after power on) 2:Allow to broadcast and scanning 3:Only advertising Default:0 Added since V519 version 5.
www.tinysine.com Send Receive Parameter AT+ALLO? OK+Get:[para] None AT+ALLO[para] OK+Set:[para] para: 0, 1 0: Off 1: On Default: 0 Added in V523 version 7. Query/Set whitelist MAC address Send Receive Parameter AT+AD[para1]?? OK+AD[para1]?:[para2] None AT+AD[para1][para2] OK+AD[para1][para2] para1: 1, 2, 3 para2: MAC address e.g.
www.tinysine.com 3: 318.75ms 4: 417.5ms 5: 546.25ms 6: 760ms 7: 852.5ms 8: 1022.5ms 9: 1285ms A: 2000ms B: 3000ms C: 4000ms D: 5000ms E: 6000ms F: 7000ms Default: 0 HMSoft Default: 0 HMSensor Default: 9 The maximum 1285ms recommendations form the IOS system. That is to say, 1285ms is apple allowed, but in response to scan and connected all the time will be long. Added since V515 version. V521 allows max value to be 9, V522 allows max value to be F. 9.
www.tinysine.com Added in V527 Version. 3FF == 00111111111, from left to right, map to PIO0~PIOB, PIO0 and PIO1 is used by system. Only PIO2~PIOB is available. e.g. Set PIO2~PIOB all output high level after power supplied Send: AT+BEFC3FF Receive: OK+Set:3FF When powered module next time, PIO2~PIOB will output high level NOTE: 1. Query PIO pins current state, please send “AT+PIO??” command. 2. Please don’t use this command when “AT+MODE1” is setup. 10.
www.tinysine.com 11. Query/Set battery monitor switch Send Receive Parameter AT+BATC? OK+ Get:[para] None AT+BATC[para] OK+ Set:[para] para: 0 ~ 1 0: Off 1: On Default: 0 Added in V520 version. 12. Query battery information Send Receive Parameter AT+BATT? OK+BATT:[para] para: 000~100 Only works when power module with battery. 100% = 3V, 0% = 2V. There are three ways to get battery information: A. Before establishing a connection, send “AT+BATT?” through UART. B.
www.tinysine.com 14. Query/Set baud rate Send Receive AT+BAUD? OK+Get:[para] AT+BAUD[para] OK+Set:[para] Parameter para: 0~8 0: 9600 1: 19200 2: 38400 3: 57600 4: 115200 5: 4800 6: 2400 7: 1200 8: 230400 Default: 0(9600) Need to re-power module. e.g.
www.tinysine.com 15. Query/Set Minimum Link Layer connection interval Send Receive Parameter AT+COMI[para] OK+ Get:[para] para: ?, 0 ~ 9 OK+ Set:[para] ?: Query; 0: 7.5ms 1: 10ms; 2: 15ms 3: 20ms; 4: 25ms 5: 30ms; 6: 35ms 7: 40ms; 8: 45ms 9: 4seconds; Default: 3 Added since V538 version. NOTE: Only used in central role, peripheral role can only ask central role to change. 16.
www.tinysine.com 17. Query/Set Link Layer connection slave latency Send Receive Parameter AT+COLA[para] OK+ Get:[para] para: ?, 0 ~ 4 OK+ Set:[para] ?: Query 0: No latency Default: 0 Added since V538 version. NOTE: Only used in central role, peripheral role can only ask central role to change. 18.
www.tinysine.com 1:Update Default: 1 Added since V538 version NOTE: Only used in peripheral role. 20. Try to connect to last succeeded device Send Receive AT+CONNL OK+CONN[para] Parameter para: L, E, F, N L: Connecting E: Connect error F: Connect Fail N: No Address NOTE: Only central role is used. Module must setup AT+ROLE1, AT+IMME1 first. If remote device has already connected to other device or shut down, “OK+CONNF” will received after about 10 seconds. 21.
www.tinysine.com para1: Before V535, module can only return 6 discovered devices stand for 0~5; since V535, no limit. Please refer to AT+DISC? command. e.g. Try to connect an device which MAC address is 00:17:EA:09:09:09 Send: AT+CON0017EA090909 May receive a reply: OK+CONNA ========= Accept request, connecting OK+CONNE ========= Connect error OK+CONN ========= Connected, if AT+NOTI1 is setup 22.
www.tinysine.com 23. Query PIO04~PIO11 input(output) state Send Receive Parameter AT+COL?? OK+ Col:[para] para: 00~FF para is a byte, has 8 bits, bit 7 ~ bit 0 is map to PIO4 ~ PIO11. Added since V515 version. 24. Clear last connected device address Send Receive Parameter AT+CLEAR OK+CLEAR None Send Receive Parameter AT+CYC?? OK+ Get:[para] AT+CYC[para] OK+ Set:[para] Notice: Only central role is used. 25.
www.tinysine.com 27. Query/Set iBeacon deploy mode Send Receive AT+DISC? Parameter OK+DISCS para1: C; 0~2 OK+DIS[para1]:[para2] C: Common String OK+DISCE 0~2: Address type para2: S, E, [MAC String] S: Start discovery E: End discovery MAC String: Device MAC String NOTE: Module must set AT+ROLE1, AT+IMME1 first. e.
www.tinysine.com Connect use MAC String: AT+CON[MAC String] 28. Start a iBeacon device discovery scan Send AT+DISI? Receive Parameter OK+DISCS p1:Factory ID OK+DISC: [p1:p2:p3:p4:p5] p2:iBeacon ID OK+DISCE p3: Major Value Minor Value Measured Power p4: MAC p5: RSSI Added since V309 version. NOTE: Must set AT+ROLE1 and AT+IMME1 first. p1 length is 8; p2 length is 32; p3 length is 10; p4 length is 12; p5 length is 4. p3: Major Value(length 4); Minor Value(length 4); Measured Power(length 2).
www.tinysine.com 30. Remove bond information Send Receive Parameter AT+ERASE OK+ERASE None Added since V524 version. 31. Query/Set advertising data flag byte Send Receive Parameter AT+FLAG[para] OK+Set:[para] Para: 00~FF(one byte) Added since V530 version. Please refer to AT+BATT? 32.
www.tinysine.com 0: Off 1: On Default: 0 35. System Help Information Send AT+HELP? Receive Parameter Help Information None 36. Query/Set Module work type Send Receive AT+IMME? OK+Get:[para] AT+IMME[para] OK+Set:[para] Parameter para: 0, 1 1: When module is powered on, only respond the AT Command, don’t do anything until AT + START is received,or can use AT+CON,AT+CONNL 0: When power on, work immediately Default: 0 NOTE: Only used for central role. Need to re-power module. 37.
www.tinysine.com 38. Query/Set iBeacon UUID Send Receive AT+IBE0? OK+Get:[para] AT+IBE0[para] OK+Set:[para] Parameter para: 0x00000001~ 0xFFFFFFFE Default: 74278BDA Added since V520 version. iBeacon UUID is: 74278BDA-B644-4520-8F0C-720EAF059935. This command can change red color string in iBeacon UUID. e.g. Send: AT+IBE012345678 Change iBeacon UUID red color string to “12345678”. 39.
www.tinysine.com iBeacon UU ID is: 74278BDA-B644-4520-8F0C-720EAF059935. This command can change blue color string in iBeacon UUID. e.g. Send: AT+IBE112345678 Change iBeacon UUID blue color string to “12345678”. 41. Query/Set iBeacon UUID Send Receive AT+IBE3? OK+Get:[para] AT+IBE3[para] OK+Set:[para] Parameter para: 0x00000001~ 0xFFFFFFFE Default: AF059935 Added since V520 version. iBeacon UU ID is: 74278BDA-B644-4520-8F0C-720EAF059935. This command can change black color string in iBeacon UUID.
www.tinysine.com 43. Query/Set Module iBeacon minor Send Receive AT+MINO? OK+Get:[para] AT+MINO[para] OK+Set:[para] Parameter para: 0x0001~0xFFFE Default: 0x FFE1 Added since V517 version. e.g. Set Minor to 0x0102 Send: AT+MINO0x0102 If all is okay, module will send back OK+Set:0x0102 44. Query/Set Module iBeacon Measured power Send Receive AT+MEA?? OK+Get:[para] AT+MEA[para] OK+Set:[para] Parameter para: 0x00~0xFF Default: 0xC5 Added since V519 version. 45.
www.tinysine.com A. Send AT command configuration module. B. Collect PIO04 to the PIO11 pins input state of HM-10. C. Collect PIO03 pins input state of HM-11. D. Remote control PIO2, PIO3 pins output state of HM-10. E. Remote control PIO2 pin output state of HM-11. F. Send data to module UART port (not include any AT command and package must less than 20 bytes). per Mode 2: Before establishing a connection, you can use the AT command configuration module through UART.
www.tinysine.com 48. Query/Set Module name Send Receive AT+NAME? OK+NAME[para] AT+NAME[para] OK+Set[para] Parameter para: module name, Max length is 11. Default: HMSoft e.g. Change module name to bill_gates Send: AT+NAMEbill_gates Receive: OK+Set:bill_gates 49. Query/Set Parity bit Send Receive Parameter Query: AT+PARI? OK+Get:[para] None Set: AT+PARI[para] OK+Set:[para] para: 0,1,2 0:None 1:EVEN 2:ODD Default: 0 Need to re-power module. 50.
www.tinysine.com 51. Query/Set PIO1 output status (System LED) Send Receive AT+PIO1? OK+Get:[para] AT+ PIO1[para] OK+Set:[para] Parameter para: 0, 1 0: Unconnected Output 500ms High 500ms Low,Connected output High. 1: Unconnected output Low, Connected output High. Default: 0 Need to re-power module. 52.
www.tinysine.com Send: AT+PIO21 Receive: OK+PIO2:1 HM-10 HMSensor version: para1 is 2~A HM-10 HMSoft version: para1 is 2~B V525 version added PIO2 with PWM function, para2 is 0~9. 0: Output low level 1: Output high level 2: Output 100ms PWM ...... 9: Output 800ms PWM V527 version added AT+PIO?? to query all pins output state. 53. Query/Set Pin Code Send Receive AT+PASS? OK+Get:[para] AT+ PASS[para] OK+Set:[para] Parameter para :000000~999999 . Default: 000000 e.g.
www.tinysine.com Default: 1 Only support peripheral role. 55. Query/Set Module Power Send Receive Parameter AT+POWE? OK+Get:[para] None AT+ POWE [para] OK+Set:[para] para: 0 ~ 3 0: -23dbm 1: -6dbm 2: 0dbm 3: 6dbm Default: 2 56. Query/Set reliable advertising mode Send Receive Parameter AT+RELI? OK+Get:[para] None AT+ RELI[para] OK+Set:[para] para: 0, 1 0: Normal advertising 1: Reliable advertising Added since V530 version. 57.
www.tinysine.com 58. Restore all setup value to factory setup Send Receive Parameter AT+RENEW OK+RENEW None . Send Receive Parameter AT+RESET OK+RESET None 59. Restart module 60. Query/Set Master and Slaver Role Send Receive AT+ROLE? OK+Get:[para] AT+ROLE[para] OK+Set:[para] Parameter para: 0, 1 0: Peripheral 1: Central Default: 0 61. Query RSSI Value Send Receive Parameter AT+RSSI? OK+RSSI:[para] None Must setup AT+MODE1 or AT+MODE2.
www.tinysine.com Default: 0 Added since V521 version. Please execute AT+FILT0 first. 64. Query/Set sensor type on module PIO11(HM- 11 is PIO3) Send Receive AT+SENS? OK+Get:[para] AT+SENS[para] OK+Set:[para] Parameter para: 0, 1, 2 0: None 1: DHT11 2: DS18B20 Default: 0 Note: This command is only used for HMSensor. 65. Query/Set Stop bit Send Receive Parameter AT+STOP? OK+Get:[para] None AT+STOP[para] OK+Set:[para] para:0, 1 0: One stop bit 1: Two stop bit Default: 0 Need to re-power module.
www.tinysine.com 68. Query/Set Module save connected address parameter Send Receive Parameter AT+SAVE? OK+Get:[para] None AT+SAVE[para] OK+Set:[para] para: 0~1 0: Save when connected 1: Don’t Save Default: 0 69. Query/Set module connect remote device timeout value Send Receive Parameter AT+TCON? OK+TCON:[para] None AT+TCON[para] OK+Set:[para] para: 000000~009999 Unit: ms This value is only used for central role.
www.tinysine.com 72. Query/Set Module Bond Mode Send Receive Parameter AT+TYPE? OK+Get:[para] None AT+TYPE[para] OK+Set:[para] para: 0~2 0: Not need PIN Code 1: Pair not need PIN 2: Pair with PIN 3: Pair and bond Default: 0 NOTE: If your module version is less than V515, please don’t use this command. Under android 4.3 AT+TYPE1 is same as AT+TYPE2. TYPE3 is added in V524 version. 73.
www.tinysine.com sleep mode, shutdown UART too. Default: 1 Note: Only use for HMSensor. Added since V518 version 75.