Beacons are BLE (Bluetooth Low Energy) devices that send out advertisement packets to any mobile unit 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.
mira_status_t mira_ble_advertisement_send_adv_nonconn_ind( mira_ble_advertisement_address_type_t source_address_type, const void* payload, uint8_t payload_len);
Send a non connection BLE advertisement packet.
||Type of source address. (Tx address bit)|
||Payload of the advertisement packet.|
||Length of the payload of the advertisement packet.|
MIRA_SUCCESS if succesful.