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.
Revision:
12:ced5e837c511
Parent:
11:73ea4ef7f5a4
Child:
13:91c356fa928e
--- a/ZipBeaconConfigService.h	Fri Jul 17 21:06:30 2015 +0000
+++ b/ZipBeaconConfigService.h	Fri Jul 17 21:43:56 2015 +0000
@@ -330,6 +330,46 @@
         
         return index;
     }
+    
+    /*
+    *  Update the TLM frame battery voltage value
+    *  @param[in] voltagemv Voltage to update the TLM field battery voltage with (in mV)
+    *  @return nothing
+    */
+    void updateTlmBatteryVoltage(uint16_t voltagemv){
+        TlmBatteryVoltage = voltagemv;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame beacon temperature 
+    *  @param[in] temp Temperature of beacon (in 8.8fpn)
+    *  @return nothing
+    */
+    void updateTlmBeaconTemp(uint16_t temp){
+        TlmBeaconTemp = temp;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame PDU Count field
+    *  @param[in] pduCount Number of Advertisiting frames sent since powerup
+    *  @return nothing
+    */
+    void updateTlmPduCount(uint32_t pduCount){
+        TlmPduCount = pduCount;
+        return;        
+    }
+    
+    /*
+    *  Update the TLM frame Time since boot in 0.1s incriments
+    *  @param[in] timeSinceBoot Time since boot in 0.1s incriments
+    *  @return nothing
+    */
+    void updateTlmTimeSinceBoot(uint32_t timeSinceBoot){
+        TlmTimeSinceBoot = timeSinceBoot;
+        return;        
+    }
 
     /* Helper function to switch to the non-connectible normal mode for ZipBeacon. This gets called after a timeout. */
     void setupZipBeaconAdvertisements()
@@ -439,6 +479,7 @@
         params.beaconPeriod     = 1000;
         memcpy(params.uidNamespaceID, defaultUidNamespaceID, UID_NAMESPACEID_SIZE);
         memcpy(params.uidInstanceID,  defaultUidInstanceID,  UID_INSTANCEID_SIZE);
+        params.tlmVersion = 0;
         updateCharacteristicValues();
     }