Hello, I wanted to ask if anyone could help me with this problem. I'm trying to receive an SMS with the SIM800L With ESP32 Wrover B. However, I always get a "box" as output as soon as I send a message to the ESP32, which is then repeatedly entered.
I got my AT commands from this website: GSM-spezifische AT-Kommandos.
The ESP32 is connected via USB-C.
Picture from ESP32:
CODE:
#define SIM800L_RX 27
#define SIM800L_TX 26
#define SIM800L_PWRKEY 4
#define SIM800L_RST 5
#define SIM800L_POWER 23
void setup()
{
pinMode(SIM800L_POWER, OUTPUT);
digitalWrite(SIM800L_POWER, HIGH);
Serial.begin(115200);
Serial.println("ESP32+SIM800L AT CMD Test");
Serial2.begin(9600, SERIAL_8N1, SIM800L_TX, SIM800L_RX);
Serial.println("Initializing...");
delay(10000);
Serial2.println("AT");
updateSerial();
Serial2.println("AT+CMGF=1");
updateSerial();
Serial2.println("AT+CNMI=1,2,0,0,0");
updateSerial();
}
void loop() {
updateSerial();
}
void updateSerial()
{
delay(500);
while (Serial.available()) {
// Forward what Serial received to Software Serial Port
Serial2.write(Serial.read());
}
while(Serial2.available()) {
// Forward what Software Serial received to Serial Port
Serial.write(Serial2.read());
}
}
You are seeing the ASCII codes for what is being printed
65 A
84 T
13 Carriage Return
13 Carriage Return
10 Linefeed
79 O
75 K
13 Carriage Return
10 Linefeed
65 A
84 T
43 +
67 C
77 M
71 G
70 F
61 =
49 1
13 Carriage Return
13 Carriage Return
10 Linefeed
79 O
75 K
13 Carriage Return
10 Linefeed
and so on
There is no sign of the output that is causing the "boxes", which is what I was hoping to see
While controlling a SIM800 via serial commands directly is not that hard, I would recommend looking into one of the pre-written libraries that support this module. Here's one:
The AT command documentation you're relying on is pretty dated -- for example it talks about Nokia 6110 FBus commands. I think you would do well to refer to the documentation specific to the SIMCom SIM800 module. I found this: