loading

iBeacon is a new technology described by Apple Inc. as "a new class of low-powered, low-cost transmitters that can notify nearby iOS 7 or 8 devices of their presence".The technology enables a smart phone or other device to perform actions when in close proximity to an iBeacon.

One application is an indoor positioning system, which helps smart phones determine their approximate location or context. With the help of an iBeacon, a smartphone's software can approximately find its relative location to an iBeacon in a store. iBeacons can help a phone show notifications of items nearby that are on sale, and it can enable payments at the point of sale (POS) where customers don’t need to remove their wallets or cards to make payments. iBeacon technology works using the Bluetooth Low Energy (BLE) technology, also known as Bluetooth Smart. iBeacon uses Bluetooth low energy proximity sensing to transmit a universally unique identifier picked up by a compatible app or operating system. The identifier can then be looked up over the internet to determine the device's physical location or trigger an action on the device such as a check-in on social media or a push notification. Various vendors have since made hardware iBeacons that come in a variety of form factors, including small coin cell devices, USB sticks, and generic Bluetooth 4.0 capable USB dongles.

Step 1: Hardware

We will use a HM-10 module. It is bluetooth low energy 4.0 module. This module has Mcu on board which means that we can program it with rx, tx, and that we also can use FTDI chip to send AT commands via serial connection. By sending AT commands we are configuring options for this module. I would recommend flashing module with new firmware right after getting it, it’s very simple but useful step.

Step 2: Scheme

Now we will see how to connect hm10 to the ftdi. hm10 is working on 3.3 voltage, and its not recommended to put it on higher voltage. Here is the pin layout and how to connect them:

hm10 ftdi

rx——————————————-tx

tx——————————————-rx

cts——————————————cts

rts——————————————dtr/rts

For all parts who don’t have 3.3v power supply , we need voltage divider. It is connection of two resistors in series as seen on image: http://a.pololu-files.com/picture/0J1423.600.png?... If you have external power supply like this on link you have to connect common ground of ftdi and power supply. DO NOT FORGET THIS!

Ok, when you connect this you can proceed to next step.

Step 3: Updating Firmware

  1. First download your firmware from this web site;

-For cc2541 : https://github.com/suryasundarraj/hm-10-firmware

-For cc2540 :

2. Carefuly choose right model of chip, here we have cc2540 and cc2541. Take a look to the module and see which model of chip you have and download the firmware.

3. To enter in an update mode, you have to go on arduino IDE software and choose COM port (or serial on mac) , and open serial monitor.

4. In serial monitor set baud rate to “9600” and “no line ending”, and then write “AT+SBLUP” without quotes. The hm10 should respond with “OK+SBLUP”

5. When you are done with that, open a folder where you extracted firmware ,start program, choose com port of ftdi.

6. Choose "img" file and select .bin file in folder and finally click on Load image button

DO NOT INTERRUPT THE UPDATE PROCCES. IT CAN DAMAGE YOUR MODULE!

Step 4: Ibeacon Configuration

Now we have to write commands to configure module to ibeacon, as you see on picture i make program to do it for me.(when i test it i will upload here)

Open arduino ide, choose COM port (serial on mac) , open serial monitor and write thess commands:

1. AT+RENEW Restores factory defaults

2. AT+RESET Reboot HM-10

3. AT Wait for OK

4. AT+MARJ0x1234 Set iBeacon Major number to 0x1234 (hexadecimal)

5. AT+MINO0xFA01 Set iBeacon Minor number to 0xFA01 (hexadecimal)

6. AT+ADVI5 Set advertising interval to 5 (546.25 milliseconds)

7. AT+NAMEDOPEY Set HM-10 module name to DOPEY. Make this unique.

8. AT+ADTY3 Make non-connectable (save power)

9. AT+IBEA1 Enable iBeacon mode

10.AT+DELO2 iBeacon broadcast-only (save power)

11.AT+PWRM0 Enable auto-sleep. This reduces power from 8 to 0.18 mA

12.AT+RESET Reboot

You can change major , minor and name of the commands. You can find more commands on this link: http://www.jnhuamao.cn/iBeacon_en.zip The ibeacon is made now. Just disconnect wires from ftdi and put battery on vcc and gnd

Step 5: Wake Up Hm-10

When the HM-10 is in auto-sleep mode, it will quickly go to sleep when powered upor rebooted. After sending it the AT+PWRM0 command and restarting it, theHM-10 will no longer respond to AT commands. To wake up the device, send it along line of random alphabetic characters which is 80 characters or more. It willwake up and respond with OK+WAKE. If you want to work with the device for awhile, send it an AT+PWRM1 command so it does not sleep on you. You can thensend it an AT+PWRM0 when you are done to reduce power consumption. Have fun with your new iBeacon.

Step 6: Test IBeacon Scan

The following screenshots show three of the HM-10 based iBeacons scanned by an Android phone, and the distance to one of the devices.

Locate iBeacon for iOS:

- https://itunes.apple.com/us/app/locate-for-ibeaco...
iBeacon Scavenger Hunt:

- https://itunes.apple.com/us/app/beacon-scavenger-...

-https://play.google.com/store/apps/details?id=com...

iBeacon Scanner for Android:

- https://play.google.com/store/apps/details?id=kr....

<p>Hello Sir, I already followed your steps and it didnt work :( I am using BLE 4.0 HM10 v540 then I also download the app that you are using which is my android phone is also compatible for BLE 4.0 Scanning but still it didnt work :( I can't see my BLE Device to my Android Phone even I already try a different version of android which is 4.3 above android version.. Can you help me sir about this problem ? I really really really need your help sir please please please help me sir I'm begging sir .. I think u are the one person who can help me about this please please sir I really need this sir for my thesis sir huehue pls I'm a 4th yr IT Student from Philippines.. Please sir Help me about this. I am really hoping your response sir please please please sir Im begging please help me. Thankyou thankyou very much.</p>
<p>Hello Jhon i see you really need this , you dont need to begging for help. i'm here to help anyone who wants to make this so can we speak on fb or something like that ?</p>
Wow sir Really Thankyou very much for not ignoring my msg. thankyou.. If it is ok to you sir ? we can also use vcall in facebook. here's my account name : &quot; Jampong Mga Daliri &quot; and the link of my Fb account : &quot; https://www.facebook.com/jampongmga.daliri &quot;<br><br>Again sir, Thankyou Very Much as in Thankyou.
<p>Hi, my HM_10 went to sleep and I could not get it to wake up. I've tried typing the 80+ character string to the serial monitor and coding</p><p>&quot;Serial.write(&quot;sdisdisdsdsdsdsdsadsadsadsadasdsadsadsadsadsadsadgfhgjhghghgfhgtrytrytryerrewrwrewregjvbdsfewregfgfpdodoidodpdosjwjww&quot;);&quot;</p><p>for it to write to it. My HM_10 will not turn on. Am i doing this wrong? I can't send any AT commands. Thank you</p>
<p>Hi sorry for not answering for this time i think you must check first your circuit , expectly orientation of rx and tx , when you sending other commands is it respond like when you type &quot;AT&quot; ypu should get &quot;OK&quot;..</p>
<p>and can you send a code please </p>
<p>Hi, thanks for the tutorial!</p><p>How would you include a master module linked with Arduino that would measure when the HM-10 passes by within a certain range, then send some info (like &quot;HM-10 passed by&quot;) via an app to an Android phone?</p><p>Thanks!</p>
<p>Hello , if i understand question you asking about mobile app side or to read some value with hm10 + Arduino can you be more precisely , hope i can help .</p>
<p>Actually the accuracy is not as important, but I want to be able to measure if, say, the HM-10 got within 3 feet of a central module (arduino + BLE), then send a signal to my app via BLE.</p><p>Also, have you done anything with the RedBearLab BLE Nano? It has nRF51822 which I read should technically work for this sort of approximate distance detection.</p>
<p>Ok understand now hm-10 module have very accurate range reading up to some 'cm' , as we know that hm-10 cn work as broadcast or transmitt mode you must play with AT commands to make your 'master' module find ibeacons i dont tested that for now i dont have hm-10 with me so i can't test it but try finding something like hm-10 ibeacon finder.</p>
<p>I mean some 'm' not 'cm'</p>
<p>See this : https://forum.arduino.cc/index.php?topic=288624.0</p>
<p>Hello. Great tutorial, thank You!</p><p>While HM-10 is an ibeacon, can i still some information with iOS. For instance I would like to send reading from the sensor. Is it possible to do simultaneously with setting HM-10 as ibeacon?</p>
<p>I mean when Bluetooth and sensor are connected to Arduino</p>
<p>Hi nice to see someone interested in this project for a year ago , sorry for not fast responsive reply i forgot about this tutorial, ok for you question i don't tested it but i think it can be done with AT commands if you controlled module with Arduino you can easly make functions with at comands set so to more help you i must fully understand what you want you can write me to PM or something like that.</p>
<p>This is cool. Thanks for sharing!</p>
<p>thanks :D</p>

About This Instructable

25,510views

48favorites

License:

More by armins2:Make iBeacon with HM10/HM11 
Add instructable to: