Introduction: DIY IBeacon and Beacon Scanner With Raspberry Pi and HM13

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

Step 1: DIY an IBeacon

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.

Step 2: Test It With an App

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.

Step 3: Turn Your Raspberry Pi Into a Bluetooth Gateway.

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!

Raspberry Pi Contest 2020

Participated in the
Raspberry Pi Contest 2020