The problem is that I'm not get any reasonable replies back to ESP from SIM800L module
Code: Select all
//#define TINY_GSM_MODEM_SIM7080
#define TINY_GSM_MODEM_SIM800
#include <HardwareSerial.h>
#include <TinyGsmClient.h>
#define SerialMon Serial
HardwareSerial gsmSerial(2);
TinyGsm modem(gsmSerial);
TinyGsmClient client(modem);
void setup() {
// Set console baud rate
SerialMon.begin(9600);
delay(10);
SerialMon.println("Wait...");
gsmSerial.begin(9600, SERIAL_8N1, 16, 17); //
SerialMon.println("Initializing modem...");
//modem.restart();
modem.init();
delay(2000);
String modemInfo = modem.getModemInfo();
SerialMon.print("Modem Info: ");
SerialMon.println(modemInfo);
}
void loop() {
SerialMon.println("Sending AT command...");
delay (1000);
String IMEI = modem.getIMEI();
Serial.print ("IMEI:");
Serial.println (IMEI);
}
}The first line (black) is connected to PIN17 and line 2. is directly connected to RXD in SIM800L module
esp32 17 -> SIM800L RXD
SIM800L TXD-> esp32 16
---- added ----
The common ground for SIM and ESP cleared the situation. Now is working....