Go Down

Topic: New SIM800 library aimed at HTTP communication & GSM location (Read 62383 times) previous topic - next topic


I have one SIM800 connected to arduino nano, running for days sending data every hour. I'm using D7 for RESET with no problem. SIM800 is 5V tolerant, no need for level shifting.

One thing about power: first i tested the module with a external power supply regulated to 4.95V with a diode to down voltage to 4.25V. Then i replaced the power supply for a pack of batteries (5.08V), after that i got strange behavior, sometimes SIM800 didn´t send any messages. I figured that at 5.08V, the voltage on the SIM800 was 4.35V that leeds to OVERVOLTAGE warnings. If you use diodes to down voltage, ensure that it stays around 4.2V. Better is to use a LDO or some external power very stable.

About the power on/off question, i use a optocoupler connected to a arduino pin, that way i can use it like a swith to turn on/off the SIM800 module. You can also use a FET transistor to do the same. 
Thank you, Geologic! It was the exactly answer I was expecting! =]


Apr 01, 2016, 08:11 pm Last Edit: Apr 02, 2016, 11:33 am by abbat81 Reason: grammatic
I use Arduino Uno
Connected USB only, nothing else.

In SIM800.h I've changed to:
Code: [Select]
#define SIM_SERIAL Serial

So, Compiled OK, but I get this text in Serial:


But I'd get such as these strings:
"Requesting "
"Connect error"

In termianal I use 9600 speed, but it was tested on every alowed speed setting in terminal.

Can you test in such way in your board?

Thank you in advance.


I use Arduino Uno
Connected USB only, nothing else.
You cannot use USB to power SIM800, it draws to much current. Use a separated power supply to power SIM800 and common ground to arduino and SIM800.


Can anyone please help me in downloading sim800 library? I have downloaded .ZIP file from https://github.com/stanleyhuangyc/Freematics.git named "Freematics-master.zip" but when I am trying to add it to Arduino IDLE it shows "specified folder/zip file does not contain a valid library".


Did you unzip it first? You just need SIM80.cpp and SIM800.h files in your "libraries" folder under your arduino folder.


SIM800 is 5V tolerant, no need for level shifting.
Don't think so, the serial port characteristic of the spec says 2.8 V max:
see p. 31 http://www.seeedstudio.com/wiki/images/4/46/SIM800L_Hardware_Design_V1.00.pdf

And I see on the PCB no additional resistors / diodes ... what lowers the voltage, so you should do this.


Wou're right, there is no level shift circuit in PCB... But mine is working for more than a month connected to 5V MCU... Let's see for how long.

For testing, i guess it is safe to wire tx/rx directly. If using in real world, better add some level shifting circuit.


Hi, can You please tell me how to set up user name and password for APN?
I have tried adding


to library in setup function, but it not working.


what changes did you make on the  library code? You have to replace this part by your code:
Code: [Select]

  if (!sendCommand(0))
    return 4;


I'm still using another GSM shield with the standard GSM library. I would like to move to SIM800L.

In my current code, I am making an HTTP POST request: I connect to an IP address, then I write the request as text to the connection, including the JSON object, that I want to send to the server residing at that IP, and finally I close the connection.

I didn't see such option with this library. I can only send parameters to the server using URL query arguments. This is indeed an option for me (I'll just change the server code to expect a GET request and read all parameters from the URL), but still - does anyone know of a library for the SIM800(L) that can write to an open HTTP connection?



I am also using this library.
why do we run "AT+CREG?" 30 times in the setup function ?
I have "Error code:1" at the end.

Means "success" is false, so "mode" is not 1 and not 5, why ?

Thank you.


Sorry, but the Github link is broken. Can you post the link to the library? Thanks in advance.


You can use this SIM800 Library. It works efficiently - BareBoneSim800 Arduino Library and works with any know SIM800 modules. Idea for IoT applications and sending sms.

Go Up