Beacons are BLE (Bluetooth Low Energy) devices that send out advertisement packets that can be received by any Bluetooth device nearby. They can be used for triggering offers in apps while users are walking in a store, sending out sensor values, or any other advertisement based data that only needs one-way communication.
By placing beacons in a store, it is possible to trigger deals to open in a user's smart phone when they are in the beacons' proximity.
Figure 1: A store with beacons
By combining the IPv6 mesh technology with MiraOS and beacon functionality, it is easy to remotely update the offers in the beacons.
By having beacons placed around the building as anchors, a smart phone can use their positions and the estimated distance from these beacons to give an absolute position inside the building.
Beacons can locally send out sensor values as beacons, for instance the temperature and air quality in a room as collected by a HVAC system.
Figure 2: Sensor values shown in app
Sensor values could be collected from different sensors in the room, and aggregated into a single beacon packet to be transmitted by one of the nodes, rather than by all nodes.
Beacons can also be used to have Mira nodes advertise their network status for an installer, to easily see a node's status direcly in a smart phone app.
There are several beacon types, which have different packet formats and features. We will only mention the two most common here, iBeacons and Eddystone.
iBeacon was released by Apple in 2013. It was originally designed to allow retailers to trigger on-site offers to customers with a compatible app in their smartphones. iOS has built-in native support for iBeacons, and it's also supported in Android by using 3rd party libraries.
Read more at https://developer.apple.com/ibeacon/
Eddystone is a beacon profile released by Google in 2015 and can be used without restrictions. Eddystone also contains a telemetry frame (Eddystone-TLM) designed for reporting on a beacon's health, including for example battery level.
Read more at https://developers.google.com/beacons/
In the example directory in the MiraOS SDK you will find an example of an Eddystone beacon transmitting an URL.
There are several other formats as well, and it is also possible to create custom beacon types of your own to suit your specific need.
BLE advertisement source address type
Send a non connection BLE advertisement packet.
While up to 10 advertisements per second is supported, keep in mind that BLE-beacons use the radio, and therefore impact Mira network performance. Use BLE-beacons with constraint in performance sensitive Mira applications.
With Mira net initialized but the node not joined, calling this function too often affects join time negatively.
|source_address_type||Type of source address (TX address bit).|
|payload||Payload of the advertisement packet.|
|payload_len||Length of the payload of the advertisement packet.|
Status of the operation.
|MIRA_SUCCESS||The BLE advertisement was successful.|
|MIRA_BLE_ADVERTISEMENT_ERROR_UNABLE_TO_SEND_PACKET||The BLE advertisement was unsuccessful.|