SIM7000 responds to AT commands over USB but not UART connection

Hey all,
I have been using an AND-Tech SIM7000A breakout (www.and-global.com) for a couple months and it's worked just as expected. I bought another SIM7000A and a SIM7000G on AliExpress (from a user that claims, and does legitimately appear to be AND-Tech itself) and when I hook them up to the breakout pins, they power up, net light blinks, do NOT seem to connect using a known good SIM card, but sending AT commands does nothing.

My test setup using my working SIM7000A works great. When I unplug it and plug in the new A or G I get no responses. It would make sense that 1 might be dead on arrival, but both doesn't seem likely. When I connect them using USB and PuTTY, they respond normally.

I just read somewhere about trying a factory reset AT&F, but other than that...? I did possibly have the pins going from the SIM to my arduino incorrect the first time I hooked them up but it seems very unlikely that I fried just the UART connection by having the Rx pin hooked up to D2 (set input_pullup and has an ISR attached to it) instead of D3.

Any ideas are appreciated, but as far as checking whether pins/connections are right, yes they are right.

1 Like

Get them replaced. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Thanks for the response Gil.

SOLUTION:

I messaged the seller on AliExpress (which it turns out, is in fact AND-Global.com) and they gave me an engineer to talk with. He asked me to try connecting to the module at baud rate 115200. I was surprised because

  1. I wasn't getting "garbage" back from the board as you often do with incorrect baud settings, I was getting nothing
  2. The SIM7000 series modules are supposed to be auto-bauding at several rates including 9600, which is what I have always used

Lo and behold, it worked! I am at once very happy and pretty pissed that I wasted MANY hours on this. I will have to make sure every board I order from them I initialize before use (which I was kind of doing anyway).

I have exaxtly the same board(sim7000e) and the same problem. AT commands do not respond over UART. i have set the serial to 115200 to no avail. I want to find out what i'm doing wrong here. Do you have a code snippet?

bork468:
I have exaxtly the same board(sim7000e) and the same problem. AT commands do not respond over UART. i have set the serial to 115200 to no avail. I want to find out what i'm doing wrong here. Do you have a code snippet?

Ok here's something like what I have for initializing boards I use. Be sure your TX/RX pins are right, I don't think there's harm in reversing them to make sure. For each board I buy, I initialize it with my init program, then in my actual program, i use setupSimCom() to connect to it as part of setup().

Oh, speaking of TX/RX, I'm using an Arduino Nano here - there's some deal with different boards needing to use different pins for TX/RX. It's been so long I can't remember exactly what it is, but Adafruit's tutorial, specifically reading this page this might help:

I'm using the Adafruit FONA library. Well actually it was extended by Botletics and then by me but I think the code below only uses stuff from Adafruit, so I recommend just using their library.

#include "Adafruit_FONA.h"
#include <SoftwareSerial.h>

#define SIMCOM_RX_PIN 3
#define SIMCOM_TX_PIN 4

SoftwareSerial SimComSS = SoftwareSerial(SIMCOM_TX_PIN, SIMCOM_RX_PIN);
SoftwareSerial *SimComSerial = &SimComSS;

Adafruit_FONA fona = Adafruit_FONA(99);

void setup() {
  while (!Serial);
  Serial.begin(9600);
  initBaud();
  sendRawCommand(F("AT+CCLK?"));
}

void loop() {}

void initBaud() {
  Serial.println(F("Init Baud"));
  Serial.println(F("Trying to connect at 9600"));
  SimComSerial->begin(9600);

  if (! fona.begin(*SimComSerial)) {
    Serial.println(F("Trying to connect at 115200"));
    SimComSerial->begin(115200);
    
    if (! fona.begin(*SimComSerial)) {
      Serial.println(F("ERROR: Could not connect at 9600 or 115200"));
      return;
    } else {
      Serial.println(F("Connected at 115200, setting to 9600..."));
      sendRawCommand(F("AT+IPR=9600"));
      SimComSerial->begin(9600);
    }
  } else {
    Serial.println(F("Connected at 9600"));
    return;
  }
}

void sendRawCommand(const __FlashStringHelper* command) {
  Serial.println(command);
  fona.println(command);
  delay(1000);

  if (fona.available()) {
    flushSimCom();
  }
  delay(1000);
}

void flushSimCom() {
  while (fona.available())
    Serial.write(fona.read());
}

void setupSimCom() {
  // Give SimCom module some time to power up and become responsive...
  Serial.println(F("Connect to SimCom"));
  SimComSerial->begin(9600);

  for (int8_t i = 0; i < 3; i++) {
    fona.begin(*SimComSerial);

    if (fona.getNumSMS() >= 0) {
      Serial.println(F("\nSuccess"));
      return;
    }
    delay(5000);
  }
}

and here's the output if your baud isn't right and the above script fixes it. Notice the sending of AT+CCLK? command at the end successfully returns a valid time.

11:56:47.501 -> Init Baud
11:56:47.501 -> Trying to connect at 9600
11:56:47.501 -> Attempting to open comm with ATs
11:56:47.501 ->     ---> AT
11:56:47.501 ->     <--- 
11:56:47.501 ->     ---> AT
11:56:47.501 ->     <--- 
11:56:47.501 ->     ---> AT
11:56:49.143 -> Init Baud
11:56:49.143 -> Trying to connect at 9600
11:56:49.176 -> Attempting to open comm with ATs
11:56:49.211 ->     ---> AT
11:56:49.709 ->     <--- 
11:56:49.747 ->     ---> AT

...lots of this...

11:57:10.668 ->     <--- 
11:57:10.740 ->     ---> AT
11:57:11.237 ->     <--- 
11:57:11.736 -> Timeout: No response to AT... last ditch attempt.
11:57:11.803 ->     ---> AT
11:57:12.299 ->     <--- 
11:57:12.443 ->     ---> AT
11:57:12.972 ->     <--- 
11:57:13.082 ->     ---> AT
11:57:13.610 ->     <--- 
11:57:13.752 ->     ---> ATE0
11:57:14.280 ->     <--- 
11:57:14.421 ->     ---> ATE0
11:57:14.917 ->     <--- 
11:57:14.917 -> Trying to connect at 115200
11:57:14.954 -> Attempting to open comm with ATs
11:57:15.028 ->     ---> AT
11:57:15.483 ->     <--- OK
11:57:15.519 ->     ---> AT
11:57:16.046 ->     <--- OK
11:57:16.600 ->     ---> AT
11:57:16.600 ->     <--- OK
11:57:16.636 ->     ---> ATE0
11:57:17.161 ->     <--- OK
11:57:17.305 ->     ---> ATE0
11:57:17.305 ->     <--- OK
11:57:17.411 ->     ---> ATI
11:57:17.941 ->     <--- SIM7000A R0351
11:57:17.941 -> C⸮j⸮H⸮
11:57:17.941 ->     ---> AT+CPMS="SM","SM","SM"
11:57:17.979 ->     <--- +CPM*'⸮b⸮⸮b⸮b⸮⸮b⸮b⸮⸮j
11:57:18.012 -> Connected at 115200, setting to 9600...
11:57:18.083 -> AT+IPR=9600
11:57:19.024 -> 
11:57:19.024 -> OK
11:57:19.024 -> AT+CCLK?
11:57:21.054 -> 
11:57:21.054 -> +CCLK: "20/06/16,11:57:19-20"
11:57:21.088 -> 
11:57:21.088 -> OK

Thank you for the reply,

i've tried it with an Arduino UNO at ports 3&4 but it wont connect. However i am able to post data with a usb connection via the serial monitor.(by just manually typing in AT commands).

you were using a breakoutboard sim7000 im i right? and not the Biotletics shield.
(i use this one: https://www.aliexpress.com/item/32841276164.html?spm=a2g0s.9042311.0.0.71574c4d21n6mv)

error arduino uno.png

update: i connected 5 volt to the sim7000 and it seems to work!

thanks for your help!

your examples really helped!

This may be a bit of topic, do you how to use hardwareserial instead of sofwareserial in your example?
My esp32 is not compatible with softwareserial :frowning:

Oh man, yeah, you gotta connect power and ground, I shouldn't have assumed you already did! In making the little sketch for you above I found a potential bug in my own code, so win/win!

I'm using the same board except the America / Global versions. I haven't used hardware serial. Ask on the Botletics forum maybe, or maybe here...