GSM stuck in loop of last sms sent constantly coming through

Hi, I have been playing around with a SIM800L for a while now - powered from an external 5v power supply,hard wired onto an expansion board, almost ready to be put in a nice little project, but the other day while testing after a week at work, the unit wouldn't turn an LED on from a txt (what I had wanted). Code had not changed, simcard had not changed. The only thing I had done differently was when the first message sent I sent another shortly after, before the GSM had found network signal.

Now whenever I turn it on, it won't receive new sms's, and will show only the last messages number and if it was a discard. I have tested the arduino to see if I have somehow broken it (all tested fine) and swapped boards, just to be sure, but still the same.

TLDR; SIM800L is stuck on an sms, and will only pull the last message sent, on initial connection with the network.

Any ideas? I have googled and no one really has this problem.

Right so I managed to solve this problem after a lot of skimming the internet. Since I am a good sort I will write the step by step to my solution, it might help someone else someday, since this technology is all about free distribution.

I flashed this sketch on. The pins are 2 and 3, since they are also used for the GSM library that I use in the end sketch, and having everything hardwired already, I was not keen to unsolder the pcb again.

#include <SoftwareSerial.h>

//SIM800 TX is connected to Arduino D2
#define SIM800_TX_PIN 2

//SIM800 RX is connected to Arduino D3
#define SIM800_RX_PIN 3

//Create software serial object to communicate with SIM800
SoftwareSerial serialSIM800(SIM800_TX_PIN,SIM800_RX_PIN);

void setup() {
//Begin serial comunication with Arduino and Arduino IDE (Serial Monitor)
//Being serial communication witj Arduino and SIM800
Serial.println("Setup Complete!");

void loop() {
//Read SIM800 output (if available) and print it in Arduino IDE Serial Monitor
//Read Arduino IDE Serial Monitor inputs (if available) and send them to SIM800

In the serial monitor I set the baudrate to 9600, so as to know it would be constant for everything


then to check


With the serial monitor, I went in and changed the AT+CBAND logic from “EDGE_GSM” to “ALL_BAND”

The process went along the lines of (in serial monitor):

AT+CBAND? //this showed what it was currently set to
AT+CBAND=? //this shows what is available
AT+CBAND=“ALL_BAND” //this sets to the all band option in the sim (I assume)

To check all functionality here are useful AT commands, the basics of what arduino can use I guess:

AT+CMEE=2 //will set the errors as verbose, so you can identify some problems more quickly.
AT+CPIN? //if the value returned is 1 then the sim pin number is entered correctly.
AT+CFUN? //checks the functionality of the SIM unit as far as phone abilities - 1 means full functionality.
AT+CREG? //1 means it has network connectivity, if 0, you can try hard connecting through AT+CREG=1
AT+COPS? //shows if you are registered to an operator.
AT+COPS=? //returns information on available operators.
AT+COPS=x //replace x with one of the numbers that are shown in COPS=? to try setting that operator.
AT+CSQ? //returns signal strength.

Through playing around with all of these settings eventually they all read 1 or correct, and the unit worked again. I also used AT commands to go into the SIM and delete the build up of 4 messages on the simcard memory from my code not working.

The walkthrough for that was here:

Other links that were useful for my GSM problems: - This is where the software serial sketch was found, along with some AT commands - Here is the website with more AT commands

The big thing on this forum that I gleened about the SIM900, SIM800, L, C is that the voltage and amps have to be perfect, and that the receiving line from the SIM unit should have a voltage around 2.8v. Newer SIM chips off ebay and aliexpress although saying they need 4.4 as a MAX input vcc voltage, have a regulator in them already, so my SIM800L is running off a 5v computer power supply straight, and seems to like it. Voltage divider is however in the receiving line (not Tx line, since it is a 2.8v input into a 5v max arduino slot). 2Amp input current is also important for the initial bind to the network or receiving/making calls or sms. I tested with a multimeter and it seems to only suck 750mA on a startup, but won’t connect for some odd reason without the 2A as an input.

Hope this helps anyone else in a spot of trouble with this thing.