Turn Your RPi 3 Into A BLE Beacon

The Raspberry Pi 3 does Eddystone!

With the launch of the Raspberry Pi 3, Bluetooth Low Energy (BLE) is now at our disposal. With BLE, there are a few technologies for implementing one-way beacons that broadcast data. Apple has been pushing iBeacon since 2013, and Google just launched their Eddystone solution last year.

If you’re looking to target Google’s Eddystone on your RPi 3, [Yamir] has you covered. He’s put together a guide on setting up an Eddystone-URL beacon within Raspbian. This type of beacon just broadcasts a URL. Users within range will get a notification that the URL is available, and can navigate through to it. Eddystone-URL works on both iOS and Android.

The process for setting this up is pretty simple. The hciconfig and hcitool commands do all the work. [Yamir] was even nice enough to make a calculator tool that generates the hcitool command for your own URL. While is hack is a simple one, it’s a nice five-minute project. It’s also handy for broadcasting the URL of your Raspberry Pi if it’s running a web server as part of a more intricate hack.

21 thoughts on “Turn Your RPi 3 Into A BLE Beacon

  1. “if it’s running a web server as part of a more intricate hack.”

    Well as it turns out you may just be able to fit a mirror of the entire English Wikipedia (no images just text) onto a 128GB SD card along with Raspbian plus the Wikimedia server requirements. So that could be a handy thing to do for remote communities. Add solar power and you have this little self powered knowledge resource that is free for anyone use if they have a device with WiFi. Obviously if you can fit the EN version, any of the other language editions will take up even less space.

    I’m building a VM like this at the moment, to check the final size, but under 128 GB does look possible, otherwise the 256 GB ones will do the job. You really want to do it on a powerful system though as it takes a very long time to convert the XML dump to SQL and load it all into MySQL, then once you have the database files you could move these across to the target image that you plan to boot the RPi off.

    If anyone is genuinely interested let me know and I’ll give you more details, just be aware it isn’t the sort of thing a noob will be comfortable with and having experience with L.A.M.P. stacks is a good idea too.

    1. This is precisely what the Kiwix project has done. Wikipedia downloads for offline viewing. There is also the Rachel Pi project, which does the same thing but also includes some Khan Academy videos and books from Project Gutenberg. If you weren’t aware of these projects maybe there’s something you can use.

      1. I’ve just grabbed and cracked open the rachelpi_64EN_3.7. distro, it is great for what it is, aimed and schools in Africa. But not at all a live wikipedia mirror.

    2. I think my previous comment was eaten.

      Have you looked at Kiwix, which does precisely this (offline Wikipedia, no internet required)? Or Rachel-Pi, same idea but adds Khan Academy videos and some Project Gutenberg books?

      1. Yes I looked at Kiwix, that is why I decided to hack together my own mirror of the latest, complete and uncensored Wikipedia, that works using stock Debian packages and has no problematic dependencies such as XULRunner.

        Also I already have this, https://www.gutenberg.org/wiki/Gutenberg:The_CD_and_DVD_Project which just works without much effort. The videos would be nice but that would totally blow the storage budget, so better for a true server install rather than the sort of tiny device that can be water proof and solar powered, sitting on a rooftop etc.

        Anything bigger than that and a PC with big SSDs running a full suit of Linux services is probably better, then you can even provide a mini local area email, VOIP and chat network etc. basically every service you can imagine, rather than just a tiny cheap library for mostly static data.

        You can build your own video archive with https://rg3.github.io/youtube-dl/

  2. This doesn’t sound too good:

    “While Eddystone, the beacon format is open source. However, Google’s recommended method of receiving these frame formats is not. Google Play Services, the Nearby API, and the Proximity Beacon cloud service are all proprietary. It seems that Google is again following the Android/Google Play Services model, where the platform is open source, but for the best experience you also need some proprietary bits from Google.”

    http://arstechnica.com/gadgets/2015/07/meet-googles-eddystone-a-flexible-open-source-ibeacon-fighter/2/

    And of-course Google will spy on everything being broadcast via Eddystone :-( Sounds like the app thing in the phone needs to be hacked or duplicated?

    1. Good point.
      But I don’t know what you would use this beacon stuff for anyway except annoying advertisement.

      And maybe this will work as a compensation: Google has made the Nik software collection free (photo filters).
      Those filters used to sell for hundreds of dollars.
      And if you bought them in 2016 google is also reimbursing you I read.
      But now the question is: does this free package spy on you?
      Anyway, here’s the link https://www.google.com/nikcollection/

      1. Yeah those outrageously over-priced Nik filters may now be free, but it looks like they only plug into the outrageously over-priced Adobe Photoshop software. I’m not sure how you would make a photo effect filter spy on you, but if anyone can do it, it’s Google.

  3. Well is it me or that technology is pretty useless in real word.
    1. Beacon is useless without your beacon dedicated app.
    2. I don’t know anybody who knows someone who keeps their bluetooth enabled constantly. :S

    In ideal world, let’s imagine use case “doctors office”. The patients walks in. Beacon broadcasts the web url where patient can quickly do a online check-in,fill a intake form and get further directions.

    In real work patient has to have clinics mobile app that he really uses once a year max and will not bother installing. And even if he has the app the bluetooth of his phone is disabled.

    I really like the basic idea but in real world it’s pretty useless.

    1. You really can’t think of why someone would leave their Bluetooth on constantly? Perhaps they have a Bluetooth enabled car and don’t want to have to turn it on every time they get in their car to play music or talk on the phone. Perhaps they have a Bluetooth headset, or a set of Bluetooth speakers in their home. I remember an old Linux daemon that would unlock your computer when a paired Bluetooth device was in range.

      I know for at least my phone, leaving Bluetooth on but unconnected to anything results in very little battery usage, and it doesn’t even poll for devices or broadcast it’s own existence unless I go into the menus and tell it to. Of course that kind of setup supports your point that no one is going to catch these beacons.

    2. I never used to keep my bluetooth on, actively scheduled tasker to disable it once it had disconnected from a device and had been idle for 3 minutes. Now i have a 6p i just leave it on all the time, battery drain is negligible.

    3. There are now a great many gadgets that need to connect through BT. So I think the time that nobody kept BT on for long are diminishing as we speak.
      Plus they kept tweaking BT to use less and less energy with each new version, so for that reason too it’s not the issue it used to be.

Leave a Reply to AndrewCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.