Trouble getting the iBeacon RawData from advertisedDevice in BLE
Posted: Fri Jan 18, 2019 12:55 am
Hello everyone,
I'm trying to read the raw data that my iBeacon is advertising,
When I'm scanning MyCallback:
Have the advertisedDevice object with getPayLoad() which returns me a uint8_t * pointer and the method getPayLoadLength() which returns the size_t of the payload ( 31 bytes ), I'm not able to reconstruct the whole payload, can anyone give me some ideas? Is this the correct way to get the raw data from the advertisedDevice?
I'm trying to read the raw data that my iBeacon is advertising,
When I'm scanning MyCallback:
Code: Select all
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
{
void onResult(BLEAdvertisedDevice advertisedDevice)
{
Serial.printf("\n Advertised Device: %s \n", advertisedDevice.toString().c_str());
Serial.printf("Advertised getPayloadLength: %d \n", advertisedDevice.getPayloadLength());
}
};