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.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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:
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
- 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
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:
iBeacon Scavenger Hunt:
iBeacon Scanner for Android: