Mar-01-2019, 08:29 AM
input_hex = '08 22 1 0 1 0 D4' # you can strip the white spaces, but the number of hex values have to be even. data = bytearray.fromhex(input_hex.replace(' ', '')) print(data)
Output:bytearray(b'\x08"\x10\x10\xd4')
If you are using groups, you have to be consistent. Always two hex values have to be grouped together, if white space is used.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!