IBeacon using HM10 BLE module

fig8

Hello everyone, this blog post explains how to setup an HM-10 bluetooth module as an iBeacon. iBeacons can be used with mobile applications  as an indoor positioning systemwhich helps smartphones determine their approximate location.

COMPONENTS USED:

  • PC with arduino IDE installed (For Arduino Serial Monitor)
  • USB to serial converter(CP2102)
  • HM-10 bluetooth module
  • Connecting wires for making connections

If you don’t have HM-10 module and CP2102 module you can have one from our store.HM-10 ,CP2102

HARDWARE CONNECTIONS

  • Using the USB to serial converter connect the HM-10 module to PC.
  • Connections are as below…

    • 5V of USB to TTL – ——–>VCC of HM-10
    • GND               ————->   GND
    • TX of USB to TTL———>RX of HM-10
    • RX of USB to TTL———>TX of HM-10
  • Open the Serial port using the serial monitor in the Arduino IDE. The baud rate must be 9600.
  • You can use any other serial monitor software like putty for the same purpose. Well I’m comfortable with Arduino serial Monitor.

fig1

Now power your module by plugging it to the USB port of your PC. To check whether the module is working, you can use our app called BLE chat, which can be downloaded from Google play store.

fig2

 

Now follow the below steps to setup HM10 as an iBeacon

Step 1:

  • Open arduino IDE and select TOOLS
  • Select COM port to which the CP2102 usb to ttl module is connected. Open the serial monitor.
  •  At the bottom menu  select baud rate as “9600 baud” and line ending as “No line ending”.

Step 2:

Firmware version used is V540

Now you need to type in a few AT commands in the console for setting the HM10 module as iBeacon.

Each command will be acknowledged with an OK.

  1. AT+RENEW
  2. AT+RESET
  3. AT
  4. AT+MARJ0xABCD
  5. AT+MINO0x1234
  6. AT+ADVI5
  7. AT+NAMEIBEAC
  8. AT+ADTY3
  9. AT+IBEA1
  10. AT+DELO2
  11. AT+PWRM0
  12. AT+RESET

Note: The values of the parameters in red should be what you want them to be. The above are just examples.

newline

Now the module is configured as an iBeacon, it should be visible on your Android device if you have an iBeacon  locator App installed.

Step 3:

You can download any iBeacon detector application from google play store  Here an app called “Locate Beacon” is used. Open the application. This application works only if your mobile supports BLE.

fig5

And select the Locate beacon menu. The app will list all visible iBeacons.

fig6

Cilck on any iBeacon to get the distance info regarding the same.

fig7

 

 

Leave a comment