Can I read iBeacon data using Arduino?

vik-y picture vik-y · Jul 8, 2015 · Viewed 6.9k times · Source

I am using an HM-10 module and Arduino UNO.

My requirement is to read data from ibeacons near me using Arduino. Is it possible? I have not been able to find any articles on this. All articles talk about connecting your android phone with arduino. Any idea?

Answer

Zimbu picture Zimbu · Jul 31, 2016

Yes, it is possible. I'm using an HM-10 as an iBeacon detector (linksprite.com BLE 4.0 shield), and it is successfully detecting a RadBeacon running in iBeacon mode. Firmware on my HM-10 is version 540.

Before it would detect the RadBeacon, I had to send the HM-10 the following commands:

AT+ROLE1
AT+IMME1
AT+RESET

Then I used the AT-DISI? command, and the serial monitor is showing the broadcast received from the RadBeacon (and one other beacon) as follows (for example):

OK+DISISOK+DISC:4C000215:2G234454CF6D5A0FADF2F4911BA9FFA7:00000001AC:0CF3EE041CCE:-052OK+DISC:00000000:00000000000000000000000000000000:0000000000:B9782E08068C:-071OK+DISCE

In this example, the HM-10 is detecting my RadBeacon which has UUID of 2G234454...with signal strength of -052. It is also detecting another BLE beacon (my AppleTV downstairs) with UUID of B9782E08068C with signal strength of -071.

I'm definitely not very knowledgable about any of this stuff, but it seems to be working for me so far. Next challenge for me will be to figure out how to parse the text data being received. I'm mostly interested in the distance/signal strength data in order to trigger an action when the RadBeacon gets very close to the HM-10.

[Full disclosure: I jumbled some of the UUID numbers above since I'm not sure if any of this information is private or hackable or whatever]

[By the way, the nRF8001 BLE Shield will not do this since it only runs in peripheral mode.]