We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This works from Ubuntu 17.04 shell:
gatttool -b 00:16:53:A4:CD:7E --char-write-req --handle=0x0e --value=0c018139110a00069B9B647f03
This doesn't:
#!/usr/bin/env python3 from gattlib import GATTRequester, GATTResponse from time import sleep req = GATTRequester("00:16:53:A4:CD:7E",True,"hci0") response = GATTResponse() req.write_by_handle_async(0x0e, "\x0C\x01\x81\x39\x11\x0A\x00\x06\x9B\x9B\x64\x7F\x03", response) while not response.received(): sleep(0.1) print(response.received()) print(req.read_by_handle(0x0e))
Output:
['\x13'] ['\x0c\x01\x819\x11\n\x00\x06\x9b\x9bd\x7f\x03']
Also replacing with a shorter command like changing LED color
gatttool -b 00:16:53:A4:CD:7E --char-write-req --handle=0x0e --value=080081321151000A
returns
['\x13'] ['\x08\x00\x812\x11Q\x00\n']
Something is wrong after 3rd byte ?!?
The text was updated successfully, but these errors were encountered:
\x81 is > 127, converting to string in python3 works different than python2 think I figured the proper way, have to try
Sorry, something went wrong.
Writing bytes(bytearray(b'\x08\x00\x81\x32\x11\x51\x00\x0A')) instead of str(bytearray(b'\x08\x00\x81\x32\x11\x51\x00\x0A')) works.
bytes(bytearray(b'\x08\x00\x81\x32\x11\x51\x00\x0A'))
str(bytearray(b'\x08\x00\x81\x32\x11\x51\x00\x0A'))
As also just b'\x08\x00\x81\x32\x11\x51\x00\x0A'
b'\x08\x00\x81\x32\x11\x51\x00\x0A'
JorgePe
No branches or pull requests
This works from Ubuntu 17.04 shell:
This doesn't:
Output:
Also replacing with a shorter command like changing LED color
returns
Something is wrong after 3rd byte ?!?
The text was updated successfully, but these errors were encountered: