Software apps and online services
This is a quickstart guide about how to use a GPS module from SIMCom.
This documentation was made specific for SIM68M, but can be used with SIM28, SIM33, SIM39 and SIM68.
To start the tests you will need:
- USB Cable - A-Male to Mini-B
- USB Cable - MiniUSB to Serial Converter RS232 (DB9)
- DB9 Female to Female Adapter
Plug the USB-Serial Cable to MAIN PORT (X201) to communicate the module, plug the MiniUSB Cable to USB PORT (J201) and plug the aAtenna.
Turn on the switches PWR (S301), LEVEL (S201) and USB/UART (S202).
Install EVB-KIT Drivers and start the SIMCom GPS Demo Tool.
Click on Setting, select the USB-Serial Port and click OK.
Click "Run Com Port" to start getting information from GPS.
If this is your first Run, probably you can not get the locations from Satellites.
So change the "RestartType" to "COLD", decrease the CycleTimes (5 should be enought), click START and wait the tests to get your location.
After the TTFF Tests your coordinates should be FIXED as below.
Go to next section to get your position in Maps.
We could try to simply copy the Latitude and Longitude parameters that are in the "General Info" and paste them into some mapping tool like Google Maps.
However, the location indicated would be incorrect due to the need to correct it by Altitude.
Unfortunately, the normal Google Maps browser application, for example, does not offer the option to enter the Altitude (it would be necessary to run a custom API).
So, for this demo we will use the GPRMC & GPGGA decoder from the site https://rl.se/gprmc
The GPRMC & GPGGA decoder can receive a GPS record and show your position. The SIMCom GPS Demo automatically runs a request loop for the module, where responses are displayed in the "IP Log" window and saved in the LOG folder inside the GPS Demo installation folder, which can be send to the decoder.
From all the answers that the module provide us, the only one that interests us for this demo is the location. The location is given by the $GNRMC command, and the others could be discarded.
1. Access the folder "LOG" inside your SIMCom GPS Demo folder.
2. Open your log with a Spreadsheet tool (like Excel)
3. Filter the column with the command $GNRMC.
4. Copy one line of the log to https://rl.se/gprmc and click Decode
The website will show you the location provided by your GPS.4. What is and how it works PMTK?
PMTK are the proprietary commands used by SIMCom's GPS to configure the modules, enable functions, send and receive messages.
You can send PMTK commands using the SIMCom GPS Demo Tool or using a terminal emulator like Teraterm or Putty.
PMTK follows a structure similar to NMEA messages.
This commands must be started with $, ending with * followed by the checksum value and finally the line breaks.
See the example below of the PMTK161 command responsible for placing the module in standby mode:
After entering a PMTK command, if it is valid and identified by the system, the module will return a PMTK001, code corresponding to the acknowledge of a command:
Depending on the command used, the system can also return other messages, for example when leaving standby mode, the system returns two messages:
$PMTK011,MTKGPS*08 // (Output system text message = "MTK GPS")
$PMTK010,001*2E // (Output system message 1 = "STARTUP")
For more details on each command, access the document "MT3333 Platform NMEA Message Specification"4.1 Calculating Checksum
For initial tests it is recommended to use the SIMCOM GPS DEMO Tool, where you simply click on the "With CheckSum" button in the lower right corner and the Checksum will be calculated automatically:
To calculate checksum in real applications you need to perform an XOR operation with all bits between $ and *. The result will be a value in hexadecimal.
1. PMTK Message
$PMTK161,0*?? // ?? = Checksum to be calculated
2. Convert "PMTK161,0" to binary
"PMTK161,0" = 01010000 01001101 01010100 01001011 00110001 00110110 00110001 00101100 00110000
3.Perform XOR operation
XOR (01010000 01001101 01010100 01001011 00110001 00110110 00110001 00101100 00110000) = 00101000
4. Convert XOR result to Hex
"00101000" = 28 // the result is the checksum
5. Add checksum to PMTK Message after asterisk "*"
You can also create a tool or use a checksum checker tool like the NMEA Checksum Calculator: https://nmeachecksum.eqth.net/