DIY IBeacon and Beacon Scanner With Raspberry Pi and HM13

by memoryleakyu in Circuits > Raspberry Pi

1103 Views, 6 Favorites, 0 Comments

DIY IBeacon and Beacon Scanner With Raspberry Pi and HM13

119.gif

Story

A beacon will continuous broadcast signals to let other bluetooth devices know the presence of it. And I've always wanted to have a bluetooth beacon to track my keys since I've already forgot to bring them like 10 times last year. And I happendly got a HM13 dual module. So I think I could turn it into a simple iBeacon to let me know if I forgot to bring my keys. But when I finished it, I realized I wouldn't keep checking my phones. Thus, I decided to make a continuos beacon scanner with Raspberry Pi as a bluetooth gateway. So I can trigger it to email me or text me to remind me of my keys.

Supplies

DIY an IBeacon

Screen Shot 2020-02-27 at 12.41.47.png
IMG_4142.JPG

I programmed the HM13 module with an arduino compatible board. I think it can be done with other kinds of dev boards even raspberry pi. But as there are plenty of libraries with Arduino, why bother? Connect the HM13 module to the right Tx and Rx pin. Then upload the sketch. But remember to set UUID, macro and minor value in Arduino code. When it's done, you just need to power the HM13 module to keep it working.

Test It With an App

IMG_71F94573E5D6-1.jpeg
IMG_EDB9D1FD45C4-1.jpeg

Then add your beacon in the app. The UUID, macro and minor value was specified in Arduino code. After that you'll see your beacon on the front page of the app.

Take your phone and walk around. You'll see the rough distance between you and your beacon.

Turn Your Raspberry Pi Into a Bluetooth Gateway.

111.gif

Thanks for GitHub user singaCapital. Clone the repository and follow the instructions to make it work on your Raspberry Pi. Then you'll see this.

Now you have your own iBeacon and beacon scanner. You can even attach the beacon to your cat to let you know in advance that she's going to step on your keyboard. You can also calculate the distance by utilize the RSSI value which stands for the strenghth of the bluetooth signal.


Enjoy your beacon and track everything you want!