Merge pull request #123 from iriark01/patch-6

Edit
This commit is contained in:
Rohit Grover 2015-12-02 08:02:50 +00:00
commit a2c6455c08

View file

@ -21,7 +21,7 @@
/**
* @class iBeacon
* @brief iBeacon Service. This sets up a device to broadcast advertising packets to mimic an iBeacon<br>
* @brief iBeacon Service. This sets up a device to broadcast advertising packets to mimic an iBeacon.
*/
class iBeacon
{
@ -56,12 +56,12 @@ public:
uint16_t compID = 0x004C) :
ble(_ble), data(uuid, majNum, minNum, txP, compID)
{
// Generate the 0x020106 part of the iBeacon Prefix
// Generate the 0x020106 part of the iBeacon Prefix.
ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE );
// Generate the 0x1AFF part of the iBeacon Prefix
// Generate the 0x1AFF part of the iBeacon Prefix.
ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, data.raw, sizeof(data.raw));
// Set advertising type
// Set advertising type.
ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED);
}