Make manufacturer specific data available
MattesWhite opened this issue · 5 comments
First of all thank you for this interesting BLE library.
From the docs I don't see the possibility to access the manufacturer specific data advertised by some BLE devices. Would it be possible to expose them, maybe as an event?
Furthermore, it would be nice to be able to configure the scan process. Especially, I have the filter duplicates
option in mind.
Background
I'm using Ruuvi Tags in my application. They use the manufacturer specific data advertisements to broadcast their sensor data. To be able to access the sensor data, I need access to the manufacturer specific data and be able to turn off the duplicates filter as otherwise newer values wouldn't be recognized.
Sounds reasonable. It should be fairly straightforward to add a manufacturer data field to the DeviceInfo
struct. We should probably also add a BluetoothSession::get_device_info
method, similar to the existing get_service_info
and so on, to get a single device rather than having to get them all with get_devices
.
It looks like scan configuration is done by calling SetDiscoveryFilter
on the adapter. This could be done by BluetoothSession::start_discovery
or by a new method. We should probably also add a stop_discovery
method as we don't yet have that.
Feel free to send a pull request, or else I can have a look tonight or this weekend.
Oh, and it sounds like you also want a new DeviceEvent
variant. I haven't looked into that yet.
@MattesWhite Please take a look at #130 and see if it does what you want, and what you think of the code structure. If you give me a code review on that then I'll merge it and release a new version for you.
Thanks a lot for the big amount of work you put into my request. I really didn't expected that much. As requested I reviewed the PR, don't have anything to complain about.
To finish things, I'll test the events example with my setup to acknowledge that everything works.