bluetooth
bluetooth copied to clipboard
Expose ServiceData() in AdvertisementFields
This PR adds a ServiceData()
function to AdvertisementFields
which returns a map of service data, similar to manufacturer data.
I don't know the Bluetooth spec enough to understand the difference between these two, but I have different BLE devices and some advertise the data I'm interested in as service data, while others use manufacturer data. I'd like to use this library to handle both types of devices.
I have tested this on Linux and macOS. Both works, but as IIRC you can't get hold of the device MAC on macOS, I couldn't verify the data completely. I don't have access to Windows or custom devices to test further.
Hope this feature makes sense!
This looks like a reasonable PR, sorry I missed it.
Can you rebase it on the current dev branch? There were a lot of changes in the Linux/BlueZ version so this PR will need some updates.
Rebased and merged in #243 . Sorry for forgetting about this 🙈