Mar-20-2021, 03:04 PM
Hi,
I am trying to read a UART serial stream, and the data comes in as hex (I think). I’m not actually sure.
Below is a short snippet of what I am getting.
b’\t\x9c\x1d\xc8LX\t\xfdXh\t\xbf\x1e\x8a^X{|\xbe\x85’
I’m pretty sure the “” is a delimiter. And I believe the \n means new line, \t means tab. So those are ascii. I am also guessing that anything starting with \x is a hex value. But that’s where I get lost. Hex \x9c is convertible. But what is \xfdXh?
If anyone can help, or know if there is a python command to parse this, thanks in advance.
Andy
I am trying to read a UART serial stream, and the data comes in as hex (I think). I’m not actually sure.
Below is a short snippet of what I am getting.
b’\t\x9c\x1d\xc8LX\t\xfdXh\t\xbf\x1e\x8a^X{|\xbe\x85’
I’m pretty sure the “” is a delimiter. And I believe the \n means new line, \t means tab. So those are ascii. I am also guessing that anything starting with \x is a hex value. But that’s where I get lost. Hex \x9c is convertible. But what is \xfdXh?
If anyone can help, or know if there is a python command to parse this, thanks in advance.
Andy