# Serial in and out not working

**URL:** <https://discourse.nodered.org/t/serial-in-and-out-not-working/85489>\
**Category:** General\
**Tags:** node-red-node-serialport\
**Created:** [13 February 2024 15:21 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489 "2024-02-13T15:21:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tnnn](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tnnn](https://discourse.nodered.org/u/Tnnn)\
**Post date:** [13 February 2024 15:21 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/1 "2024-02-13T15:21:21Z")

</div>

Hi,

I have a project where i'm using multiple barode readers. They are connected to a Raspberry pi 4 on bookworm version. Node-RED version: v3.1.5 Node.js version: v18.19.0. Now when using the flow 'serial request' i can push an inject and it works (i get the right barcode in my debug messages) but when i'm using seperate 'serial in' and 'serial out' flows, i do not get any output. Is there a clear reason for this? Happy to add more information.

---

<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:** [13 February 2024 15:52 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/2 "2024-02-13T15:52:58Z")

</div>

> [@Tnnn](#):
>
> is there a clear reason for this?

possibly due to incorrect end of line settings (i.e. the request may be adding a CR or LF. Do you add those when sending via serial-out?)

If you are really struggling to make progress and want to fully understand the issue, then you can install a serial monitor program and compare the serial data sent via serial-request vs the data sent via serial-out. The differences should be immediately obvious.

---

<div class="post-metadata">

**Author:** ![Tnnn](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tnnn](https://discourse.nodered.org/u/Tnnn)\
**Post date:** [14 February 2024 08:42 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/3 "2024-02-14T08:42:39Z")

</div>

Sadly i cannot install serial monitor program (work PC). It looks like there is a default added end character 'CR'. I'm not sure where to add this in my properties of my serial port. I tried adding it to "Optionally wait for a start character of", "Split input" and "Add character to output messages" but i always get this in my debug screen: msg.payload : undefined undefined.  
Edit: I ofcorse could add a serial monitor to my Raspberry Pi, so i did and i only get the barcode (like: 101401582) but in my Manual of my 'SparkFun 2D Barcode Scanner Breakout' it says it should add a CR at the end. Not really sure what to do now.

---

<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:** [14 February 2024 10:30 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/4 "2024-02-14T10:30:03Z")

</div>

What do you send to the serial-out node - show me.

---

<div class="post-metadata">

**Author:** ![Tnnn](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tnnn](https://discourse.nodered.org/u/Tnnn)\
**Post date:** [14 February 2024 10:41 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/5 "2024-02-14T10:41:13Z")

</div>

Thank you very much with helping, it works now. Somehow it only works when i send a hex instead of a string. According to my manual it should work both but apparently not....

---

<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:** [14 May 2024 10:41 UTC](https://discourse.nodered.org/t/serial-in-and-out-not-working/85489/6 "2024-05-14T10:41:50Z")

</div>

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