-1

I am just sending the AT command to test if the serial communication works, the response I am getting is a flipped "?" or a square or rectangle symbol.

I have tested the communication using software provided by Waveshare connected through on board USB to UART.

https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT

int PowerKey = 2;
char answer;

void setup() 
{
 Serial3.begin(96u00);
 Serial.begin(9600);
 pinMode(PowerKey, OUTPUT);
 Serial.println("initializing");
 digitalWrite(PowerKey, HIGH);
 delay(1000);
 digitalWrite(PowerKey, LOW);
}

void loop() 
{
  answer = send_at_cmd("AT\r\n");
  Serial.println(answer);
}


uint8_t send_at_cmd(const char* ATcommand)
{
  char response;
  // send test command AT
  Serial3.print(ATcommand);
  Serial.println(ATcommand);
  delay(1000);
  //Check for response from the sim7600E-H
  while(Serial3.available() != 0)
  {
    response = Serial3.read();
  }
  return response;
}

enter image description here

enter image description here

2
  • Your code sets serial 3 to 9600, but the second image sets the serial port to 115K. I think that may be a problem, because at least one is wrong. Oct 17, 2019 at 14:48
  • I have set it to 115200 but I still have the same result Oct 18, 2019 at 9:00

1 Answer 1

0

You have change baud rate by at+iprex=9600 before upload your code, because sim7600 set 115200 by default then save your setting by at&w.

hope this help someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.