The Physical Web is cool new approach to the Internet of Things from Google. The Physical Web uses Eddystone beacons to broadcast URLs that can then be accessed by anyone via Bluetooth 4.0-enabled devices. This allows anyone to walk up to any object in their environment and interact with it. For example, people can walk up to a movie poster with a beacon broadcasting the URL for the trailer. One major benefit is that hardware-specific solutions don’t need to be developed – everything is done through the web. Eddystone is an open format, so there a many beacon manufacturers to choose from. However, if you don’t want to blow that kind of cash just for exploring you can make your own Eddystone-URL beacon with a Raspberry Pi. Here we will be doing just that.
For this project you will need:
1. A Raspberry Pi (I’m using a B+) with Raspbian installed
2. A Bluetooth 4.0 USB Micro Adapter
3. A Bluetooth 4.0-enabled device to read the beacon URL (such as a smartphone or tablet)
We will be using a simple Node.js to make our beacon. Go ahead and install it now if you need to. We will also need some npm modules to get our server up and running and turning it into an Eddystone beacon:
First we will install Bleno since it is a dependency for node-eddystone-beacon. This module will allow use to interface with the Bluetooth Low Energy peripheral. It has its own set of dependencies, so we will go ahead and install those:
We will then install Bleno:
Finally, we will install node-eddystone-beacon:
We create our server and simply add a few lines that allow our beacon to serve a URL:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
You can then launch the server using the following command:
Your Eddystone-URL beacon is now up and running. You can see the URL using the Physical Web App for Android and iOS or by enabling the Physical Web option in Chrome via the chrome://flags settings. The option is available to add some routes to set beacon temperature and battery voltage without shutting down the beacon. You can visit the
node-eddystone github page for more info. You are now set to explore the Physical Web.