OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
655 stars 110 forks source link

[Python] Ensure feature parity with Cpp version #231

Open kdewald opened 1 year ago

kdewald commented 1 year ago

Some of the the newer functions in Services, Characteristics and Descriptors haven't been ported to Python.

eriklins commented 11 months ago

Is this issue still pending? What are the "newer functions" missing in the Python version?

RyanNorge commented 8 months ago

Not sure if @kdewald was seeing the same thing I am, but the following methods don't work for me in Python... characteristic.capabilities() characteristic.can_read() characteristic.can_write_request() characteristic.can_write_command() characteristic.can_notify() characteristic.can_indicate()

I get an AttributeError along the lines of "object has no attribute 'can_read'"

Also, this could very well be my own device, but service.data() is giving me empty bytes... service.data() -> b''

Running on MacOS, so I don't know if it's a Python bindings thing or a Mac backend thing. Maybe someone can try these Python methods on a different OS?

First post on GitHub! I'm new to this computer programy stuff and I'm loving it :)

JoeHowse commented 6 months ago

The Python methods listed in @RyanNorge's comment were missing from version 0.6.1 but are present in version 0.6.2.dev2 (currently the latest pre-release package available via Pip). To install the latest pre-release package, run pip install simplepyble --pre.

I suggest that this issue can be closed.

RyanNorge commented 6 months ago

Sounds like it's probably all taken care of then. Thanks that's fantastic. It's been a busy week and I haven't been able to check the pre-release like you mentioned. Go ahead and close the issue and I'll just open a new one if I get a chance to check it and it doesn't work.