# Serial line tx/rx conflict

**URL:** <https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591>\
**Category:** General\
**Created:** [22 October 2024 19:51 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591 "2024-10-22T19:51:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![marke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marke/32/95696_2.png) [@marke](https://discourse.nodered.org/u/marke)\
**Post date:** [22 October 2024 19:51 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/1 "2024-10-22T19:51:59Z")

</div>

Hi  
I'm starting a new project using RS485 MODBUS; I can drive the conncted device using "serial out" node but if in the same flow I put a "serial in" node, trhe serial out node switch to "disconnected" and "serial in" node is "connected". Of course it is necessary to read and write serial just to receive the device response but I don't uderstand why seems to be impossible

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 October 2024 20:20 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/2 "2024-10-22T20:20:14Z")

</div>

Use a serial request node.

But if you are using modbus use node-red-contrib-modbus instead.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 October 2024 20:54 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/3 "2024-10-22T20:54:03Z")

</div>

If, for some reason, you do want to use separate in and out nodes on the same port then make sure that you select the same serial port config node, don't add a second one for the second node. So when you click on the dropdown in both serial nodes you should be seeing just one option, not two.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0b6b1128e1ffdc93c8f06b11a2eecd9c2b4dfb83.png)

If you added a second serial port config for the second node then you will have two config nodes separately trying to connect to the same port, which is not possible. The serial in and out nodes must both use the same config node.

---

<div class="post-metadata">

**Author:** ![marke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marke/32/95696_2.png) [@marke](https://discourse.nodered.org/u/marke)\
**Post date:** [23 October 2024 07:52 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/4 "2024-10-23T07:52:10Z")

</div>

Hi  
Thanks for your reply. I've not added a new connection, what I've seen is that if I rebbot my Raspberry PI, both nodes switch to "connected" but the serial in node doesn't read the incoming data.  
I will investigate further...

---

<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:** [23 October 2024 08:03 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/5 "2024-10-23T08:03:08Z")

</div>

As @Colin also suggested - use the serial request node instead if you want request/response type behaviour.

---

<div class="post-metadata">

**Author:** ![marke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marke/32/95696_2.png) [@marke](https://discourse.nodered.org/u/marke)\
**Post date:** [24 October 2024 10:40 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/6 "2024-10-24T10:40:58Z")

</div>

Thanks to all for your answers and suggestion. I have solved all the problems simply using node-red-contrib-modbus.

---

<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:** [7 November 2024 10:41 UTC](https://discourse.nodered.org/t/serial-line-tx-rx-conflict/92591/7 "2024-11-07T10:41:06Z")

</div>

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