Closed KarolPWr closed 3 years ago
For some reason, bluepy refuses to read whole value of given characteristic. This code:
print ("Connecting...") dev = btle.Peripheral("<MAC>", addrType="random") raw = dev.readCharacteristic(0x17) print(raw)
Reads only first part of characteristic value - e.g. b'\x0a\n' When I do this via gatttool, I get normal values:
[<MAC>][LE]> connect Attempting to connect to <MAC> Connection successful [<MAC>][LE]> char-read-hnd 0x17 Characteristic value/descriptor: d2 0a
How can I make this right? Or is this some library limitation?
Solved, additional conversion from bytes to hex was needed to correctly read the response.
For some reason, bluepy refuses to read whole value of given characteristic. This code:
Reads only first part of characteristic value - e.g. b'\x0a\n' When I do this via gatttool, I get normal values:
How can I make this right? Or is this some library limitation?