Binary Buffer to Strings while using serial port

Hello,
I am trying to get input from the "Serial in" node.

The correct output is : "aa a1 41 0b 63 01 40 2d 93 d1 cc 00"

I have tried transmitting the input as a normal "ASCII string", but the result is "�h-c@��t �h-c@��t".

I have now trying to get it in the form of a "binary buffer". I do get a result, which is :

I am not sure how I can convert this buffer to a regular string which I can format and then send as a payload to my other nodes.
I have already tried some functions like "payload.toString()" and
"Buffer.from(msg.payload, "hex").toString().
But both these functions also give me output "�h-c@��t �h-c@��t".

How can I get the correct output?

Can anybody help me?

Thanks

Hi normally I would suggest using buffer parser node but I can't make sense of your data. What is sending it? And what is it supposed to be telling you?

They look like 8 bytes packets separated by a byte 'aa' so I would set it to wait for that and then length 8

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.