Go Down

Topic: SIM800L issue (Read 62940 times) previous topic - next topic

Kitiara

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)


The type of SIM800L which i have:


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

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.

Kitiara

Any clues ?
Or any recommendations for another gsm modules ?

sabing

Eu desconfio que seja mal contato nos pinos ! eu estou com o mesmo problema

nickgammon

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.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

GertSanders

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.

TBR71

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

vlada0

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

The code is taken from here
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();
  }
}

TBR71

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

The code is taken from here
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

vlada0

You can follow this tutorial (look for "The command sequence"). You have to know the APN, username and password (it should be given by your mobile operator).

erwrow

#9
Feb 06, 2016, 10:28 pm Last Edit: Feb 06, 2016, 10:45 pm by erwrow
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?

hasanzare66

i have these problem can u fix that if you can plz say me hasanzare66@yahoo.com
tnx

Clemens

#11
Apr 03, 2016, 10:39 pm Last Edit: Apr 03, 2016, 10:41 pm by Clemens
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

iMeter

#12
Apr 21, 2016, 12:14 pm Last Edit: Apr 22, 2016, 08:59 am by iMeter
Why a SIM800L module does not respond to the PPP requests? The data log file.
http://eltek-ltd.com.ua/ppp_mc52i_SIM800.txt

master1992

Hello,this  library is for the module sim800l , https://github.com/cristiansteib/Sim800l

iMeter

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.

Go Up