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