documentation/techpack.md
If you are reading this, you’ve received one of our tech packs with several bluetooth beacons (URIBeacons) and some Intel Edison boards. This page will help you get setup.
The reason for this project is to get people to try out the Physical Web, prototype something that represents a real scenario and give us feedback. We’ve already received quite a bit of feedback on our github but we’re now trying to encourage more active projects. Please beat on it and let us know: either go to the issues page of our github or just send an email to [email protected].
In order to use the beacons, you need to have the Physical Web app installed on your phone. It currently works on Android 4.4 and iOS 8 devices. Just go to their app stores, search for “Physical Web” and download the app.
The beacons can be set to any URL. When you pull down the notifications tray in Android or the TodayView in iOS, you’ll see a list of nearby beacons. Picking any one will open that URL in Chrome.
To change the URL you need to first go to the “Change URL” section of the app and then push the button on the beacon. This will allow you to type in a new URL. Beacons like this are clearly not secure, these are ‘testing beacons’ that are meant to be easily set for prototyping purposes.
This document describes how to set up the Intel Edison Mini Breakout Kit and install a Physical Web HelloWorld app. The HelloWorld app, aka helloEdison will broadcast a url over Bluetooth Low Energy and mDNS. Additionally, helloEdison will connect via WebSocket to a remote server at the broadcasted url. That remote server also serves up an html client to mobile devices that navigate to the given url. The html client also connects via WebSocket to the remote server. This allows for communication to travel from helloEdison to the remote server to the html Client. The idea is that when you press the tiny white button on the Intel Edison, the helloEdison sends a message to the remote server, which then sends a message to the html client, which then indicates that the button has been pressed.
Your assembly should now look like this:
SSH into your Edison (using PuTTY for Windows, or terminal “screen /dev/...” command for Mac and Linux). To setup login, password, and wifi connection, run (and follow the onscreen instructions):
configure_edison --setup
To add the above repositories to the configuration file, run (copy and paste the three lines at once into the terminal):
echo "src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf
To retrieve the new repositories, run:
opkg update
To install the latest bluetooth stack, run:
opkg install bluez5-dev
Download and extract helloEdisonPackage.zip from the following url (by clicking "View Raw"):
To stop the power button handler service, run:
systemctl stop pwr-button-handler.service
On your local machine open another terminal and cd into the helloEdisonPackage folder To copy the edited power button service file to the Edison /usr/bin folder, run:
scp pwr_button_handler [email protected]:/usr/bin
(replacing 10.0.1.42 with the current IP address of your Edison)
To start the power button handler service, run:
systemctl start pwr-button-handler.service
To copy the helloEdison folder to “/home/root/”, run:
scp -r helloEdison [email protected]:/home/root
(replacing 10.0.1.42 with the current IP address of your Edison)
Go back to the ssh terminal that is connected to the Edison
cd into the helloEdison folder
To install the node dependencies for helloEdison, run:
npm install
To make bluetooth ready for helloEdison (note: you’ll have to do this every time you reboot the Edison), run:
rfkill unblock bluetooth
killall bluetoothd
hciconfig hci0 up
cd into the helloEdison project folder and run:
node main.js
Now press the tiny white button on the Intel Edison. As you do so, on your mobile device watch the page you just navigated to Every time you press the tiny white button on the Intel Edison, the button on the page on your mobile device will indicate that the button has been pressed.