I will try to explain my problem...
I'm using a SIM808 GSM-GPS click module and a ARDUINO nano 33 IoT board,
I'm sending the command "AT\r" thanks to the TX port from the ARDUINO board to the RX port from the SIM808. I have checked the signal thanks to an oscilloscope and he is corresponding to the the command.
But now when I'm checking the answer on the TX port from the SIM808 there is absolutely nothing ...
Normaly I have to received "OK" ...
Please HELP ME !!!
I'm using my ARDUINO in NL&CR and baud number is 115200. You can find bellow my Arduino code:
String incomingByte; // for incoming serial data;
String returnByte; // for outcoming serial data;
void setup() {
// initialize both serial ports:
Serial1.begin(115200,SERIAL_8N1);
Serial.begin(115200);
delay(1000);
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
while(Serial.available()!=0){
// read the incoming byte:
//incomingByte = Serial.readString(); // In comments for only try with "AT\r"
//Serial.print(incomingByte); // In comments for only try with "AT\r"
//Serial1.println(incomingByte); // In comments for only try with "AT\r"
Serial.println("AT\r");
Serial1.print("AT\r");
delay(10);
}
Serial.flush();
}
//read the outcoming byte:
if (Serial1.available() > 0) {
while(Serial1.available()!=0){
returnByte=Serial1.read();
Serial.print(returnByte);
}
Serial.flush();
}
}
Serial1.print("AT\r"); delay(1000);.... nothing else is needed \$\endgroup\$