Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
readme.md@0:1c7da5f83647, 2016-11-29 (annotated)
- Committer:
 - sarahmarshy
 - Date:
 - Tue Nov 29 06:29:10 2016 +0000
 - Revision:
 - 0:1c7da5f83647
 
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| sarahmarshy | 0:1c7da5f83647 | 1 | Eddystone beacons broadcast a small amount of information, like URLs, to nearby BLE devices. | 
| sarahmarshy | 0:1c7da5f83647 | 2 | |
| sarahmarshy | 0:1c7da5f83647 | 3 | The Eddystone Beacon sample application runs in two stages: | 
| sarahmarshy | 0:1c7da5f83647 | 4 | |
| sarahmarshy | 0:1c7da5f83647 | 5 | 1. On startup, the Configuration Service (which allows [modification of the beacon](https://github.com/google/eddystone/blob/master/eddystone-url/docs/config-service-spec.md)) runs for a user-defined period (default - 30 seconds). | 
| sarahmarshy | 0:1c7da5f83647 | 6 | |
| sarahmarshy | 0:1c7da5f83647 | 7 | 1. When the Configuration Service period ends, the Eddystone Service broadcasts advertisement packets. | 
| sarahmarshy | 0:1c7da5f83647 | 8 | |
| sarahmarshy | 0:1c7da5f83647 | 9 | |
| sarahmarshy | 0:1c7da5f83647 | 10 | |
| sarahmarshy | 0:1c7da5f83647 | 11 | # Running the application | 
| sarahmarshy | 0:1c7da5f83647 | 12 | |
| sarahmarshy | 0:1c7da5f83647 | 13 | ## Requirements | 
| sarahmarshy | 0:1c7da5f83647 | 14 | |
| sarahmarshy | 0:1c7da5f83647 | 15 | You should install the *Physical Web* application on your phone: | 
| sarahmarshy | 0:1c7da5f83647 | 16 | |
| sarahmarshy | 0:1c7da5f83647 | 17 | - [Android version](https://play.google.com/store/apps/details?id=physical_web.org.physicalweb) | 
| sarahmarshy | 0:1c7da5f83647 | 18 | |
| sarahmarshy | 0:1c7da5f83647 | 19 | - [iOS version](https://itunes.apple.com/us/app/physical-web/id927653608?mt=8) | 
| sarahmarshy | 0:1c7da5f83647 | 20 | |
| sarahmarshy | 0:1c7da5f83647 | 21 | |
| sarahmarshy | 0:1c7da5f83647 | 22 | **Note:** It is also possible to use a regular scanner to interract with your Eddystone beacon but it requires | 
| sarahmarshy | 0:1c7da5f83647 | 23 | knowledge about BLE and Eddystone beacon specification out of the scope of this document. | 
| sarahmarshy | 0:1c7da5f83647 | 24 | |
| sarahmarshy | 0:1c7da5f83647 | 25 | |
| sarahmarshy | 0:1c7da5f83647 | 26 | Hardware requirements are in the [main readme](https://github.com/ARMmbed/ble-examples/blob/master/README.md). | 
| sarahmarshy | 0:1c7da5f83647 | 27 | |
| sarahmarshy | 0:1c7da5f83647 | 28 | ## Building instructions | 
| sarahmarshy | 0:1c7da5f83647 | 29 | |
| sarahmarshy | 0:1c7da5f83647 | 30 | Building instructions for all samples are in the [main readme](https://github.com/ARMmbed/ble-examples/blob/master/README.md). | 
| sarahmarshy | 0:1c7da5f83647 | 31 | |
| sarahmarshy | 0:1c7da5f83647 | 32 | ### Working with nRF51-based 16K targets | 
| sarahmarshy | 0:1c7da5f83647 | 33 | |
| sarahmarshy | 0:1c7da5f83647 | 34 | Because of memory constraints, you can't use the SoftDevice 130 (S130) to build for nRF51-based 16K targets. If you are using these targets, then before building: | 
| sarahmarshy | 0:1c7da5f83647 | 35 | |
| sarahmarshy | 0:1c7da5f83647 | 36 | 1. Open the ``config.json`` file in this sample. | 
| sarahmarshy | 0:1c7da5f83647 | 37 | 1. Change ``soft device`` to ``S110``. | 
| sarahmarshy | 0:1c7da5f83647 | 38 | 1. Save. | 
| sarahmarshy | 0:1c7da5f83647 | 39 | |
| sarahmarshy | 0:1c7da5f83647 | 40 | You can now build for nRF51-based 16K targets. | 
| sarahmarshy | 0:1c7da5f83647 | 41 | |
| sarahmarshy | 0:1c7da5f83647 | 42 | ## Setting up the beacon | 
| sarahmarshy | 0:1c7da5f83647 | 43 | |
| sarahmarshy | 0:1c7da5f83647 | 44 | By default, the beacon directs to the url ``http://mbed.org``. You can change this to your own URL in two ways: | 
| sarahmarshy | 0:1c7da5f83647 | 45 | |
| sarahmarshy | 0:1c7da5f83647 | 46 | 1. Manually edit the code in ``main.cpp`` in your copy of the sample. | 
| sarahmarshy | 0:1c7da5f83647 | 47 | |
| sarahmarshy | 0:1c7da5f83647 | 48 | 1. Build and run the application's default code as explained in the building instructions. When the beacon starts up, the Configuration Service runs for 30 seconds (this is the default value; you can change it in ``main.cpp``). While the Configuration Service runs, you can use a BLE scanner on your phone to edit the values the service presents. | 
| sarahmarshy | 0:1c7da5f83647 | 49 | |
| sarahmarshy | 0:1c7da5f83647 | 50 | ## Checking for success | 
| sarahmarshy | 0:1c7da5f83647 | 51 | |
| sarahmarshy | 0:1c7da5f83647 | 52 | 1. Build the application and install it on your board as explained in the building instructions. | 
| sarahmarshy | 0:1c7da5f83647 | 53 | |
| sarahmarshy | 0:1c7da5f83647 | 54 | 1. Open the *Physical Web* application on your phone. It will start to search for nearby beacons. | 
| sarahmarshy | 0:1c7da5f83647 | 55 | |
| sarahmarshy | 0:1c7da5f83647 | 56 |  | 
| sarahmarshy | 0:1c7da5f83647 | 57 | |
| sarahmarshy | 0:1c7da5f83647 | 58 | **figure 1** Start of the *Physical Web* application version 0.1.856 on Android | 
| sarahmarshy | 0:1c7da5f83647 | 59 | |
| sarahmarshy | 0:1c7da5f83647 | 60 | 1. When the beacon starts up, the Configuration Service runs for 30 seconds. | 
| sarahmarshy | 0:1c7da5f83647 | 61 | During this time it is possible to change the URL advertised by the beacon. | 
| sarahmarshy | 0:1c7da5f83647 | 62 | It is also important to note that during these 30 seconds, your device will not advertise any URL. | 
| sarahmarshy | 0:1c7da5f83647 | 63 | |
| sarahmarshy | 0:1c7da5f83647 | 64 |  | 
| sarahmarshy | 0:1c7da5f83647 | 65 | |
| sarahmarshy | 0:1c7da5f83647 | 66 | **figure 2** How to open the beacon configuration view using the *Physical Web* application version 0.1.856 on Android | 
| sarahmarshy | 0:1c7da5f83647 | 67 | |
| sarahmarshy | 0:1c7da5f83647 | 68 | |
| sarahmarshy | 0:1c7da5f83647 | 69 | 1. Edit the URL advertised by your beacon. | 
| sarahmarshy | 0:1c7da5f83647 | 70 | |
| sarahmarshy | 0:1c7da5f83647 | 71 |  | 
| sarahmarshy | 0:1c7da5f83647 | 72 | |
| sarahmarshy | 0:1c7da5f83647 | 73 | **figure 3** How to edit the URL advertised by your beacon using the *Physical Web* application version 0.1.856 on Android | 
| sarahmarshy | 0:1c7da5f83647 | 74 | |
| sarahmarshy | 0:1c7da5f83647 | 75 | |
| sarahmarshy | 0:1c7da5f83647 | 76 | 1. Save the URL which will be advertised by your beacon. | 
| sarahmarshy | 0:1c7da5f83647 | 77 | |
| sarahmarshy | 0:1c7da5f83647 | 78 |  | 
| sarahmarshy | 0:1c7da5f83647 | 79 | |
| sarahmarshy | 0:1c7da5f83647 | 80 | **figure 4** How to save your beacon configuration and start advertising URL using the *Physical Web* application version 0.1.856 on Android. | 
| sarahmarshy | 0:1c7da5f83647 | 81 | |
| sarahmarshy | 0:1c7da5f83647 | 82 | |
| sarahmarshy | 0:1c7da5f83647 | 83 | 1. Find your device; it should advertise the URL you have set. | 
| sarahmarshy | 0:1c7da5f83647 | 84 | |
| sarahmarshy | 0:1c7da5f83647 | 85 |  | 
| sarahmarshy | 0:1c7da5f83647 | 86 | |
| sarahmarshy | 0:1c7da5f83647 | 87 | **figure 5** Display of URL advertised by your beacon using the *Physical Web* application version 0.1.856 on Android. | 
| sarahmarshy | 0:1c7da5f83647 | 88 | |
| sarahmarshy | 0:1c7da5f83647 | 89 | |
| sarahmarshy | 0:1c7da5f83647 | 90 | **Note:** You can use the [Eddystone Observer](https://github.com/ARMmbed/ble-examples/tree/master/BLE_EddystoneObserver) sample instead of a phone application. |