The Reinventorium Beacon

I found today that it’s possible to turn a Raspberry Pi 3 into a beacon that can be discovered, via Bluetooth LE, by mobile devices nearby.

I took the Pi I use as an OSMC media server here in the office, SSHed to the command line, and then:

sudo connmanctl enable bluetooth
sudo hciconfig hci0 up
sudo hciconfig hci0 leadv 3
sudo hcitool -i hci0 cmd 0x08 0x0008 1f 02 01 06 03 03 aa fe 17 16 aa fe 10 00 02 72 65 69 6e 76 65 6e 74 6f 72 69 75 6d 07 3f 62 6e

The final line is an encoded representation of “show the URL for the Reinventorium” that I calculated with this handy tool.

With this in place, the Google Nearby tool automatically discovers the new beacon, and provides me with a link to the URL:

Screen shot of my Android phone detecting my new beacon.

The only snag I ran into is that the Reinventorium page that I created for the link originally had bad metadata, which I needed to update on the site. There didn’t appear to be a way other than by making slight adjustments to the target URL in the beacon, to cause the Google Nearby app to refresh this metadata.

Thank you to my friend Jonas for originally turning me on to this emerging technology.