# Question about the serial node

**URL:** <https://discourse.nodered.org/t/question-about-the-serial-node/98353>\
**Category:** General\
**Created:** [28 July 2025 22:30 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353 "2025-07-28T22:30:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andramalech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andramalech/32/25617_2.png) [@andramalech](https://discourse.nodered.org/u/andramalech)\
**Post date:** [28 July 2025 22:30 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/1 "2025-07-28T22:30:35Z")

</div>

I am using the serial node to communicate over RS232 and I am getting additional characters in my string response. Would anyone have an idea of what these characters are and how to remove them?

sample:  
22.03

 ![Screenshot 2025-07-28 182936](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/e/ce1bd4cda149f16427f77e9080be98ebd780ca27.png)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 July 2025 23:00 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/2 "2025-07-28T23:00:08Z")

</div>

Question:  
What baud rate?

What _structure_ is/are the messages?  
_WHO_ is sending them? (Arduino, some other device)

Just thoughts....

Stop bits wrong.

Parity wrong.

Have you tested the RS232 link with another device?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 July 2025 23:20 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/3 "2025-07-28T23:20:22Z")

</div>

they will be either linefeed/carriage returns or control characters like STX, ETX etc.

Change the output to a buffer and you will be able to see the character code byte values.

---

<div class="post-metadata">

**Author:** ![andramalech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andramalech/32/25617_2.png) [@andramalech](https://discourse.nodered.org/u/andramalech)\
**Post date:** [29 July 2025 00:04 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/4 "2025-07-29T00:04:08Z")

</div>

Looks like it is XON, XOFF and Line feed. Any idea on the best way to remove?

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [29 July 2025 02:46 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/5 "2025-07-29T02:46:01Z")

</div>

```auto
const asciiPayload = msg.payload.replace(/[\x00-\x1F\x7F-\x9F]/g, '').replace(/[^\x20-\x7E]/g, '');
msg.payload = asciiPayload;
return msg;

```

try that in a function node.. or you could do a regular expression in a change node

This was from an old project so no warranty on code 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 October 2025 02:46 UTC](https://discourse.nodered.org/t/question-about-the-serial-node/98353/6 "2025-10-27T02:46:15Z")

</div>

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