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

pygatt: use handle in place of uuid #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xalexalex
Copy link

Hey,
I couldn't get this to work with my own triones bulbs. After some tinkering, I discovered that the problem was that gatttool got stuck when asking for characteristics. Unfortunately, device.char_write(UUID, [...]) must call characteristics to get the handle associated with the UUID in order to finally call device.char_write_handle(handle, [...]).

This patch uses the handle (0x0007) directly, obviating the need for the call to characteristics and thus fixing the problem.

I have no idea whether the handle 0x0007 is constant or not. If it isn't, then the patch must be made in pygatt (using char-desc instead of characteristics to go from UUID to handle).

The PR also includes a commit that fixes a typo.

Thanks,
Alessandro

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

Successfully merging this pull request may close these issues.

1 participant