Arduino Forum

Using Arduino => Project Guidance => Topic started by: Kitiara on Jul 24, 2015, 12:32 am

Title: SIM800L issue
Post by: Kitiara on Jul 24, 2015, 12:32 am
I'm trying to send a sms using SIM800L with Arduino UNO but it's not working no matter what i do..
Here it is the codes i'm using:
Library: https://github.com/MarcoMartines/GSM-GPRS-GPS-Shield
Ino:
Code: [Select]
#include "SIM900.h"
#include <SoftwareSerial.h>
//If not used, is better to exclude the HTTP library,
//for RAM saving.
//If your sketch reboots itself proprably you have finished,
//your memory available.
//#include "inetGSM.h"

//If you want to use the Arduino functions to manage SMS, uncomment the lines below.
#include "sms.h"
SMSGSM sms;

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to send and receive SMS.

int numdata;
boolean started=false;
char smsbuffer[160];
char n[20];

void setup()
{
     //Serial connection.
     Serial.begin(9600);
     Serial.println("GSM Shield testing.");
     //Start configuration of shield with baudrate.
     //For http uses is raccomanded to use 4800 or slower.
     if (gsm.begin(2400)) {
          Serial.println("\nstatus=READY");
          started=true;
     } else Serial.println("\nstatus=IDLE");

     if(started) {
          //Enable this two lines if you want to send an SMS.
          if (sms.SendSMS("5311234567", "Arduino SMS"))
          Serial.println("\nSMS sent OK");
          if (sms.SendSMS("05311234567", "Arduino SMS"))
          Serial.println("\nSMS sent OK");
          if (sms.SendSMS("905311234567", "Arduino SMS"))
          Serial.println("\nSMS sent OK");
          if (sms.SendSMS("+905311234567", "Arduino SMS"))
          Serial.println("\nSMS sent OK");
     }

};

void loop()
{
     if(started) {
          //Read if there are messages on SIM card and print them.
          if(gsm.readSMS(smsbuffer, 160, n, 20)) {
               Serial.println(n);
               Serial.println(smsbuffer);
          }
          delay(1000);
     }
};


Here it is some results i got from serial monitor after couple tests:
1# (the input was 3.3V (from Arduino) without any external power supply)
GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP
Trying to force the baud-rate to 9600

1200
2400
4800
9600
19200
38400
57600
115200
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE
------------------------------------------
2# (the input was 3.3V-4.7V with an external power supply up to 1.8A)
GSM Shield testing.
ATT: OK
RIC:
ATT: OK
RIC:
ATT: OK
RIC:
ATT: OK
RIC:
ATT: OK
RIC:

By the way, the area that is shown below the picture was getting hotter for the second case. (Especially when the input was 4.7V)
(http://i60.tinypic.com/u7art.jpg)

The type of SIM800L which i have:
(http://img.dxcdn.com/productimages/sku_382445_1.jpg)

Note:
1- I haven't got any pin code and plugged the sim in proper way.
2- Connections between the pins were just like this
(http://i.lnwfile.com/_/i/_raw/sm/ut/md.jpg)
As for arduino side: TXD -> 2 & RXD -> 3
3- Also the version of the arduino software that i currently have is 1.0.5 at the moment.
4- Red blink on the SIM800L stopped working for some reason.
Title: Re: SIM800L issue
Post by: Kitiara on Jul 24, 2015, 08:03 pm
Any clues ?
Or any recommendations for another gsm modules ?
Title: Re: SIM800L issue
Post by: sabing on Aug 13, 2015, 11:10 pm
Eu desconfio que seja mal contato nos pinos ! eu estou com o mesmo problema
Title: Re: SIM800L issue
Post by: nickgammon on Aug 14, 2015, 03:12 am
From Google Translate:

Quote
I suspect that is poor contact pins! I'm having the same problem
@sabing: This is the English part of the forum.
Title: Re: SIM800L issue
Post by: GertSanders on Aug 25, 2015, 11:30 am
I'm using this module and you need to keep in mind two things:

1/
the powersupply for the SIM800L can NOT be from the Arduino. The Arduino simply can not provide sufficient power to the module during startup.

It needs 3.6V (min) to 4.2v (MAX) to be able to work properly, and needs peak currents up to 2A. I use a 3A Dc-DC converter to power this module. These are cheap and available on Aliexpress:

http://www.aliexpress.com/item/Free-Shipping-LM2596S-3-40V-input-voltage-DC-DC-step-down-adjustable-power-supply-module/1859482402.html


2/
The simcard needs to be inserted with the angled corner on the outside (so angled corned is not inserted first but last).



The library which I confirmed to be working is the FONA library by Adafruit.
Title: Re: SIM800L issue
Post by: TBR71 on Sep 15, 2015, 12:00 pm
Hi, I bought this module, but I do not get it up and running. I use the Adafruit FONATest. No connection. Can you please provide a photo of the wiring? Does anyone have working code for calling a URL, I want to use it to write data in a MySQL database.
http://abc.myfritz.net:8080/abc.php?s=001&c=5&temp=22&hum=44&press=1013&key=12321
Title: Re: SIM800L issue
Post by: vlada0 on Sep 22, 2015, 03:40 am
You can use AT commands to test the module. You just need to insert the SIM card (the right way :-)), put 4V on the VCC and use the Arduino as a serial retranslator. RXD and TXD of the (red) module are 5V tolerant but you must use 3.7-4.2V power supply (better to have separate DC/DC converter as advised by GertSanders). Connect GND, RXD and TXD to the UNO (see comments in the code below), run the sketch, open serial console and type
Quote
AT<ENTER>
in there. The SIM800L should response "OK" to the UNO and you should be able to see it in the console.
You can try to make a voice call using (note the semicolon)
Quote
ATDxxxxxxxxx;<ENTER>
or hang up an incoming call using
Quote
ATH<ENTER>
You may want to check
Quote
AT+CREG?
More commands here:
https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf (https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf)

The code is taken from here
http://www.seeedstudio.com/wiki/LoNet_-_GSM/GPRS_Breakout (http://www.seeedstudio.com/wiki/LoNet_-_GSM/GPRS_Breakout)

But be careful, VIO is not VCC!! You don't have/need VIO.

Code: [Select]

// Connect VCC to +4V
// Connect GND to Ground
// Connect RX (data into SIM800L) to Digital 11
// Connect TX (data out from SIM800L) to Digital 10

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  mySerial.begin(9600);

}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
   
  if (Serial.available())
  {
    while(Serial.available())
    {
      mySerial.write(Serial.read());
    }
    mySerial.println();
  }
}
Title: Re: SIM800L issue
Post by: TBR71 on Sep 24, 2015, 05:09 pm
You can use AT commands to test the module. You just need to insert the SIM card (the right way :-)), put 4V on the VCC and use the Arduino as a serial retranslator. RXD and TXD of the (red) module are 5V tolerant but you must use 3.7-4.2V power supply (better to have separate DC/DC converter as advised by GertSanders). Connect GND, RXD and TXD to the UNO (see comments in the code below), run the sketch, open serial console and type  in there. The SIM800L should response "OK" to the UNO and you should be able to see it in the console.
You can try to make a voice call using (note the semicolon)or hang up an incoming call using
You may want to check  More commands here:
https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf (https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf)

The code is taken from here
http://www.seeedstudio.com/wiki/LoNet_-_GSM/GPRS_Breakout (http://www.seeedstudio.com/wiki/LoNet_-_GSM/GPRS_Breakout)


But be careful, VIO is not VCC!! You don't have/need VIO.

Code: [Select]

// Connect VCC to +4V
// Connect GND to Ground
// Connect RX (data into SIM800L) to Digital 11
// Connect TX (data out from SIM800L) to Digital 10

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  mySerial.begin(9600);

}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
   
  if (Serial.available())
  {
    while(Serial.available())
    {
      mySerial.write(Serial.read());
    }
    mySerial.println();
  }
}

Wow it works!!! Thank you.
Please can you make me a Example for GPRS connection to http://abc.myfritz.net:8080/abc.php?s=001&c=5&temp=22&hum=44&press=1013&key=12321

Many many thanks
Title: Re: SIM800L issue
Post by: vlada0 on Sep 25, 2015, 12:20 am
You can follow this tutorial (https://vsblogs.wordpress.com/2013/11/28/tcp-connection-over-gprs-using-sim900-and-at-commands/) (look for "The command sequence"). You have to know the APN, username and password (it should be given by your mobile operator).
Title: Re: SIM800L issue
Post by: erwrow on Feb 06, 2016, 10:28 pm
Hi, i have the issue with the same module. when i use the code that post vlada0, i have as response ÿ, why can this be?
Title: Re: SIM800L issue
Post by: hasanzare66 on Apr 03, 2016, 08:06 pm
i have these problem can u fix that if you can plz say me hasanzare66@yahoo.com
tnx
Title: Re: SIM800L issue
Post by: Clemens on Apr 03, 2016, 10:39 pm
Have in mind that the module is not a 5V device. Even 3.3 V are for the pins too much. It may working but it is out of spec. You have to use voltage divider to get the fitting voltage.

For me it is working with this lib
https://github.com/SodaqMoja/GPRSbee
with gprsbee.initAutonomoSIM800 as initialization method 

and using Vcc, GND, TX, RX, RST and DTR pins

You can find examples for SMS, GET, POST here:
see https://github.com/SodaqMoja/GPRSbee/wiki
Title: Re: SIM800L issue
Post by: iMeter on Apr 21, 2016, 12:14 pm
Why a SIM800L module does not respond to the PPP requests? The data log file.
http://eltek-ltd.com.ua/ppp_mc52i_SIM800.txt
Title: Re: SIM800L issue
Post by: master1992 on Apr 25, 2016, 02:36 pm
Hello,this  library is for the module sim800l , https://github.com/cristiansteib/Sim800l (https://github.com/cristiansteib/Sim800l)
Title: Re: SIM800L issue
Post by: iMeter on May 04, 2016, 10:48 am
Before complete LCP protocol data to be encoded ACCM 0xFFFFFFFF, that's all.
Now another problem.
In response to the command AT+CBST? reply ERROR, on M2M - data calls responds NO CARRIER.
Module not support Data mode (CSD).
Who can help, thank you for earlier.
Title: Re: SIM800L issue
Post by: master1992 on Mar 21, 2017, 07:50 pm
WebSite for the module  https://cristiansteib.github.io/ (https://cristiansteib.github.io/)
Title: Re: SIM800L issue
Post by: mrpipes33 on Aug 09, 2017, 06:00 am
@GertSanders

How did you wire the LM2596S to the DC-DC Convertor, also what are you using as a power supply?
Power bank, LiPo, etc. Is it possible to run it off a Powerbank?
Title: sim800l+nodmcu
Post by: mechatronicseng on Sep 01, 2017, 11:48 pm
hellow dear firends
who work with sim800l in nod mcu whit arduino IDE?
can you help me?
i want connect sim800l to node mcu and use library sim800l for arduino in sim800l but all of theme use soft ware serial in this program and when i upload that program in node mcu didnt work
please giude me for send & resive sms with sim800l in nodemcu with arduino
thanks alot
Title: Re: SIM800L issue
Post by: minoswydis on Nov 13, 2017, 09:58 am
Hi, i am using this module and everything works fine. Only problem is that while receiving sms somehow arduino blinks all outputs to HIGH few times. is it possible that frequency from antenna does something to arduino?
Title: Re: SIM800L issue
Post by: nksl on Dec 17, 2017, 10:48 pm
I use this connection:

VCC         5V
GND         GND
TX           10    or 11
RX           11    or 10
RESET      2


and this code:

Code: [Select]
#include <Sim800l.h>
#include <SoftwareSerial.h> //is necesary for the library!!
Sim800l Sim800l;  //to declare the library
char* text;
char* number;
bool error; //to catch the response of sendSms


void setup(){
 Sim800l.begin(); // initializate the library.
 text="Testing Sms";  //text for the message.
 number="2926451386"; //change to a valid number.
 error=Sim800l.sendSms(number,text);
 // OR
 //Sim800l.sendSms("+540111111111","the text go here")


}

void loop(){
 //do nothing
}



The module is SIM800L V2.0 - 5V

(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSXUGyPMx_FbWlM4BDDmscLM4LDcgK6EYonW7fcKphkbheH5yG9)

I have also tested the type mentioned in this issue.

Can someone tell me if the modules work and how?


Title: Re: SIM800L issue
Post by: 25Samy on Jan 11, 2018, 07:47 am
Hello,
I also have a problem with my sim800l...

I use a diode 1N4007 after the VCC5V and it gives me something like 4V.

Below, you will see the dialog with the module using the FONAtest library. Things look look good at the beginning except when it writes "<--- ERROR"  and   " ??? ".

At the end when I write a phone number nothing happends....

Do you have an idea ?

Thanks
François


Quote
FONA basic test
Initializing....(May take 3 seconds)
Attempting to open comm with ATs
   ---> AT
   <---
   ---> AT
   <---
   ---> AT
   <---
   ---> AT
   <---
   ---> AT
   <--- AT
   ---> AT
   <--- AT
   ---> ATE0
   <--- ATE0
   ---> ATE0
   <--- OK
   ---> AT+CVHU=0
   <--- OK
   ---> ATI
   <--- SIM800 R14.18

OK

+CPIN: READY

   ---> AT+CPMS="SM","SM","SM"
   <--- ERROR

FONA is Ok
Found ? ? ?

   ---> AT+GSN
   <--- 865674037529308
Module IMEI: 865674037529308
-------------------------------------
[ ?] Print this menu
[ a] read the ADC 2.8V max (FONA800 & 808)
[ b] read the Battery V and % charged
[ C] read the SIM CCID
[ U] Unlock SIM with PIN code
.....
.....
[ S] create Serial passthru tunnel
-------------------------------------

FONA>
Call Ready

SMS Ready
s
Send to #

Title: Re: SIM800L issue
Post by: jirgale on Mar 26, 2018, 08:36 am
I have same issue. have u got any solution for the same? If so,can u please share with us?
Thanks in advance
Title: Re: SIM800L issue
Post by: ivoo56 on May 06, 2018, 06:34 am
Hi,

SIM800l worked with Arduino UNO and the code below for sending SMS under PIN HIGH condition, but important points:
1. Power suply: Arduino UNO is limmiting the current and provides not enough power, therefore you need different power source for SIM800 or do like I did: plugged extrenal power supply DC 5V/2000ma into Arduino and briged the + into SIM800
2. Need the library from https://github.com/cristiansteib/Sim800l Pay attention of TX and RX pins. You can modify defaults in library in .../Arduino/libraries/Sim800l-master/Sim800l.h
3. Code

#include <Sim800l.h>
#include <SoftwareSerial.h> //is necesary for the library!!
Sim800l Sim800l;  //to declare the library
char text[161]="Text for SMS1"; //buffer to store message
char text1[161]="Text for SMS1"; //buffer to store message
char number[12]="your mobile # to send SMS to"; //phone number to send message
//int cnt;
bool error; //to catch the response of sendSms

// constants won't change. They're used here to set pin numbers:
const int buttonPin1 = 10;     // comment1 the number of the pushbutton pin
const int buttonPin2 = 12;    // comment2 number of the pushbutton pin
//const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonPin1State = 0;         // variable for reading the pushbutton status
int buttonPin2State = 0;         // variable for reading the pushbutton status

void setup(){
 // initialize the pushbutton pin as an input:
 pinMode(buttonPin1, INPUT);
 pinMode(buttonPin2, INPUT);
 Sim800l.begin(); // initializate the library.
 Serial.begin(9600); // initialize serial communications
}
void loop(){
 // read the state of the pushbutton value:
 buttonPin1State = digitalRead(buttonPin1);
 buttonPin2State = digitalRead(buttonPin2);  
     //Send the message and display the status
     if (buttonPin1State == HIGH) {
       error = Sim800l.sendSms(number,text);
       }      

     if (buttonPin2State == HIGH) {
         error = Sim800l.sendSms(number,text1);
           }
delay(1000);
}


//I hope this helps
Title: Re: SIM800L issue
Post by: Tato84 on May 06, 2018, 02:13 pm
Hello,
I also have a problem with my sim800l...

I use a diode 1N4007 after the VCC5V and it gives me something like 4V.

Below, you will see the dialog with the module using the FONAtest library. Things look look good at the beginning except when it writes "<--- ERROR"  and   " ??? ".

At the end when I write a phone number nothing happends....

Do you have an idea ?

Thanks
François


You need a RX pin voltage divider (max 2.8v)
Title: Re: SIM800L issue
Post by: ayushmarsian on Jun 29, 2020, 02:44 pm
I have same issue. have u got any solution for the same? If so,can u please share with us?
Thanks in advance
Hi, Goto this link (http://www.github.com/ayushmarsian/SIM800L) there is one circuit suggested which working good.

Also try that library, because it gives 100% feedback of every task we ask to GSM.

Thank you