I am on a very exciting project, by the SIM800L module is resisting hard !
The hardware :
- clone arduino nano (dx.com)
- SIM800L module + antenna (dx.com)
- Lipo battery 3.7V 150mAh (letmeknow.com)
The problem :
the SIM800L module does not respond to AT commands.
In detail, sometimes the serial is available, put print nothing on the Serial monitor.
The code :
#include <SoftwareSerial.h>
String Arsp, Grsp;
SoftwareSerial gsm(11, 12); // RX, TX
void setup() {
Serial.begin(9600);
Serial.println("Setup");
Serial.println("Testing GSM SIM800L");
pinMode(LED_BUILTIN, OUTPUT);
gsm.begin(9600);
}
void loop() {
// turn on the led
digitalWrite(LED_BUILTIN, HIGH);
if(gsm.available())
{
Serial.println("gsm available");
Grsp = gsm.readString();
Serial.println(Grsp);
Serial.println("gsm available end");
}
if(Serial.available())
{
Arsp = Serial.readString();
Serial.println("Serial available");
Serial.println(Arsp);
gsm.println(Arsp);
Serial.println("Serial available end");
}
// turn off the led
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
My trials & errors so far :
- I took care of correctly powering the SIM800L with proper voltage.
- all ground are common (battery and arduino).
- rx to tx and tx to rx checked 100 times.
- changing pin numbers also.
- the sim inserted is connected to network sometimes, but not always. When connected, I can call the number and I hear the correct "ring" tone in the line.
- the led of the sim800L module is blinking slowly when connected. But 50% of the time it's also blinking 1 Hz like it's looking for network.
- the RST pin of the sim800L module is connected to the 3.3V port of the arduino.
- I have changed the baud rate of the softwareserial object to 1200 2400 4800 and 9600 without success.
- I have checked "Both NL & CR" in the serial monitor settings.
- I have post "AT" and "at" and all other things.
- whatever the command, the module never answer a clear string. It's either empty, or "?" signs.
- and finally, without touching it, the module is "available" from time to time and output nothing.
Here is a log as an example after a reset:
I am lost ! All help will be greatly appreciated, thanks a lot.