I am reading SML protocol based data from my power meter. From /dev/ttyUSB0 I receive the following data (excerpt):
b"\x1b\x1b\x1b\x1b\x01\x01\x01\x01v\x07\x00\x17\x06\xf7\x84\x08b\x00b\x00rc\x01\x01v\x01\x01\x07\x00\x17\x11\x9d\x81x\x0b\t\x01emh\x00\x00c_\xdd\x01\x01cl\x18\x00v\x07\x00\x17\x06\xf7\...
How can I convert this bytearray of hex values to a pure hex bytearray like 1b 1b 1b 1b
source https://stackoverflow.com/questions/75844467/python-convert-hex-byte-array-to-pure-hex-byte-array
Comments
Post a Comment