Eddystone beacons broadcast a small amount of information, like URLs, to nearby BLE devices. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-ble/tree/master/BLE_EddystoneService

Eddystone beacons broadcast a small amount of information, like URLs, to nearby BLE devices.

The Eddystone Beacon sample application runs in two stages:

  • On startup, the Configuration Service (which allows modification of the beacon runs for a user-defined period (default - 30 seconds).
  • When the Configuration Service period ends, the Eddystone Service broadcasts advertisement packets.

Running the application

Requirements

You should install the *Physical Web* application on your phone:

- Android version

- iOS version

Note: It is also possible to use a regular scanner to interract with your Eddystone beacon but it requires knowledge about BLE and Eddystone beacon specification out of the scope of this document.

Hardware requirements are in the main readme.

Building instructions

Building with mbed CLI

If you'd like to use mbed CLI to build this, then you should refer to the main readme. The instructions here relate to using the developer.mbed.org Online Compiler

In order to build this example in the mbed Online Compiler, first import the example using the ‘Import’ button on the right hand side.

Next, select a platform to build for. This must either be a platform that supports BLE, for example the NRF51-DK, or one of the following:

List of platforms supporting Bluetooth Low Energy

Or you must also add a piece of hardware and the supporting library that includes a Bluetooth Low Energy driver for that hardware, for example the K64F or NUCLEO_F401RE with the X-NUCLEO-IDB05A1

List of components supporting Bluetooth Low Energy.

Once you have selected your platform, compile the example and drag and drop the resulting binary onto your board.

For general instructions on using the mbed Online Compiler, please see the mbed Handbook

Working with nRF51-based 16K targets

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:

  1. Open the ``config.json`` file in this sample.
  2. Change ``soft device`` to ``S110``.
  3. Save.

You can now build for nRF51-based 16K targets.

Setting up the beacon

By default, the beacon directs to the url ``http://mbed.org``. You can change this to your own URL in two ways:

  • Manually edit the code in ``main.cpp`` in your copy of the sample.
  • 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.

Checking for success

  • Build the application and install it on your board as explained in the building instructions.
  • Open the *Physical Web* application on your phone. It will start to search for nearby beacons.

https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/raw-file/4c8f8bf32a99/img/app_start.png

figure 1 Start of the *Physical Web* application version 0.1.856 on Android

  • When the beacon starts up, the Configuration Service runs for 30 seconds. During this time it is possible to change the URL advertised by the beacon. It is also important to note that during these 30 seconds, your device will not advertise any URL.

https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/raw-file/4c8f8bf32a99/img/open_configuration.png

figure 2 How to open the beacon configuration view using the *Physical Web* application version 0.1.856 on Android

  • Edit the URL advertised by your beacon.

https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/raw-file/4c8f8bf32a99/img/edit_url.png

figure 3 How to edit the URL advertised by your beacon using the *Physical Web* application version 0.1.856 on Android

  • Save the URL which will be advertised by your beacon.

https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/raw-file/4c8f8bf32a99/img/save_url.png

figure 4 How to save your beacon configuration and start advertising URL using the *Physical Web* application version 0.1.856 on Android.

  • Find your device; it should advertise the URL you have set.

https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-EddystoneService/raw-file/4c8f8bf32a99/img/result.png

figure 5 Display of URL advertised by your beacon using the *Physical Web* application version 0.1.856 on Android.

Note: You can use the Eddystone Observer sample instead of a phone application.

Changes

RevisionDateWhoCommit message
43:00b5f99e0a15 2017-09-08 mbed_official Merge pull request #102 from adbridge/master default tip
42:19893a617ae4 2017-08-08 mbed_official Merge pull request #100 from 0xc0170/master
41:f5b2814dd469 2017-07-28 mbed_official Merge pull request #99 from bcostm/add_disco_l475vg
40:66bedfcb305f 2017-07-19 mbed_official Merge pull request #97 from 0xc0170/master
39:a78809ad9f28 2017-07-19 mbed_official Merge pull request #98 from apalmieriGH/master
38:b4ada22f8dca 2017-07-11 mbed_official Merge pull request #93 from adbridge/master
37:9c45ed74ad22 2017-06-22 mbed_official Merge pull request #89 from adbridge/master
36:f2571cce3183 2017-06-22 mbed_official Merge pull request #90 from apalmieriGH/master
35:8cc41d072f31 2017-06-20 mbed_official Merge pull request #88 from adbridge/master
34:1fe7a0e7c120 2017-06-15 mbed_official Merge pull request #83 from apalmieriGH/master
33:4557940cbb07 2017-06-08 mbed_official Merge pull request #82 from adbridge/master
32:015d5980d7ea 2017-05-25 mbed_official Merge pull request #81 from adbridge/master
31:f95fc2ac1dbc 2017-05-19 mbed_official Merge pull request #80 from janjongboom/patch-2
30:c68d86d0e91a 2017-05-10 mbed_official Merge pull request #79 from adbridge/master
29:2dfc5cc8569b 2017-05-10 mbed_official Merge pull request #78 from ashok-rao/master
28:a00d968c5b5f 2017-05-09 mbed_official Merge pull request #77 from 0xc0170/master
27:23ab2eefeb53 2017-04-05 mbed_official Merge pull request #70 from 0xc0170/master
26:7948fe45f35c 2017-04-05 mbed_official Merge pull request #72 from pan-/update_bluenrg_ref
25:acfdfef14fc0 2017-04-05 mbed_official Merge pull request #71 from pan-/fix_bluenrg_reference
24:d0657bcf86b9 2017-03-14 mbed_official Merge pull request #68 from adbridge/master
23:cb118b5f052b 2017-03-13 mbed_official Merge pull request #67 from ARMmbed/fix#61
22:319f1d737bbc 2017-03-09 mbed_official Merge pull request #66 from ARMmbed/oob_test_mbed-os-5.4
21:68725e8d1924 2017-03-01 mbed_official Merge pull request #55 from adbridge/master
20:63a04774db31 2017-02-27 mbed_official Merge pull request #54 from apalmieriGH/master
19:b50e8e322750 2017-02-15 mbed_official Merge pull request #52 from 0xc0170/master
18:e3fecd06558c 2017-02-02 mbed_official Merge pull request #48 from adbridge/master
17:d95eb5431e0a 2017-01-26 mbed_official Merge pull request #46 from adbridge/master
16:3e7cb2d93135 2016-12-15 mbed_official Update mbed-os revision to mbed-os 5.3.0.
15:127154104533 2016-12-15 mbed_official Merge pull request #42 from ARMmbed/mbed-os-5.3.0-rc3
14:3658f28dd26c 2016-10-28 mbed_official Updating mbed-os to mbed-os-5.2.1
13:913253317d32 2016-10-24 mbed_official Updating mbed-os to mbed-os-5.2.0
12:b31d7c0f906c 2016-10-24 mbed_official Merge pull request #32 from ARMmbed/oob
11:2a0c01fa536c 2016-10-05 mbed_official Updating mbed-os to mbed-os-5.1.5
10:f1b3e11474f0 2016-09-16 mbed_official Updating mbed-os to mbed-os-5.1.4
9:6363875d082b 2016-08-20 mbed_official Updating mbed-os to mbed-os-5.1.2
8:9bc904f09115 2016-08-19 mbed_official Updating mbed-os to mbed-os-5.1.1
7:4a7ae9ae5b88 2016-08-05 mbed_official Updating mbed-os to mbed-os-5.1.0
6:b64a15d1341b 2016-08-04 mbed_official Update reference to the ST shield library.
5:6634a45153b1 2016-08-03 mbed_official Updating mbed-os to mbed-os-5.1.0-rc5
4:a3aef74df65b 2016-07-30 mbed_official Updating mbed-os to mbed-os-5.1.0-rc4
3:5120491ba317 2016-07-29 mbed_official Merge branch 'master' of https://github.com/ARMmbed/mbed-os-example-ble
2:9ee673e0b86a 2016-07-28 Vincent Coubard Sync with mbed-os-5.1.0-rc3
1:9db4d46bb63f 2016-07-28 mbed_official Merge branch 'master' of https://github.com/ARMmbed/mbed-os-example-ble
0:4c8f8bf32a99 2016-07-26 Vincent Coubard Update example at tag mbed-os-5.0.1-rc1