This README will guide you through the process of configuring the Diymall HM-10 iBeacon. This document was created because the beacon's official documentation is difficult to understand and this document will serve as a summation of the official doc.
The base station cannot be set UART, which means you cannot use the basestation's serial communication (RX,TX) to communicate with HM-10. You must use an application that can communicate with BLE devices.
One of the following applications will be required to send commands to the device
- OS X [LightBlue] (https://itunes.apple.com/us/app/lightblue/id639944780?mt=12)
- iOS TODO
- Android TODO
- Windows TODO
- Linux Flavors TODO
Note: This guide assumes the device is configured with its default values
- Install [LightBlue] (https://itunes.apple.com/us/app/lightblue/id639944780?mt=12) on an OS X machine that supports BLE 4.0
- Open LighBlue. Under peripherals there will be a device name
HMSensor - Select
HMSensor, his will reveal the services that are available on the device - Under services select
FFE0, this will reveal the characteristics are available for this service - Under characteristics select
FFE1, this will reveal details about the characteristic and allow you to read, subscribe, write hex and write ASCII to the device - Under details click the
Subscribebutton - In the Write ASCII text box input the test command:
ATand hitenter, this will send the command to the device - Under details, the ASCII field should have been updated with a
OKresponse. If you do not see a response make sure that you are subscribed
The Diymall Beacon supports a variety of commands. Each of these commands should be sent as ASCII to the device.
- Test Command
- Get MAC Address
- Get/Set Advertising Interval
- Get/Set battery monitor switch
- Get Battery Information
- Set iBeacon into service mode
- Get/Set Characteristic
- Get/Set iBeacon deployment mode
- System Help Information
- Get/Set iBeacon switch
- Get/Set iBeacon UUID
- Get/Set iBeacon Major value
- Get/Set iBeacon Minor value
- Get/Set iBeacon Measured power
- Get/Set device name
- Get/Set Pin Code
- Get/Set device antenna power
- Get/Set device's sleep type
- Restore to factory defaults
- Restart device
- Get RSSI Value
- Get last connected device address
- Get/Set Device's Authentication Mode
- Get/Set Service UUID
- Get firmware version
| Send | Receive |
|---|---|
| AT | OK |
Gets the BLE Modules MAC address
| Send | Receive |
|---|---|
| AT+ADDR? | OK+ADDR:MAC Address |
Gets or sets the advertising interval of the beacon. The intervals are mapped to a specific hex value:
| Value | Interval |
|---|---|
| 0 | 100 ms |
| 1 | 152.5 ms |
| 2 | 211.25 ms |
| 3 | 318.75 ms |
| 4 | 417.5 ms |
| 5 | 546.26 ms |
| 6 | 760 ms |
| 7 | 852.5 ms |
| 8 | 1022.5 ms |
| 9 | 1285 ms |
| A | 2000 ms |
| B | 3000 ms |
| C | 4000 ms |
| D | 5000 ms |
| E | 6000 ms |
| F | 7000 ms |
Default 9 (1285 ms)
| Send | Receive |
|---|---|
| At+ADVI? | OK+Get:value |
AT+ADVIvalue |
OK+Set:value |
- Available in firmware v517 or greater
- F value was added in firmware v522
TODO what does this do
| Value | Description |
|---|---|
| 0 | Off |
| 1 | On |
Default 0 (Off)
| Send | Receive |
|---|---|
| AT+BATC? | OK+Get:value |
AT+BATCvalue |
OK+Set:value |
- Available in firmware v520 or greater
Gets the battery percentage.
value: 000 to 100
| Send | Receive |
|---|---|
| AT+BATT? | OK+Get:value |
Places the iBeacon into service until the device's power is reset. iBeacon mode needs to be enabled first.
| Send | Receive |
|---|---|
| AT+BUSHU | OK+BUSHU |
- Added in firmware v520 and Removed in v521
value: 0x0001 to 0xFFFE
Default 0x0FFE1
| Send | Receive |
|---|---|
| AT+CHAR? | OK+Get:value |
AT+CHARvalue |
OK+Set:value |
| Value | Description |
|---|---|
| 1 | Allows broadcasting and scanning |
| 2 | Only allow broadcasting |
| Send | Receive |
|---|---|
AT+DELOvalue |
OK+DELOvalue |
- After receiving OK+DEL0
valuethe device will reset after 500 ms - This command will put the device into a non-connectable state until next restart
TODO wat
| Send | Receive |
|---|---|
| AT+HELP? | Help Info |
Command allows the iBeacon mode to be turned on or off.
| Value | Description |
|---|---|
| 0 | Turn off iBeacon mode |
| 1 | Turn on iBeacon mode |
Default 0 (off)
| Send | Receive |
|---|---|
| AT+IBEA? | OK+Get:value |
AT+IBEAvalue |
OK+Set:value |
- Available in firmware v517 or greater
Allows the iBeacon's UUID to be changed. The iBeacon's UUID requires four commands, each command sets a four byte portion of the UUID. The location defines which portion of the bytes are changed.
| Location | UUID Portion |
|---|---|
| 0 | 74278BDA-B644-4520-8F0C-720EAF059935 |
| 1 | 74278BDA-B644-4520-8F0C-720EAF059935 |
| 2 | 74278BDA-B644-4520-8F0C-720EAF059935 |
| 3 | 74278BDA-B644-4520-8F0C-720EAF059935 |
Value: 00000001 to FFFFFFFE
| Send | Receive |
|---|---|
| AT+IBE[location] | OK+Get:value |
AT+IBE[location]value |
OK+Set:value |
AT+IBE036996276 // Sets bytes 0-3 to 36996276
AT+IBE1CB0040A2 // Sets bytes 4-7 to CB0040A2
AT+IBE2A81ED7F9 // Sets bytes 8-11 to A81ED7F9
AT+IBE35858CA7C // Sets bytes 12-15 to 5858CA7C
- Available in firmware v520 or greater
Gets or sets the iBeacon's major value
values 0x0001 to 0xFFFE
Default 0xFFE0
| Send | Receive |
|---|---|
| AT+MARJ? | OK+Get:value |
AT+MARJvalue |
OK+Set:value |
- Available in firmware v517 and greater
Gets or sets the iBeacon's minor value
values 0x0001 to 0xFFFE
Default 0xFFE1
| Send | Receive |
|---|---|
| AT+MINO? | OK+Get:value |
AT+MINOvalue |
OK+Set:value |
- Available in firmware v517 and greater
Measured power is a calibrated value of the iBeacons average RSSI value at one meter.
value are from 0x00 to 0xFF
0xFF is -1 dBm at 1m and 0x00 is -256 dBm at 1m
Default 0xC5
| Send | Receive |
|---|---|
| AT+MEA?? | OK+Get:value |
AT+MEAvalue |
OK+Set:value |
- Available in firmware v519 and greater
Sets the name of the device, you will see this when scanning for the beacon.
value string with max length of 12
Default HMSoft
| Send | Receive |
|---|---|
| AT+NAME? | OK+NAME:value |
AT+NAMEvalue |
OK+Set:value |
AT+NAMEhello_world
value 000000 to 999999
| Send | Receive |
|---|---|
| AT+PASS? | OK+Get:value |
AT+PINvalue |
OK+Set:value |
Default 000000
Gets or sets the antenna's power. Each power setting is mapped to a specific hex value:
| Value | Power |
|---|---|
| 0 | -23dBm |
| 1 | -6dBm |
| 2 | 0dBm |
| 3 | 6dBm |
Default 0 (-23dBm)
| Send | Receive |
|---|---|
| AT+POWE? | OK+Get:value |
AT+POWEvalue |
OK+Set:value |
| Value | Description |
|---|---|
| 0 | Auto sleep |
| 1 | Don't auto sleep |
Default 1 (Don't auto sleep)
| Send | Receive |
|---|---|
| AT+PWRM? | OK+Get:value |
AT+PWRMvalue |
OK+Set:value |
- Sleep is only supported when the beacon is in the peripheral role
| Send | Receive |
|---|---|
| AT+RENEW | OK+RENEW |
| Send | Receive |
|---|---|
| AT+RESET | OK+RESET |
| Send | Receive |
|---|---|
| AT+RSSI? | OK+RSSI:value |
- Requires AT+MODE value > 0
Gets the MAC address of the last co
| Send | Receive |
|---|---|
| AT+RADD? | OK+RADD:MAC Address |
| Value | Description |
|---|---|
| 0 | No PIN Code |
| 1 | Bonding does not need PIN |
| 2 | Bonding requires PIN |
Default 0 (No PIN code required)
| Send | Receive |
|---|---|
| AT+TYPE? | OK+Get:value |
AT+TYPEvalue |
OK+Set:value |
- If firmware is less than v515 do not used this command
value 0x0001 to 0xFFFE
Default 0xFFE0
| Send | Receive |
|---|---|
| AT+UUID? | OK+Get:value |
AT+UUIDvalue |
OK+Set:value |
| Send | Receive |
|---|---|
| AT+VERR? | Version info |
AT+VERSvalue |
Version info |