i am using sim800l gsm module with nodemcu esp8266 and comunicating with it using AT+ commands, the module is working correctly but i am trying to use the command AT+CLCC to get all the current calls's state but it response with only the first call information and a part of the second call.
this is the response while there is two active calls
i think it is the Serial buffer's problem because the size of the serial buffer is 64 byte and the response is more than that but i don't know how to handle that
#include <SoftwareSerial.h>
#include <cstring>
#include <Arduino.h>
#define simTX D3
#define simRX D4
SoftwareSerial sim800l(simRX, simTX); //RX, TX
void setup() {
Serial.begin(115200); //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
sim800l.begin(115200); //Begin serial communication with Arduino and SIM800L
}
void loop() {
updateSerial();
}
//Start
// this method takes input from the serial monitor the pass it to sim800l via serial communication
void updateSerial() {
delay(500);
while (Serial.available()) {
sim800l.write(Serial.read()); //Forward what Serial received to Software Serial Port
}
while (sim800l.available()) {
Serial.write(sim800l.read()); //Forward what Software Serial received to Serial Port
}
}
//End
The baudrate of the ESP's Serial monitor and the SIM800L are 115200 and i am using <SoftwareSerial.h> library and it is working perfectly in all the commands except the AT+CLCC its response is not completed
this is a program I used to communicate with a UNO using a SIM800L
// SIM800l AltSoftSerial test
#include <AltSoftSerial.h>
// Mega SIM800l test
//SIM800L 5V POWER to Mega 5V
//SIM800L GND POWER to Mega GND
//SIM800L TXD to Mega RX pin 48
//SIM800L RXD to Mega TX pin 46
//SIM800L VDD to Mega 5V
//SIM800L UART TTL GND and RST not connected
//SIM800L TXD to UNO RX pin 8
//SIM800L RXD to UNO TX pin 9
// taking the RST pin to GND for a couple of seconds which will reset the device
// RS232 shield
// RS232 TXD to UNO pin 9
// =[===RS232 RXD to UNO pin 8
AltSoftSerial simSerial;
void setup() {
Serial.begin(115200);
Serial.println("AltSoftSerial test");
//Begin serial communication with Arduino and SIM800L
simSerial.begin(9600);
Serial.println("SIM module intialized");
}
void loop() {
if (Serial.available()) {
char command = Serial.read();
//Serial.println(command);
simSerial.print(command);
}
while (simSerial.available()) {
char reponse = simSerial.read();
Serial.print(reponse);
}
}
running on a UNO the Serial Monitor displays in response to commands
AT
OK
AT+CGMI
SIMCOM_Ltd
OK
AT+CGMM
SIMCOM_SIM800L
Sorry not manufacturer, but all the references that i found like what i mentioned in the last reply.
and that is recommended to wait untill the sim800 sends all the data