Open FlasterX opened 2 years ago
Hi, you understood which are RX and TX pin connected between ESP32 and SIM800L?
I have also bought what seems to be the same board and I have no success with the demo code.It seems like it has nothing to read from the SerialAT. I believe TX and RX should be set according to sketch attached to this issue, which is 26&27. Anyways, even flipping these didn't work.
I wonder, the gpio's 26&27 this refers to the ESP right, not to the SIM Module?
Does anyone have a working example for this board? It seems to be like a weird mix of v1.4 PCB, but with the old SIM800L module, perhaps this messed up the wiring?
it's my working code for ESPHOME:
esphome: name: combinatoregsm
ota: safe_mode: true
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
esp32: board: esp32dev framework: type: arduino
logger:
api: services:
text_sensor:
binary_sensor:
uart:
baud_rate: 9600 tx_pin: 27 rx_pin: 26
switch:
sensor:
sim800l: on_sms_received:
I don't know the details but this setup function solved my problem:
void setup()
{
SerialMon.begin(9600);
delay(10);
if (setupPMU() == false) {
Serial.println("Setting power error");
}
setupModem();
SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX);
SerialMon.println("Initializing modem...");
modem.restart();
delay(10000);
SerialAT.println("AT+CSMP=17,167,0,8");
updateSerial();
delay(500);
String imei = modem.getIMEI();
DBG("IMEI:", imei);
bool res = modem.sendSMS(SMS_TARGET, String("Hello") + imei);
DBG("SMS:", res ? "OK" : "fail");
}
The key line is : SerialAT.println("AT+CSMP=17,167,0,8"); Apparently it should be the default but with some network providers you need to send it again.
@ArashIranfar i have the same probleme, can you give the code of updateSerial() please ? is it personal code or somthing coming from utilities.h ?
Best Regards
I made no changes to the updateSerial() function. It is the normal one you see in every Sim800 example:
void updateSerial(){ while (Serial.available()){ SerialAT.write(Serial.read());//Forward what Serial received to Software Serial Port } while (SerialAT.available()){ Serial.write(SerialAT.read());//Forward what Software Serial received to Serial Port } }
Also check the local forums to see if the module is compatible with your local service provider. In my region there are 3 SPs and only one requires the following line:
SerialAT.println("AT+CSMP=17,167,0,8");
Hello I have bought a lilygo TCALL SIM800L 1.4 version but the SMS send fonction doesn't work with the exemple on github. Does anyone have a solution ?
I have used this code :