# Serial communication problem

**URL:** https://discourse.nodered.org/t/serial-communication-problem/33407
**Category:** General
**Created:** [27 September 2020 12:47 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407 "2020-09-27T12:47:04Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![jw\_te\_r](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jw_te_r/32/69700_2.png) [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)
#### Post date: [27 September 2020 12:47 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/1 "2020-09-27T12:47:04Z")

</div>

I'm using Node-Red to connect a laptop to a Mitsubishi Alpha-2 microcontroller via an usb-serial cable.

The communication doesn't start immediately when I fire up my laptop.  
Initially I suspected a permissions issue in Linux, but I'm no longer sure that this is the problem.

Powercycling the Alpha-2 does not work.  
Rebooting the laptop does not work.  
However, when I restart the Node-RED process ( `node-red-restart` ), the communication is magically restored. I suspected the first node-red process might have had a different owner but that is not the case, I checked.

Any ideas?

---

<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: [27 September 2020 20:03 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/2 "2020-09-27T20:03:39Z")

</div>

This sounds very like a problem a week or two back. Have you configured node red to autostart on boot? If so then if you disable autostart  
`sudo systemctl disable nodered`  
and reboot, then start nodered is it ok? If so then node-red is starting too quickly and the serial port doesn't function for some so far unknown reason. Have a look at this post which tells you how nodered can be delayed on boot, which fixed the problem in this case [Serial woes.. buffer issue?](https://discourse.nodered.org/t/serial-woes-buffer-issue/33141/18)

---

<div class="post-metadata">

### Author: ![machadotiago](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/machadotiago/32/23776_2.png) [@machadotiago](https://discourse.nodered.org/u/machadotiago)
#### Post date: [27 September 2020 21:42 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/3 "2020-09-27T21:42:08Z")

</div>

Which Node are you using to communicate with the Controller?

---

<div class="post-metadata">

### Author: ![jw\_te\_r](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jw_te_r/32/69700_2.png) [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)
#### Post date: [28 September 2020 11:28 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/4 "2020-09-28T11:28:19Z")

</div>

Thanks a lot. Problem solved.

---

<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: [28 September 2020 11:47 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/5 "2020-09-28T11:47:11Z")

</div>

Was it the timer that fixed it?  
Are you using the standard serial node?

---

<div class="post-metadata">

### Author: ![jw\_te\_r](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jw_te_r/32/69700_2.png) [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)
#### Post date: [28 September 2020 11:52 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/6 "2020-09-28T11:52:50Z")

</div>

I'm using node-red-node-serialport and yes, the delay on boot fixed my problem.

---

<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: [28 September 2020 13:29 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/7 "2020-09-28T13:29:19Z")

</div>

@dceejay I don't know whether you want to consider this. This is the second Pi recently that seems to have a problem with the serial port on boot, fixed by delaying the node-red start. I haven't got any hardware to try it myself.

---

<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: [28 September 2020 14:38 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/8 "2020-09-28T14:38:27Z")

</div>

> [@jw\_te\_r](#):
>
> I'm using Node-Red to connect a laptop to a Mitsubishi Alpha-2 microcontroller

How does the comms work? Does node red poll it for data or does it send data automatically?

---

<div class="post-metadata">

### Author: ![jw\_te\_r](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jw_te_r/32/69700_2.png) [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)
#### Post date: [28 September 2020 15:28 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/9 "2020-09-28T15:28:21Z")

</div>

Node-RED polls for data.  
By the way, Node-RED is running from a (very old) laptop, not from a Pi.  
The OS is Xubuntu 20.04.1 LTS

---

<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: [28 September 2020 17:27 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/10 "2020-09-28T17:27:15Z")

</div>

Oh yes, sorry I got confused.  
Obviously not a Pi related issue. The previous instance was one where the device was continually sending data, so it isn't that either, as yours polls.

---

<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: [12 October 2020 17:27 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407/11 "2020-10-12T17:27:17Z")

</div>

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