Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to the string value from the descriptor of a characteristic? #301

Open
pole0815 opened this issue Apr 26, 2024 · 0 comments
Open

How to the string value from the descriptor of a characteristic? #301

pole0815 opened this issue Apr 26, 2024 · 0 comments

Comments

@pole0815
Copy link

Hi, I am using windows 10, python 311 and simplepyble 0.7.3.
I am would like to read descriptor strings of gatt characteristics.

I connect to a BLE device and scan for services and characteristics.
For some characteristics I also get descriptor objects
services[5].characteristics()[0].descriptors()

[<simplepyble._simplepyble.Descriptor at 0x19e557e7b70>,
<simplepyble._simplepyble.Descriptor at 0x19e5354c270>]

But these descriptors only return a uuid and not the string value.

dir(services[5].characteristics()[0].descriptors()[0])
Out[11]:
['class',
'delattr',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'getstate',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'uuid']

How do I read the string value from the descriptor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant