Error response

I am working with an Arduino Due connected to a DWM1001 development board using UART connection.

To communicate with the board it must first be put into shell mode. This is done by sending two carriage returns (\r) within 1 second.
I have recently been having problems getting it into shell mode and I am not sure why. My first question is can anyone see something wrong with my code?

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial1.begin(115200);

}
void loop() {
  // put your main code here, to run repeatedly:

  //Put DWM1001 dev into shell mode by sending two \r within one second
  Serial1.write('\r');
  Serial1.write('\r');
  delay(100);

  //Print response
  while (Serial1.available()) {
    Serial.println(Serial1.readStringUntil('\r'));
    delay(3000);

  }
}

This code used to work, and very occasionally it will jump into shell mode and work. However, most of the time i just get "@ SOH SOH" as the response (means the board is not in shell mode).

Second question is about a random response I got one day. A photo is attached.

Has anyone seen this before? Is it an Arduino response or a response from the DWM1001 dev? I am not able to find any mention of this in any documentation for either the Arduino or the DWM1001.

Many thanks,
Macgregor

Screenshot 2021-03-15 131620.png

Screenshot 2021-03-15 131620.png

I'm going to make a guess... The DWM1001 didn't like being repeatedly asked to go into shell mode every 3 seconds (why are you doing that?), and crashed. You are seeing the DWM1001 firmware error diagnosic messages. I think your simplistic program just doesn't talk to the DWM1001 correctly. You should examine the RPI examples to see how it's done.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.