Eddystone on Brainy Pi
by aaditya04gupta in Circuits > Raspberry Pi
186 Views, 1 Favorites, 0 Comments
Eddystone on Brainy Pi
we can use Eddystone messages to broadcast data such as a URL from your Bluetooth device Devices running a scanner that can understand the Eddystone protocol will be able to pick up the beacon. In the case of our tutorial, it will allow the user to open the URL that you are broadcasting. In addition to this, the beacon also shows distance data.
While Eddystone beacons were originally going to be utilized for Google’s “Physical Web” project and utilized by Android's “Nearby Notifications” they have since dropped support for Eddystone in both.
Supplies
Brainy Pi
ethernet / wifi
Updating System Software
It is very important to update the system software before installing any new packages
1. To update use the command
sudo apt update
2. To upgrade use the command
sudo apt upgrade
Setting Up Bluetooth
To switch on the Bluetooth use the command
sudo hciconfig hci0 up
1. Once the Brainy Pi’s Bluetooth is powered on we need to go ahead and switch on the Low Energy Advertising mode and set it to the Non connectable undirected advertising mode.
sudo hciconfig hci0 leadv 3
2. Now that we have put our Brainy Pi into the right mode, we need to advertise some data with it.
This time we will be utilizing the hcitool, this tool will allow us to send a command to our Bluetooth device to broadcast a specified URL.
sudo hcitool -i hci0 cmd 0x08 0x0008 19 02 01 06 03 03 aa fe 11 16 aa fe 10 00 03 70 69 6d 79 6c 69 66 65 75 70 07 00 00 00 00 00 00
Testing Eddystone
To test that the Brainy Pi’s Bluetooth is now broadcasting our Eddystone beacon we will need to make use of a device such as an Android phone or an iPhone.
1. Generate a command to broadcast URL of your choice as an Eddystone beacon by utilizing the script by going to Yencarnacion’s Eddystone Calculator and type your URL into the textbox and pressing ENTER.
2. On Android, install the Beacon Scanner app by Nicolas Bridoux. Using this app, you should be able to run a scan using Bluetooth on your device.