Open tautology0 opened 6 years ago
That's an interesting use case. It could probably work if the user specified all of the handles or none of the handles. You also need a way to talk care of descriptors like 0x2902 that get automatically added.
I suggest that you fork the repo and see if you can make it work. setServices is probably a good place to start looking at code.
One of the most flexible use cases for bleno is replicating other BLE devices to understand how apps talk to them.
As many (especially the cheaper ones) don't necessarily follow the standards, there may be gaps in the handle range, or even handles outside services that contain data.
Could we have an extra attribute for Characteristic and Descriptor of "handle", which would place the characteristic/descriptor into that handle?