Skip to content

pygatt: use handle in place of uuid#7

Open
xalexalex wants to merge 2 commits intoAritzherrero4:masterfrom
xalexalex:master
Open

pygatt: use handle in place of uuid#7
xalexalex wants to merge 2 commits intoAritzherrero4:masterfrom
xalexalex:master

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