I have an issue with 2 arduinos Mega using Serial bi-directional communication.
Arduino A and Arduino B are connected : TX.A with RX.B, TX.B with RX.A, and GND.A with GND.B.
There is a 10 meters distance, with possible interference so the Serial speed is set to 1200bps.
I added a 10k pull-up resistor to both RX pins to avoid floating datas when the other arduino is disconnected.
When Arduino A writes, Arduino B can read perfectly.
When Arduino B writes, Arduino A doesn’t read anything BUT Arduino B reads the bytes it just sent.
If i disconnect RXa or TXa, then Arduino B does not receive his own bytes back. So i guess the bytes do go through Arduino A somehow.
What i tested
Both Arduino use Serial1. I tried to use Serial3 on Arduino A, and then the bug was inverted ! Arduino B can read what Arduino A sent, but Arduino A reads itself.
When i made test at the beginning of my project, it worked fine. So maybe the issue comes from the distance but i would not know why it would have anything to do.
I could put the 2 Arduinos closer to test again, but they are not easy to move now so i would rather not, except if nobody can help me with that !