I am sending from a sensor node over TCP to my TCP server. The raw received data looks like:
b'A\x10Vu\x87%\x00x\x0c\xc7\x03\x01\x00\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x00\x00'
When trying to decode it using utf-8, I receive the following error. Code:
my_variable = b'A\x10Vu\x87%\x00x\x0c\xc7\x03\x01\x00\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x00\x00'
print(my_variable.decode('utf-8'))
Error:
print(my_variable.decode('utf-8')) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 4: invalid start byte
So the problem is that the Payload contains non-ascii format characters, apparently.
How can I decode this payload to sth. human readable?
The payload description can be found here on p32. p20 shows a tcp connection example but without decoding the payload.