Serialport fails with Arduino mega

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 :slight_smile:

Any errors shown in the Node-RED log?

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?

no - but....