I'm interacting with an XBEE RF chip and want to decode it's incoming source address from a byte array to a string. The manufacturer's software does this already but I need to handle this in my own custom program. So
Received Address: b'\x00\x13\xa2\x00Aga\xf8'
Address (Decoded by Manufacturer): 00 13 A2 00 41 67 61 F8
I have been trying to decode this using address.decode('utf-8') but always receive a UnicodeDecodeError at \xa2 as an invalid start byte. I also need to know how to convert from the decoded version back to the byte array for sending messages back down the network.
Thanks in advance