Arduino Due Serial Com issue

I am facing with a very strange problem. I have looked around a lot to find a solution, but with no luck. I have connected a Due with a Wio GPS tracker for serial communication between them. Due sends some information to Wio and Wio should respond with an acknowledgement that message is received. Upon reception, Due should stop sending the same information and waits for new one to be produced by a sensor. I am not posting any code because the code is not the problem (at least this is what it looks like). When I use an original Due everything works fine. If I replace it with a clone then Due sends the information to Wio but it doesn't get any of it. It is like clone's RX doesn't work at all. I have tried with different clones (of same type), again the same effect happens. I have tried with the other serial ports (RX1/TX1 etc), again with no luck. Any recommendation will be highly appreciated. Thank you very much!

What I would do to investigate this is connect a USB to serial adapter (AKA "FTDI") to the Due in place of the Wio, upload the File > Examples > 04.Communication > SerialPassthrough sketch to the Due, then open the Due's serial port and the serial adapter's serial port in separate serial terminals, then check whether text I send via the serial adapter is received on the Due. You can use Serial Monitor for this purpose if you open two instances (not two windows of the same instance) of the Arduino IDE, or you can use whatever your preferred terminal software is.

It might be helpful if you tell us exactly how you have the Wio connected to the Due.

At first, thank you very much for your comment. Your proposal does make sense and I will try it. I haven't yet, because the Wio works fine with the original Due. I have connected TX of Wio to RX0 of Due, RX of Wio to TX0 of Due and the ground of Wio's Grove connector to a ground of Due.

@pert, I tried the test you recommended, unfurtunately with no luck... This is a big puzzle...maybe I should try some different approach...but I don't know which one this should be.

Since you seem to have multiple DUE clones, you shoud try to connect e.g. RX1 of DUE 1 to TX2 of DUE 2, and TX1 of DUE 1 to RX2 of DUE 2.

Write a basic sketch to send something via RX1 of DUE 1, catch it in DUE 2 thru TX2 and send it back to DUE 1, then Serial Print the echo result on Serial monitor using Serial and your PC.

I did this test, but on a single DUE board, with the above code. You will easily cut the code in 2 pieces for 2 DUEs:

/*********************************************************************/
/* Jumper between RX1 and TX2, and another one between TX1 and RX2   */
/*********************************************************************/

char c = 0;
void setup() {

  Serial.begin(250000);
  Serial1.begin(2500000); // USART0
  Serial2.begin(2500000); // USART1

  Serial2.print("Hello");
}


void loop() {
  String s;
  s.reserve(10);
  s = "";

  while (Serial1.available() > 0) {
    c = Serial1.read();
    s += c;

  }
  if (s.length() > 0) {
    Serial.println(s);
    Serial2.print(s);
  }
  delay(1000);
}

Note that the size of the info exchanged between the 2 boards should be obviously the same from each side for a correct communication.

@ard_newbie, thank you very much for your post. I tried what you recommended but again with no luck. I am very much afraid it is a hardware issue with this particular clone (not just the one device but all of them).

Hello,

I am facing a similar problem with the serial port Serial1 of my DUE board, and that's why I came to see on that forum if a solution had been identified.

My DUE board is connected through Serial1 port to a ESP8266-01 wifi board.

The problem occured since I migrated my Arduino IDE from 1.5.6 to 1.8.13 this afternoon.

When I compile and load from 1.5.6, the code runs correctly on the DUE, and I can control the ESP and exchange data with my PC without loss.

When I compile and load from 1.8.13 , I never receive anything from ESP. Normally all commands are acknlowleged by the ESP. I only have permanently time-out expired on the serial link.

I did several tests with both versions of IDE to check : still OK when I return to 1.5.6, no communication with 1.8.13.

I have a clone DUE board too. I can't say if it is link to that.

Is it possible for somebody to confirm that serial communication on Serial1 is correct with the later version of IDE with a real DUE board? It might be a problem into the library?

@aoikon: Perhaps you could try with 1.5.x version of IDE to check?

Thanks for your help.

OK. I solved my problem by just changing original Serial1 initialization command :

// initialize serial communication
Serial.begin(115200);

into:

  // initialize serial communication 
  Serial1.begin(115200, SERIAL_8O1);

SERIAL_8O1 being the configuration fitted to my peripheral configuration.

It’s now OK with IDE 1.8.13.

Indeed, default USART configuration in Arduino IDE 1.8.13 documentation is SERIAL_8N1, which is not compatible with my peripheral.

It probably changed recently as the default configuration is not described in IDE 1.5. but worked with my peripheral.