Due serial garbage (Serial3)

I have two ESP32s attached to a DUE. The ESP32s are on SERIAL1 and SERIAL3. One handles all of the incoming traffic and passes it to the DUE through SERIAL1. The second handles any outbound traffic from the DUE on SERIAL3.

After about 2 days or running fine, I start seeing garbage from the DUE to the ESP32 on SERIAL3. The garbage is special characters such as the 'y' with the 2-dots above it, or the 'e' with the ~ above it.

Any suggestions how to prevent it?

They are passing JSON documents around to sending remote sensor information and communicating at 9600/8/N/1. ( I had them 115000 and slowed them down. That helped for a while.)

How long are the transmission lines?

About 3 inches if they are lucky.

Does it recover if you restart the Due?

Then you probably have other issues.
You should be able to go much father with serial lines.

It does recover. Sometimes the ESPs have to be restarted to get the garbage out of their system.

Heap fragmentation can cause the symptom of "runs fine for a while, but then fails." Use of String objects is a good way to achieve that. Other dynamic memory allocation can do it too of course.

I have some String in the DUE's routines.

I'll get rid of them and see how that works out.

The strings are gone.
I'll see how that runs.

(The only thing I have come to dislike on the DUE is that, when it crashes and restarts, there are no error messages. It just restarts.)

Two days and 38 minutes, no issues so far. The first time I noticed the garbage, it had reached somewhere around 4 days.

That's a long time between tests if it fails - let's hope it doesn't.

Agreed. I should know soon.
Until this is resolved, this project is at a stand-still.