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 read descriptors of characteristics? #35

Open
jlusiardi opened this issue Oct 30, 2018 · 2 comments
Open

How to read descriptors of characteristics? #35

jlusiardi opened this issue Oct 30, 2018 · 2 comments

Comments

@jlusiardi
Copy link
Contributor

Hi,

i am trying to use gatt-python to tinker around with homekit accessories (for https://github.com/jlusiardi/homekit_python) communicating via bluetooth le. Descriptors seem to be important there so i wonder how to read them via gatt-python.

https://www.bluetooth.com/specifications/gatt/generic-attributes-overview mentions them and also they are visible via bluez and dbus.

Perhaps we need to add those to the code at all?

Regards
Joachim

@larsblumberg
Copy link
Contributor

Hi Joachim,

there's no need to know or understand descriptors with this library. What you need is to know the UUID of the service and the UUID of its characteristic you want to read from / write to.

If you don't know the services' UUIDs of your HomeKit device then you can simply list all service UUIds and their characteristics via the services_resolved() callback.

Please check the documentation and let me know if you have any more questions.

@jlusiardi
Copy link
Contributor Author

Hi Lars,

i guess the UUIDs are not the problem. HomeKit uses characteristic instance IDs to access characteristics (e.g. via HAP-Characteristic-Signature-Read-Request). Those characteristic instance IDs seem to be given on special descriptors (UUID dc46f0fe-81d2-4616-b5d9-6abdd796939a) of the characteristics one wants to access. For example the following excerpt:

S 00000055-0000-1000-8000-0026bb765291
	 C 00000050-0000-1000-8000-0026bb765291
		 D CharacteristicInstanceID/dc46f0fe-81d2-4616-b5d9-6abdd796939a 13
	 C 0000004e-0000-1000-8000-0026bb765291
		 D CharacteristicInstanceID/dc46f0fe-81d2-4616-b5d9-6abdd796939a 11
	 C 0000004c-0000-1000-8000-0026bb765291
		 D CharacteristicInstanceID/dc46f0fe-81d2-4616-b5d9-6abdd796939a 10
	 C 0000004f-0000-1000-8000-0026bb765291
		 D CharacteristicInstanceID/dc46f0fe-81d2-4616-b5d9-6abdd796939a 12
	 C ServiceInstanceId/e604e95d-a759-4817-87d3-aa005083a0d1 9

I extracted this after doing a little patch to this library.

Regards
Joachim

kelada added a commit that referenced this issue Apr 1, 2019
#35  Proposes an extension to access GATT descriptors
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

2 participants