# Unable to communicate with SIM7600G-H (ESP32)

**URL:** <https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448>\
**Category:** General Guidance\
**Created:** [October 27, 2022, 1:33am UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448 "2022-10-27T01:33:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssimm](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ssimm/32/706386_2.png) [@ssimm](https://forum.arduino.cc/u/ssimm)\
**Post date:** [October 27, 2022, 1:33am UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/1 "2022-10-27T01:33:48Z")

</div>

Hello all...

I am attempting to communicate with a SIM7600 from Waveshare (doc: [https://www.waveshare.com/wiki/SIM7600E-H\_4G\_HAT](https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT)) (schematic: [https://www.waveshare.com/w/upload/c/c8/SIM7600E-H-4G-HAT-Schematic.pdf](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:

```cpp
#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...

```cpp
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:

```cpp
RDY

+CPIN: READY

SMS DONE

PB DONE

```

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

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [October 27, 2022, 1:42am UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/2 "2022-10-27T01:42:27Z")

</div>

some advice

```cpp
#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.

---

<div class="post-metadata">

**Author:** ![ssimm](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ssimm/32/706386_2.png) [@ssimm](https://forum.arduino.cc/u/ssimm)\
**Post date:** [October 27, 2022, 2:38am UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/3 "2022-10-27T02:38:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [October 27, 2022, 9:41am UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/4 "2022-10-27T09:41:30Z")

</div>

Sorry my message got lost. Good luck.

---

<div class="post-metadata">

**Author:** ![ssimm](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ssimm/32/706386_2.png) [@ssimm](https://forum.arduino.cc/u/ssimm)\
**Post date:** [October 27, 2022, 10:47pm UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/5 "2022-10-27T22:47:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 25, 2023, 10:50pm UTC](https://forum.arduino.cc/t/unable-to-communicate-with-sim7600g-h-esp32/1046448/7 "2023-04-25T22:50:17Z")

</div>

Closed on April 25, 2023, 10:50pm UTC

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