# How do I get clean AT Command Output on my ESP32 38 PINS and my SIMA7670E? Using Arduino IDE at Serial Monitor

**URL:** <https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896>\
**Category:** General Guidance\
**Created:** [October 28, 2025, 7:37am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896 "2025-10-28T07:37:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 7:37am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/1 "2025-10-28T07:37:53Z")

</div>

Hi, I just wanted to ask a help regarding my project. I need to send data using my ESP32 38 Pins and SIMA7670E GSM Module. I tried AT command testing via PC, and it went well. However, whenever I've tried to test the AT Commands with ESP32, it shows unreadable text.

My A7670E pins are: VCC, GND, RXD, TXD, VDD, PWR\_EN, GND

Here's how I connected their wires:  
A7670E VCC TO EXTERNAL 5V 2.4A  
A7670E GND TO EXTERNAL GND  
ESP32 GND TO COMMON GND (WHERE EXTERNAL GND IS CONNECTED)

A7670E RXD TO GPIO19 TX  
A7670E TXD TO GPIO 18 RX  
A7670E PWR\_EN TO GPIO4

I TRIED USING A DIFFERENT BAUD RATE, BUT IT WAS STILL UNREADABLE  
HERE IS THE CODE I USE TO RUN IN ARDUINO IDE

```arduino
#include "HardwareSerial.h"

HardwareSerial simSerial(2); // UART2 for GSM

const int PWR_EN = 4; // GPIO4 controls module power

void setup() {
  Serial.begin(115200);                   
  simSerial.begin(115200, SERIAL_8N1, 19, 18); // RX=19, TX=18
  pinMode(PWR_EN, OUTPUT);

  Serial.println("Starting ESP32 -> A7670E Auto Test...");

  // Power on GSM module
  Serial.println("Powering on A7670E...");
  digitalWrite(PWR_EN, HIGH); // Pulse HIGH to power on
  delay(1000); // Hold for 1 second
  digitalWrite(PWR_EN, LOW); // Release
  delay(3000); // Wait for module to start

  // Test commands
  sendATCommand("AT");
  sendATCommand("AT+CSQ");
  sendATCommand("AT+CREG?");
}

void loop() {
  // Forward A7670E responses to Serial Monitor
  while (simSerial.available()) {
    char c = simSerial.read();
    Serial.write(c);
  }
}

// Helper function to send AT command and display response
void sendATCommand(String cmd) {
  Serial.print("Sending: ");
  Serial.println(cmd);
  simSerial.println(cmd);
  delay(1000); // Wait for response
  while (simSerial.available()) {
    char c = simSerial.read();
    Serial.write(c);
  }
  Serial.println("\n-------------------");
}

```

I hope someone can help me fix the unreadable text (gibberish text)

THIS IS THE ESP32 I HAVE:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/9/d/19da0d54113105a8d9e2e4efc676a48567a81775.jpeg)

THANK YOU GUYS!

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [October 28, 2025, 7:47am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/2 "2025-10-28T07:47:00Z")

</div>

try a simple program where you enter AT commands and check for response  
e.g. change GPIOs to suit your setup

```cpp
// ESP32 Serial1 test - for loopback test connect pins RXD1 and TXD1

#define RXD1 16 // can map Serial1 and Serial2 to many ESP32 GPIO pins
#define TXD1 17 // check pin usage https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

// for RS232 shield connect
// ESP32 RXD1 to TTL/RS232 Rx
// ESP32 TXD1 to TTL/RS232 Tx
// connect GND pins together and VCC to 3.3V on ESP32 5V on UNO ect
// for loopback test connect 9-pin D_type connector pins 2 Tx to 3 Rx (pin 5 is GND)

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
  Serial.printf("\n\nESP32 serial1 test RXD1 pin %d TXD1 pin %d\n", RXD1, TXD1);
  Serial.printf(" loopback test connect pin %d to pin %d\n", RXD1, TXD1);
  Serial.printf("RS232: ESP32 pin %d RXD1 to TTL/RS232 Rx and pin %d TXD1 to TTL/RS232 Tx\n", RXD1, TXD1);
  Serial.printf("RS232 - loopback connect 9-pin D-type pin 2 Tx to pin 3 Rx\n");
}

void loop() {
  // read from Serial1, send to Serial
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }
  // read from Serial, send to Serial1
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte); // local echo if required
    Serial1.write(inByte);
  }
}

```

serial monitor output when AT commands entered

```arduino
*ATREADY: 1

+CPIN: SIM REMOVED
AT
OK
AT+CGMI
SIMCOM INCORPORATED
OK
AT+CGMR
+CGMR: A131B03A7670M6C
OK
AT+CGMM
A7670E-LASA
OK
AT+CSQ
+CSQ: 16,99
OK

```

---

<div class="post-metadata">

**Author:** ![ua6em](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ua6em/32/930389_2.png) [@ua6em](https://forum.arduino.cc/u/ua6em)\
**Post date:** [October 28, 2025, 7:50am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/3 "2025-10-28T07:50:46Z")

</div>

> [@danuzu](#):
>
> `A7670E`

Did you connect the module via a converter?

 ![cjnv](https://europe1.discourse-cdn.com/arduino/original/4X/0/1/a/01a75aaa90d67e6d761139ab98f6c111a643ae6e.png)

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [October 28, 2025, 7:51am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/4 "2025-10-28T07:51:34Z")

</div>

> [@danuzu](#):
>
> I tried AT command testing via PC, and it went well.

How did you connect and power the module then and what baud rate did you use?

---

<div class="post-metadata">

**Author:** ![lastchancename](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lastchancename/32/215426_2.png) [@lastchancename](https://forum.arduino.cc/u/lastchancename)\
**Post date:** [October 28, 2025, 8:02am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/5 "2025-10-28T08:02:56Z")

</div>

Which modem module did you use, or did you use a bare chip ?

Quote the module data or website.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [October 28, 2025, 8:07am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/6 "2025-10-28T08:07:53Z")

</div>

Sounds like a serial comms problem, or at least that should be an easier/quicker fix!

Can you run at a lower baud rate, like half and if it does then increase a bit at a time until it doesn’t.

If you have a serial cable, shorter runs faster.

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 8:30am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/7 "2025-10-28T08:30:46Z")

</div>

I tried it, yet it still outputs unreadable text

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/5/b/8/5b8bc70cf0f5894cb78ec3e347436e7a73548c13.png)  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/1/2/212a0858a4511a5d33f7f01f5cd8a9ec16d36cd0.jpeg)

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 8:32am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/8 "2025-10-28T08:32:46Z")

</div>

No, I’m connecting the module directly to ESP32 using Serial1 pins; no USB-to-Serial converter is used.

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [October 28, 2025, 9:05am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/9 "2025-10-28T09:05:24Z")

</div>

could you send a link to the specific SIMA7670 you are using?

could you have the Tx and Rx lines the wrong way around?

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 9:06am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/10 "2025-10-28T09:06:51Z")

</div>

I tried all of this, but nothing happens. I don't understand what the problem 😅

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 9:11am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/11 "2025-10-28T09:11:07Z")

</div>

> **[SIMCOM A7670E 4G LTE Cat1 Module 4G LTE Cat1 Module with SIM Card Slot TTL...](https://www.lazada.com.ph/products/simcom-a7670e-4g-lte-cat1-module-4g-lte-cat1-module-with-sim-card-slot-ttl-uart-2g-lte-fdd-b1b3b5b7b8b20-gsm-9001800mhz-i5187709308.html)**
>
> Acmdehk. SIMCOM A7670E4G LTE Cat1 Module 4G LTE Cat1 Module with SIM Card Slot TTL UART 2G LTE-FDD B1/B3/B5/B7/B8/B20 GSM 900/1800MHz. A7670E. The A7670 series is the LTE Cat 1 module which supportswireless communication modes of...

I used this kind of A7670E GSM Module  
I do it this way:  
TX ----\> RXD  
RX ----\> TXD

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 9:16am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/12 "2025-10-28T09:16:57Z")

</div>

Simcom A7670E 4G LTE Cat1 Module

> **[Cenei SIMCOM A7670E 4G LTE Cat1 Module A7670E 4G LTE Cat1 Module with SIM Card...](https://www.amazon.co.uk/Cenei-SIMCOM-A7670E-LTE-FDD-1800MHz-Green/dp/B0F7LVJT2P)**
>
> (Different batches may have slight differences in appearance, which not affect the use)Small size LTE Cat 1 moduleLGA form factor with abundant interfacesSuitable for LTE and GSM networksAbundant software functions: FOTA, LBS, The form factor of...

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [October 28, 2025, 9:27am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/13 "2025-10-28T09:27:01Z")

</div>

the website presents a lot of nice pictures but no information on connections and how to use the device, e.g. are the Tx and Rx 3.3V logic or 5V logic?  
ask the vendor where you purchased the specific SIMA7670 module for a datasheet?

does the serial monitor continuously print garbage or does it stop after a time?

can you upload a photo of the setup?

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [October 28, 2025, 9:33am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/14 "2025-10-28T09:33:45Z")

</div>

could you answer this?

> [@J-M-L](#):
>
> How did you connect and power the module then and what baud rate did you use?

---

<div class="post-metadata">

**Author:** ![b707](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/b707/32/854321_2.png) [@b707](https://forum.arduino.cc/u/b707)\
**Post date:** [October 28, 2025, 9:45am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/15 "2025-10-28T09:45:02Z")

</div>

> [@danuzu](#):
>
> A7670E RXD TO GPIO19 RX  
> A7670E TXD TO GPIO 18 TX

@danuzu  
Your connection is incorrect, you need to wire Rx on one side to the Tx on the another, and vice versa.

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 9:55am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/16 "2025-10-28T09:55:31Z")

</div>

Sorry for the late reply,

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/1/2/212a0858a4511a5d33f7f01f5cd8a9ec16d36cd0.jpeg)  
for baud rate I used 115200

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 9:57am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/17 "2025-10-28T09:57:27Z")

</div>

my bad i got confused and typed it incorrectly. 😅

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [October 28, 2025, 10:39am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/18 "2025-10-28T10:39:35Z")

</div>

While connected to the PC - can you actually send AT commands to see the baud rate? AT+IPR? might work; otherwise, try to force the baud rate to 115200 with AT+IPR=115200 or enable auto-bauding with AT+IPR=0.

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 10:59am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/19 "2025-10-28T10:59:34Z")

</div>

These are the AT Commands I tried to:  
DRIVERS  
SimTech HS-USB Modem 9011  
SimTech HS-USB AT Port 9011 (COM7)  
SimTech HS-USB Diagnostics 9011 (COM8)

AT  
OK

ATE0  
OK

ATI  
Manufacturer: INCORPORATED  
Model: A7670E-LASE  
Revision: A7670M7\_V1.11.1  
IMEI: 863957077837455  
+GCAP: +CGSM,+FCLASS,+DS  
OK

AT+CPIN?  
+CPIN: READY  
OK

AT+CCID  
ERROR

AT+CSQ  
+CSQ: 18,99  
OK

AT+CREG?  
+CREG: 0,1  
OK

AT+COPS?  
+COPS: 0,2,"51503",7  
OK

AT+CGATT?  
+CGATT: 1  
OK

AT+CGDCONT?  
+CGDCONT: 1,"IP","SMARTLTE.MNC003.MCC515.GPRS","10.138.166.117",0,0,,,,  
+CGDCONT: 8,"IP","IMS","10.252.115.58",0,0,0,2,1,1  
OK

AT+QNWINFO  
+QNWINFO: "FDD LTE",51503,"LTE BAND 1",150  
OK

---

<div class="post-metadata">

**Author:** ![danuzu](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/danuzu/32/1242878_2.png) [@danuzu](https://forum.arduino.cc/u/danuzu)\
**Post date:** [October 28, 2025, 11:17am UTC](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896/20 "2025-10-28T11:17:55Z")

</div>

![image](https://europe1.discourse-cdn.com/arduino/original/4X/4/a/b/4ab94cd45ccaa5daa9b65bbb415c08532720b573.png)  
Continuously print garbage, I'll upload later my phone got low battery so I can't take a photo

[Next page](https://forum.arduino.cc/t/how-do-i-get-clean-at-command-output-on-my-esp32-38-pins-and-my-sima7670e-using-arduino-ide-at-serial-monitor/1410896.md?page=2)
