SimpleBLE
SimpleBLE copied to clipboard
Expose GATT Characteristic Properties in Characteristic class
I think it would be a good idea to have the GATT characteristic properties directly accessible in the Characteristic class.
Hey @jferdelyi, thanks for the feedback!
Could you elaborate a bit more on what the desired API would look like? I'm not entirely sure I understood what you expect.
Thanks!
Maybe I miss something, my idea is relatively simple: for each caracteristic be able to get all properties like Write, Notify, Read, etc.
In the actual implementation, as far as I know, the only way to know this is to try, and an exception is raised if the caracteristic doesn't have the propertie (or nullopt in the case of "safe" usage).
Oh, I see! Yeah, that's a very reasonable request. Added to my list :)
Thanks :)
I would also love to have the library report the characteristic properties as my tool works with multiple peripherals. Currently, they all use write without response and notify to exchange data. I'd like my tool to be able to verify which characteristic properties the peripheral supports, and use the appropriate services or throw an error, as appropriate. Thanks Kevin for this great library!
Implemented in https://github.com/OpenBluetoothToolbox/SimpleBLE/pull/130