Updated GPS & Battery commands for Sim808 / FONA Shield. Also works for LoNet Sim808

4985 0

Enable Charging Function 

It is recommended to execute this process when first time to use the module. In the Serial Monitor columns of following tables, input of AT commands are in back, module returns values are in orange.

Serial Monitor Description
AT
OK
Send command “AT” to synchronize baud rate. Serial port of module is by default set at auto-baud mode, and in this mode, it will not output any indications when the module is on.
AT+ECHARGE=1
OK
Send command “AT+ECHARGE=1” to enable battery charging function. By default the charging function is closed.
AT&W
OK
Save parameter setting.
AT+CBC
+CBC: 1,96,4175
OK
Inquire charging status and remaining battery capacity.
AT+CSQ
+CSQ: 14,0
OK
Inquire GSM signal quality.

Get location with GPS 

Serial Monitor Description
AT+CGPSPWR=1
OK
Open GPS
AT+CGPSSTATUS?
+CGPSSTATUS: Location Not Fix
OK
Read GPS fix status, “Location Not Fix” means that positioning is not successful. For the first time to start, it will take at least 30s. GPS must be tested by the window or outdoor.
AT+CGPSSTATUS?
+CGPSSTATUS: Location 3D Fix
OK
GPS has fixed with 3D status.
AT+CGPSINF=0
+CGPSINF:
0,2234.931817,11357.122485,
92.461185,20141031041141.000,
88,12,0.000000,0.000000
Get the current GPS location information. Parameters formate: <mode>, <altitude>, <longitude>, <UTC time>, <TTFF>, <num>, <speed>, <course>
AT+CGPSOUT=32
OK
$GPRMC,043326.000,A,
2234.9414,N,11357.1187,E,
0.000,143.69,311014,,,A*50
Read NMEA $GPRMC data, of which, “2234.9414 N, 11357.1187 E” is the location coordinates. For more details about NMEA sentences, check this site.
AT+CGPSRST=0
OK
Reset GPS in Cold Start Mode.
AT+CGPSRST=1
OK
Reset GPS in Hot Start Mode.
AT+CGPSPWR=0
OK
Close GPS.

Resource 

Facebooktwitterredditpinterestlinkedinmail

Related Post

Add Clock Via i2c

Posted by - October 24, 2015 0
Prepare i2c added real time clock driver to raspian Add time variable to picture display Solder pins to clock module…

GPS AT Commands

Posted by - October 18, 2015 0
AT+CGPSPWR? if off : AT+CGPSPWR=1 Get status : AT+CGPSSTATUS? Get GPS : AT+CGPSINF RESET CODES : What mode ? –…

There are 1 comments

  1. Hello.
    I am running the SIM808 with Arduino Mega.
    Using AT+ECHARGE=1 to enable and AT&W to store charging a LiPo for backup.
    Doing AT+CBC always returns 0 for the first number, which means the LiPo is NOT charging.
    Checking AT+ECHARGE? returns 1.
    Shouldn´t AT+CBC return 1 in the beginning as well?
    Thanks for any help.
    Kind Regards,
    Jens

    Reply

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.