Datasheet

BLEBeacon
The BLEBeacon helper class allows you to easily configure the nRF52 as a 'Beacon', which uses the advertising packet
to send out a specifically format chunk of data to any devices in listening range.
The following values must be set in order to generate a valid 'Beacon' packet:
Manufacturer ID: A 16-bit value (registered with the Bluetooth SIG (https://adafru.it/vaB)!) that identifies the
manufacturer.
Major: A 16-bit 'Major' number, used to differentiate beacon nodes.
Minor: A 16-bit 'Minor' number, used to differentiate beacon nodes.
RSSI @ 1M: A signed 8-bit value (int8_t) indicating the RSSI measurement at 1m distance from the node, used to
estimate distance to the beacon itself.
These values can either be set in the constructor, or via the individual functions exposed as part of this helper class.
API
BLEBeacon has the following public API:
In addition to these functions, the BLEAdvertising class (accessible via `Bluefruit.Advertising.*`) exposes the following
function to assign Beacon payload to the advertising payload:
See the example below for a concrete usage example.
Example
The following example will configure the nRF52 to advertise a 'Beacon' payload:
The Bluefruit nRF52 Feather codebase is in an early BETA stage and is undergoing active development
based on customer feedback and testing. As such, the class documentation here is incomplete, and you
should consult the Github repo for the latest code and API developments: https://goo.gl/LdEx62
// Constructors
BLEBeacon(void);
BLEBeacon(uint8_t const uuid128[16]);
BLEBeacon(uint8_t const uuid128[16], uint16_t major, uint16_t minor, int8_t rssi);
// Set the beacon payload values
void setManufacturer(uint16_t manfacturer);
void setUuid(uint8_t const uuid128[16]);
void setMajorMinor(uint16_t major, uint16_t minor);
void setRssiAt1m(int8_t rssi);
// Start advertising
bool start(void);
bool start(BLEAdvertising& adv);
bool setBeacon(BLEBeacon& beacon);
© Adafruit Industries https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide Page 134 of 175