# Serialport fails with Arduino mega

**URL:** <https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689>\
**Category:** General\
**Created:** [30 May 2019 01:14 UTC](https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689 "2019-05-30T01:14:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitorbarao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vitorbarao/32/8862_2.png) [@vitorbarao](https://discourse.nodered.org/u/vitorbarao)\
**Post date:** [30 May 2019 01:14 UTC](https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689/1 "2019-05-30T01:14:52Z")

</div>

Hi friends, could you help me please?

Very annoying problem that I can't solve even after reading hundreds of posts here:

- I have a flow that reads data from an Arduino mega via Serialport in, processes them and send some characters to Arduino via serial port out to control relays.
- everything seems ok and works fine until I reboot raspberrypi3B+
- after reboot nodered doesn't read any information in serial in and can't send commands to serial out. Status in the nodes indicate connected. Rasp finds ttyUSB0. I can read serial information in rasp terminal if I stop nodered. Nodered plots that the port was open on startup and no errors are reported.
- nodered only reads data again if I unplug and replug Arduino some times (several times) or if I create a new config for the serial nodes.
- sometimes (rarely) everything works fine after a reboot, data is read in serial in and commands are sent in serial out.

any suggestion?  
thanks 🙂

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [30 May 2019 05:25 UTC](https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689/2 "2019-05-30T05:25:05Z")

</div>

Any errors shown in the Node-RED log?

---

<div class="post-metadata">

**Author:** ![vitorbarao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vitorbarao/32/8862_2.png) [@vitorbarao](https://discourse.nodered.org/u/vitorbarao)\
**Post date:** [30 May 2019 14:19 UTC](https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689/3 "2019-05-30T14:19:00Z")

</div>

no errors...  
I think I solved the problem by changing serialport out by serial request. I suppose it was a communication fail due to overflow between in and out messages. Makes sense?

---

<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:** [30 May 2019 17:28 UTC](https://discourse.nodered.org/t/serialport-fails-with-arduino-mega/11689/4 "2019-05-30T17:28:25Z")

</div>

no - but....
