From part 3 of the NRF Getting started article we learned about Controlling LEDs & Reading Switch Inputs, in part 4 of the NRF series we will learn about Eddystone and how it transmits Eddystone packets.
Eddystone is another new method of broadcasting Bluetooth Low Energy(BLE) data from beacons, created by Google. Eddystone is a beacon protocol format that sets a standard for transmitting different types of beacon formats. If a BLE beacon transmits data in Eddystone format, the data can be universally read and recognized by all BLE receivers including mobile phones.
To read Eddystone beacons and its data, you can use any supporting BLE scanner app and a BLE compatible mobile. The recommended app to scan BLE Data is NRF Connect.
The Eddystone protocol describes different formats for advertising packets, called frame types. The following frame types are supported:
Eddystone-UID:- Eddystone-UID broadcasts unique 16-byte beacon IDs. The UID broadcasts an identifying code that allows apps to retrieve information from app servers.
- Eddystone-URL:- Eddystone-URL broadcasts a compressed URL.
Image source: https://community.estimote.com/hc/en-us/articles/206922207-What-is-Eddystone-and-how-can-I-use-it-with-my-beacons-
Eddystone-TLM:- Eddystone-TLM broadcasts telemetry information which usually is sensor data – temperature, humidity sensors, proximity sensors, accelerometers, etc.
Image source :https://www.mkompf.com/tech/eddystonetlm.html
- Eddystone-EID for broadcasting an encrypted ephemeral(Short-Term) identifier that changes periodically. Eddystone-EID is designed to give developers control over which clients can make use of their beacon signals.
The example provides five advertising slots, and the user can configure each slot to use any of these frame types. There must not be more than one slot of the Eddystone-TLM frame type, but all other frame types can be used in more than one slot. The slot configuration is done through the Eddystone Configuration Service.
In the nrf52 a sample Eddystone program can be found in the BLE peripherals directory.
Now we will explain the testing procedure for the Eddystone example program:
- Compile and program the application as explained in Part 1 of this series
- Observe that LED 1 on the board starts blinking and that the board starts broadcasting an Eddystone-URL. You can read the URL with any beacon scanner that is compatible with Eddystone. Use the NRF Connect app. The default URL that will be transmitted is http://nordicsemi.com/.
Note:- The Url, Tx Power, slots number all can be altered by the user. Once it’s been changed they have to be saved and then view it on the app.
- To configure the Eddystone frames on the beacon, press button 1 on the nrf52 DK, doing this will put the nrf in the connectable mode for a minute.
- observe that the LED 3 will be turned on indicating that the beacon is in connectable mode.
- Open the nRF Beacon for Eddystone app, then tap the connect button on the update tab. The list of connectable Eddystone beacons is displayed.
- Select your device. By default, it is advertised as “nRF5x_Eddystone”.
- Once the user clicks on the “nRF5x_Eddystone”, the app asks for a manufacturer lock code. By default, this code is FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (32 F characters).
- Observe that after entering the correct lock code, the application reads through all slots and displays the information for each slot. Also, observe that LED 2 is turned on.
- In the app, there is an option for disabling the automatic relocking capability:
- select Lock state and set it to Disable automatic relock.
- Disconnect from the device and repeat steps 3 to 6. Now Observe that you can unlock the beacon without entering a lock code.
Note: Test all the supported features of the beacon. For example, configure all slots, then perform a factory reset and ensure that the beacon has been reset to its default state.