Weird characters from LTE module A7670C

I recently bought an LTE module SIM A7670C online when connected to my laptop with a USB-TTL adapter with a baud rate of 115200, I can communicate with the module without any issues, I can send and view SMS and also make and receive phone calls as all AT commands seem to work fine. However, when connected to an Arduino UNO to Pins 1 and 2, I see these weird characters appear on the serial monitor as a response every time I send an AT command or when I receive a call or text. I know the baud rate is correct, the connections are correct, and that the module works fine.
Here is what I receive when I type "AT," ����Q(�+'�RH� ���RJ��

Here is my program:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(1, 2);
void setup() {
    Serial.begin(9600);
    mySerial.begin(115200);
    Serial.println("started");
    char msg[100];
    sendATcommand("AT", msg);
    Serial.println(msg);
}
void loop() {
    while(Serial.available()) {
        mySerial.write(Serial.read());
    }
    while(mySerial.available()) {
        Serial.write(mySerial.read());
    }
}
int sendATcommand(const char* ATcommand, char* gsmMsg) {
  char *ptr = gsmMsg;
  mySerial.write(ATcommand);
  delay(500);
  while(mySerial.available() > 0) {
    *ptr = mySerial.read();
    ptr++;
  }
  *ptr = '\0';
  return ptr - gsmMsg;
}

I've tried to recreate the same circuit with a SEEED Xiao SAMD 21, but unfortunately I'm still having the same issue.

Update: I don't have the same issue when using the SIM 800L module with the same SIM card. The characters appear just fine on the Serial monitor and even Putty. Both the SIM 800L and the Arduino were set to a baud rate of 9600.

More info: I know that any AT command being sent to the module does not work either. I tried ATD+12065551234; and no call was made but I did get a response from the module with more weird characters. Also, when I dial the phone number of the SIM card in the module, I see more weird characters at regular intervals. When using Putty, I saw "RING" being displayed every second or so I'm assuming this could be it but with a different encoding?

Software serial is unreliable at anything over 38400 baud. You will need to set the default baud rate of the A7670 to match.

Not usually a good idea to use pins 0 or 1 as they are used by the serial monitor. Try 2 & 3.

Thank you for your response red_car,

I used the USB-TTL adapter to connect to the modem and using the command, AT+IPR=0 to enable autobauding and then connected it to the microcontroller with a baud rate of 9600 in the program for both devices. Now, it works flawlessly!
I'm not sure why this was not already enabled since I've tried using 9600 in the program. Sorry about the incorrect pin declaration, I was using the SEEED Xiao SAMD 21 when writing this question hence the pins 1 and 2 were used in the program. Thank you again for your help!

For anyone else viewing this, if this solution does not work, or you don't get a response similar to Autobaud support: (9600,19200,38400,57600,115200)' you can set the baud rate to something like 9600 using the command, AT+IPR=9600` or by setting another baud allowed by your module.

Pretty sure this will be lost on a power cycle.

I'm not familiar with the A7670C, but for other 7600 modules AT+IPREX is a better command to use. This is non volatile.

Thank you for your reply red_car,

I looked into the AT+IPREX command and it seems more appropriate than the AT+IPR command that I've been using. Also, the AT+IPR=0 autobauding command does not seem to be lost on a power cycle even after trying it several times.

Additionally, let's say I replace the module with another module of the same type, since autobauding is not enabled by default, I might need to first send the command using another method like the USB-TTL connector to first enable autobauding or fix the baud rate before it starts to work with my old program. Is there any other method to make this work other than having to program the module first?

Thanks again!

Not that I know of. The initial baud rate is usually set in the factory... often 115200. But if you are using Software Serial for example, then this rate likely wont work... so manually configuring the device first is usually the only way.

1 Like

Thank you for your help @red_car!

I'm also using the same module but when i connect A7670C with CP2102 USB to serial TTL then it works perfectly fine on baudrate of 115200 butwhen i do same connection with arduino i'm unable give AT commands to serial terminal why?

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