Unable to communicate with SIM7600G-H (ESP32)

Hello all...

I am attempting to communicate with a SIM7600 from Waveshare (doc: https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT) (schematic: https://www.waveshare.com/w/upload/c/c8/SIM7600E-H-4G-HAT-Schematic.pdf) via my ESP32 using Serial2. I have tested the SIM7600 with PuTTy (via USB to UART connection) and can confirm baud of 115200 and I was able to verify a few different commands that way. However, whenever I attempt to talk to it over the ESP32 serial pins, I don't get any responses when I send data (will put code and terminal info down below). What's interesting is if I power cycle the SIM7600, I see its boot up checks just fine (also below). I know this also is not a SIM7600 power supply issue as others have mentioned on the forums - I have a 5V 2.4A supply so that should be plenty.
Here are my connections:
ESP32 PIN 16 (RX) -> SIM7600 Control Interface PIN 3 (TXD)
ESP32 PIN 17 (TX) -> SIM7600 Control Interface PIN 4 (RXD)
SIM7600 UART Jumper: Position B (have tried the others as well)
Additional note if anyone needs to know...I am using VS Code PlatformIO.

Here is my code:

#include <Arduino.h>
#include "stdio.h"
#include "string.h"
  
#define DEBUG true

String sendData(String command, const int timeout, boolean debug)
{
  String response = "";
  Serial2.println(command);
   
  long int time = millis();
  while ( (time + timeout) > millis())
  {
    while (Serial2.available())
    {
      char c = Serial2.read();
      response += c;
    }
  }
  if (debug)
  {
    Serial.println("debug...");
    Serial.print(response);
  }
  return response;
}

bool moduleStateCheck()
{
    int i = 0;
    bool moduleState = false;
    for (i = 0; i < 5; i++)
    {
        String msg = String("");
        msg = sendData("AT", 1000, DEBUG);
        if (msg.indexOf("OK") >= 0)
        {
            Serial.println("SIM7600 Module had turned on.");
            moduleState = true;
            return moduleState;
        }
        delay(1000);
    }
    return moduleState;
}
  
void setup()
{
  Serial.begin(9600);
  //Serial2.begin(115200);
  Serial2.begin(115200, SERIAL_8N1, 16, 17);
  delay(3000);
  Serial.println("4G HTTP Test Begin!");
  delay(1000);
}
  
void loop()
{
  Serial.println("Lets test the SIM7600");
  delay(1000);
  Serial.println("Sending...");
  sendData("AT",2000,DEBUG);
  delay(5000);   
}

Here is what the terminal is showing while running the code...

Lets test the SIM7600
Sending...
debug...
AT
Lets test the SIM7600
Sending...
debug...
AT
Lets test the SIM7600
Sending...
debug...
AT

Here is what I see after power cycling the SIM7600:

RDY

+CPIN: READY

SMS DONE

PB DONE

Any advice would be greatly appreciated!!
Thanks in advance!

1 Like

some advice

#include <HardwareSerial.h>

HardwareSerial SerialTFMini( 1 );
HardwareSerial SerialBrain( 2 );

voided setup()
{

  Serial.begin( SerialDataBits );
  SerialBrain.begin( SerialDataBits );
  SerialTFMini.begin(  SerialDataBits, SERIAL_8N1, 27, 26 );

}

SerialBrain is using the default Rx/Tx pins of GPIO_NUM_16 and GPIO_NUM_17.

Hello @Idahowalker,

I'm not sure what you are trying to point out other than that Serial 2 will default to using GPIO16 and GPIO17?

Sorry my message got lost. Good luck.

Feel free to explain it further if I am missing the point...

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