I was working last time with data that the Core Bluetooth is providing after just its discovers a peripheral. I mean about "advertisementData" dictionary from callback centralManager:didDiscoverPeripheral:advertisementData:RSSI.
I was surprised why mentioned above dictionary doesn't provide the values for each of the data types from Bluetooth documentation.
https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/
Moreover, appending for example Flags (data type 0x01) don't cause any error, it works well. Instead of data connected with flags are ignored. So I suppose that the Core Bluetooth internally is parsing them properly but doesn't provide that result for programmers.
My question is WHY?
Why can't we have access to the values of each data type from Bluetooth documentation?
Is possible to grant access to this data in a future version?
A simple example of this problem:
Advertisement packet : 0x02010603020518 < 0x02, 0x01, 0x06, 0x03, 0x02, 0x05, 0x18 >
is parsed and then is provided as
{
CBAdvertisementDataServiceUUIDsKey
: {"Current Time Service"
}
}
instead of ->
{
FLAGS_KEY: "LE General Discoverable Mode, BR/ERD Not Supported",
CBAdvertisementDataServiceUUIDsKey
: {"Current Time Service"
}
}
"FLAGS_KEY" is bolded because it doesn't exist, but maybe should?