Example program for the Eddystone Beacon service.

Dependencies:   BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1

Fork of BLE_EddystoneBeacon by URIBeacon

This example demonstrates how to set up and initialize a Eddystone Beacon. For more details on the Eddystone specification please see the Eddystone Github Page.

The Basics

An Eddystone Beacon is a Bluetooth Low Energy beacon, that means it does all of its data transfer in GAP advertising packets. Eddystone beacons, unlike other beacons, broadcast multiple types of data. Currently Eddystone beacons have 3 frame types (UID, URL, TLM) that will get swapped out periodically. This swapping of frame data allows Eddystone beacons to send many different types of data, thus increasing their usefulness over traditional beacons. Note that the UID frame type provides the same 16Bytes of UUID namespace that iBeacons do and the URL frame type provides the same functionality as a URIBeacon.

For more details see the Eddystone Specification.

Smartphone Apps

nRF Master Control Panel - this program recognizes Eddystone beacons and will display the data for all frame types.

iPhone Physical Web app

Android App

Walkthrough of Physical Web application

Technical Details

The Eddystone Specification looks like the following image. Please note that this may change over time and for up to date information the official spec should be referenced. /media/uploads/mbedAustin/scratch-1-.png

The Eddystone Frames get swapped in and out depending on what frames you have enabled. The only required frame type is the TLM frame, all others are optional and you can have any number enabled. To disable the UID or URL frames give their values a 'NULL' in the Eddystone constructor. The Eddystone spec recommends broadcasting 10 frames a second.

Note

  • The current Eddystone mbed example does not allow for combining the eddystone service with other services, this will be changes in a future update.
  • There is an Eddystone Config service that allows for updating beacons in the field. We are working on an example for this, so keep your eyes pealed for a future update.
Committer:
mbedAustin
Date:
Thu Jul 23 06:48:50 2015 +0000
Revision:
21:f4646308f363
Parent:
2:8020d6d4455a
Child:
23:05e9bb3b13af
[[Fix]] made RFU field in UID frame BigEndian Compliant (again, facepalm)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 2:8020d6d4455a 1 /* mbed Microcontroller Library
rgrover1 2:8020d6d4455a 2 * Copyright (c) 2006-2015 ARM Limited
rgrover1 2:8020d6d4455a 3 *
rgrover1 2:8020d6d4455a 4 * Licensed under the Apache License, Version 2.0 (the "License");
rgrover1 2:8020d6d4455a 5 * you may not use this file except in compliance with the License.
rgrover1 2:8020d6d4455a 6 * You may obtain a copy of the License at
rgrover1 2:8020d6d4455a 7 *
rgrover1 2:8020d6d4455a 8 * http://www.apache.org/licenses/LICENSE-2.0
rgrover1 2:8020d6d4455a 9 *
rgrover1 2:8020d6d4455a 10 * Unless required by applicable law or agreed to in writing, software
rgrover1 2:8020d6d4455a 11 * distributed under the License is distributed on an "AS IS" BASIS,
rgrover1 2:8020d6d4455a 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rgrover1 2:8020d6d4455a 13 * See the License for the specific language governing permissions and
rgrover1 2:8020d6d4455a 14 * limitations under the License.
rgrover1 2:8020d6d4455a 15 */
rgrover1 2:8020d6d4455a 16
rgrover1 2:8020d6d4455a 17 #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__
rgrover1 2:8020d6d4455a 18 #define __BLE_CONFIG_PARAMS_PERSISTENCE_H__
rgrover1 2:8020d6d4455a 19
rgrover1 2:8020d6d4455a 20 #include "ZipBeaconConfigService.h"
rgrover1 2:8020d6d4455a 21
rgrover1 2:8020d6d4455a 22 /**
rgrover1 2:8020d6d4455a 23 * Generic API to load the URIBeacon configuration parameters from persistent
rgrover1 2:8020d6d4455a 24 * storage. If persistent storage isn't available, the persistenceSignature
rgrover1 2:8020d6d4455a 25 * member of params may be left un-initialized to the MAGIC, and this will cause
rgrover1 2:8020d6d4455a 26 * a reset to default values.
rgrover1 2:8020d6d4455a 27 *
rgrover1 2:8020d6d4455a 28 * @param[out] paramsP
rgrover1 2:8020d6d4455a 29 * The parameters to be filled in from persistence storage. This
rgrover1 2:8020d6d4455a 30 argument can be NULL if the caller is only interested in
rgrover1 2:8020d6d4455a 31 discovering the persistence status of params.
rgrover1 2:8020d6d4455a 32
rgrover1 2:8020d6d4455a 33 * @return true if params were loaded from persistent storage and have usefully
rgrover1 2:8020d6d4455a 34 * initialized fields.
rgrover1 2:8020d6d4455a 35 */
rgrover1 2:8020d6d4455a 36 bool loadURIBeaconConfigParams(ZipBeaconConfigService::Params_t *paramsP);
rgrover1 2:8020d6d4455a 37
rgrover1 2:8020d6d4455a 38 /**
rgrover1 2:8020d6d4455a 39 * Generic API to store the URIBeacon configuration parameters to persistent
rgrover1 2:8020d6d4455a 40 * storage. It typically initializes the persistenceSignature member of the
rgrover1 2:8020d6d4455a 41 * params to the MAGIC value to indicate persistence.
rgrover1 2:8020d6d4455a 42 *
rgrover1 2:8020d6d4455a 43 * @note: the save operation may be asynchronous. It may be a short while before
rgrover1 2:8020d6d4455a 44 * the request takes affect. Reading back saved configParams may not yield
rgrover1 2:8020d6d4455a 45 * correct behaviour if attempted soon after a store.
rgrover1 2:8020d6d4455a 46 *
rgrover1 2:8020d6d4455a 47 * @param[in/out] paramsP
rgrover1 2:8020d6d4455a 48 * The params to be saved; persistenceSignature member gets
rgrover1 2:8020d6d4455a 49 * updated if persistence is successful.
rgrover1 2:8020d6d4455a 50 */
rgrover1 2:8020d6d4455a 51 void saveURIBeaconConfigParams(const ZipBeaconConfigService::Params_t *paramsP);
rgrover1 2:8020d6d4455a 52
rgrover1 2:8020d6d4455a 53 #endif /* #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__*/