# Serial output not working

**URL:** <https://discourse.nodered.org/t/serial-output-not-working/13175>\
**Category:** General\
**Created:** [11 July 2019 13:42 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175 "2019-07-11T13:42:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charlotte](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Charlotte](https://discourse.nodered.org/u/Charlotte)\
**Post date:** [11 July 2019 13:42 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/1 "2019-07-11T13:42:06Z")

</div>

Hi,

I try to communicate with a balance by serial communication RS232.  
I send a command "S\r\n" to get the current weight.

It is working properly from my hyperterminal or from a Python script but I can't make it work from Node-red.

I tried to have a Serial input node with "S" as payload and include \r\n in as additional characters for output messages in the serial com parameters ; or include them directly in the payload. But I don't have any answer from the balance.

The serial configuration is well configured because if I choose the continuous mode on my balance I receive data each second.

If you have any ideas to help I'm happy to hear them 🙂

Thanks,  
Charlotte

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 July 2019 14:01 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/2 "2019-07-11T14:01:56Z")

</div>

Hi,

how are you adding the \r\n ? Most devices only need one or other of them... (often \r) - the serial node can add it for you which is probably the way to go.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0883bab2c31d5338b1b208b997b5fff6b4b4d246.png)

---

<div class="post-metadata">

**Author:** ![Charlotte](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Charlotte](https://discourse.nodered.org/u/Charlotte)\
**Post date:** [11 July 2019 14:03 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/3 "2019-07-11T14:03:34Z")

</div>

Yes I did it with the Serial node, and also in the payload.  
I tried \r, \n and \r\n but none of them are working.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 July 2019 14:07 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/4 "2019-07-11T14:07:05Z")

</div>

if in the payload - presumably a function like

```
msg.payload += "\r\n";
return msg;
```

---

<div class="post-metadata">

**Author:** ![Charlotte](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@Charlotte](https://discourse.nodered.org/u/Charlotte)\
**Post date:** [11 July 2019 15:16 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/5 "2019-07-11T15:16:44Z")

</div>

This is working with input / output nodes, thanks a lot !

Do you know why it's not working when I use the "add character to output messages" ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 July 2019 15:43 UTC](https://discourse.nodered.org/t/serial-output-not-working/13175/6 "2019-07-11T15:43:16Z")

</div>

can you share a screenshot of how you have it configured ?  
(not explanation off top of my head - unless it's - you can only specify one char in there, so \r or \n , not both.)
