| Module server example | cgpsexample.php v30 (requires cgps.php v82 or greater) cgps.php v85 (supports module firmware up to version: Rev9:864 / Rev5..8:all) |
|---|
These links can be used to manually simulate a module transmission to your server (their date/time is updated on each browser refresh).
Your server will receive and handle the incoming data and return a response, which your browser will display as something like: *A#G OK
www.YourServer.com/YourScript.php?YourVariableName=1234567|ceVn8g0DNJM1SL3G4Tfj9w01k1E7d0r0--0G0qvfJu42
www.YourServer.com/YourScript.php?YourVariableName=1234567|ceVn8g0FGMs1SO22u2dzBw0JjTaelMd02x0S04hCKu42
www.YourServer.com/YourScript.php?YourVariableName=1234567|ceVn8g0ZDv4O05GB00Tgp0shyfs000000000008V2c02|ceVn8g0l10Q1LTiO07VzQw10mo2elMd42BkS02JCKuk2|ceVn8o5cwv0Q-Y3-M35N3v-0kU2BvM-3J000002P0c02|ceVn8g0BaVQ1MGObliNFK_00dL1ZF0beJ00Ew2GZBY02|ceVn8izGXq5v50000exx0iwRfvM0000jn04N00380c00|ceVn8izGXq602w000exD0g0000000000000000000c00|ceVn8lhEqndD5i1FsO1x87dBsCBxr21QpndQ00210c00|ceVn8khOqnpM6mlOey1arSxKeO1jt65QtncW84NLos06|ceVn8mhFrCtN6i1zon9DrPIwimVSrSBzpjEwcj8Pdc06|ceVn8jkSdPxO1000001N500Hkcn22000J00y002Z0c06|ceVn8r003glEqNtZvQIg0c0bvlH50g40001g0gc0SY43
With the extra decoding feature, you can manually decode module data strings. Click one to see the decoding result of various CGPS class functions.
1234567|ceVn8g0DNJM1SL3G4Tfj9w01k1E7d0r0--0G0qvfJu42
1234567|ceVn8g0FGMs1SO22u2dzBw0JjTaelMd02x0S04hCKu42
1234567|ceVn8g0ZDv4O05GB00Tgp0shyfs000000000008V2c02|ceVn8g0l10Q1LTiO07VzQw10mo2elMd42BkS02JCKuk2|ceVn8o5cwv0Q-Y3-M35N3v-0kU2BvM-3J000002P0c02|ceVn8g0BaVQ1MGObliNFK_00dL1ZF0beJ00Ew2GZBY02|ceVn8izGXq5v50000exx0iwRfvM0000jn04N00380c00|ceVn8izGXq602w000exD0g0000000000000000000c00|ceVn8lhEqndD5i1FsO1x87dBsCBxr21QpndQ00210c00|ceVn8khOqnpM6mlOey1arSxKeO1jt65QtncW84NLos06|ceVn8mhFrCtN6i1zon9DrPIwimVSrSBzpjEwcj8Pdc06|ceVn8jkSdPxO1000001N500Hkcn22000J00y002Z0c06|ceVn8r003glEqNtZvQIg0c0bvlH50g40001g0gc0SY43
Additional functions: view available info per Switch Value view recent error log part view full error log create/erase error log
Create database: CREATE DATABASE DataBaseName Create table: CREATE TABLE TableName ( Recor... Delete table: DROP TABLE TableName Delete database: DROP DATABASE DataBaseName
Receptions: SELECT * FROM TableName ORDER BY Record DESC LIMIT 50
Positions: SELECT * FROM TableName WHERE Switch>=SV_LowestPositionSwitch AND Switch<=SV_HighestPositionSwitch GROUP BY Data ORDER BY DateTime DESC, Record DESC LIMIT 50
Positions2: SELECT * FROM TableName WHERE EventID!=0 GROUP BY Data ORDER BY Record DESC LIMIT 50
Start+stop+counters: SELECT * FROM TableName WHERE (((EventID&1023)=40) OR ((EventID&1023)=41) OR (Switch=SV_Counters) OR (Switch=SV_CountersHighestSpeed) OR (Switch=SV_RestartAnnouncement) OR (Switch=SV_PowerUp) OR (Switch=SV_SettingsAccepted)) GROUP BY Data ORDER BY DateTime DESC, Record DESC LIMIT 50
Photos/data: SELECT * FROM TableName WHERE (Switch>=SV_Photo AND Switch<=SV_PhotoGps) OR (Switch=SV_LogDataHeader) GROUP BY Data ORDER BY Record DESC LIMIT 50
Other than positions and photos: SELECT * FROM TableName WHERE (Switch<SV_Photo OR Switch>SV_PhotoLogData) AND Switch!=SV_LogData AND EventID=0 ORDER BY Record DESC LIMIT 50
CGPS::SetHttpData("1234567|ceTT5w0DNJM1SL3G4Tfj9w01k1E7d0r0--0G0qvfJu42") result: TRUE
CGPS::GetDataPartCount() result: 1
CGPS::SelectDataPart(0) result: TRUE
CGPS::IsValid() result: TRUE
| CGPS::Get...() function | Result | Description |
|---|---|---|
| UtcTime | 1765223814.00 (=Mon, 08 Dec 2025 19:56:54 +0000) | UTC date/time of the data as a timestamp |
| Imei | 357541000234567 | International Mobile Equipment Identification code of the module |
| Switch | 0 (=SV_Position) | Switch value type that tells what information is encoded in the data |
| Index | 52 | Module log index number of the data |
| EventID | 423 (=Entering region 23) | ID code value of the event(s) that triggered the module to log the data |
| CanGet LatLong() | TRUE | Test for availability of probably accurate GPS information |
| CanGetLatLong Inaccurate() | FALSE | Test for availability of probably inaccurate GPS information |
| GoogleMapsUrl | ClickMe | A maps.google.com compatible URL (service might not be available) |
| LiveMapsUrl | ClickMe | A maps.live.com compatible URL (service might not be available) |
| Heading | 294.4 (=North/West) | Heading direction from 0.0 up to 359.9 degrees |
| SpeedKPH | 23.1 | Speed in kilometers per hour |
| SpeedMPH | 14.4 | Speed in miles per hour |
| SpeedKnots | 12.5 | Speed in knots |
| GpsStatus | 0 (=OK) | Status of the GPS receiver |
| IO | 240 (=in: 1a 2a 3a 4a / out: 1i 2i 3i 4i) | Digital input/output active/inactive status |
| AdditionalIO | 64 (=) | Additional digital input/output active/inactive status of connector pins, Input5 (and accel-sensor calibration status) |
| MiscStatus | 224 (=vo1:i/vo2:i/CamUsed) | Miscellaneous status of the module (Virtual Outputs active/inactive, camera successfully used and power saving) |
| AnalogInput1 | <not available> | Analog input #1 voltage level |
| AnalogInput2 | <not available> | Analog input #2 voltage level |
| AnalogInput3 | <not available> | Analog input #3 voltage level |
| AnalogInput4 | <not available> | Analog input #4 voltage level |
| AnalogInput5 | <not available> | Analog input #5 voltage level |
| LogDataType | <not available> | Type value of the logged data |
| LogDataSize | <not available> | Size in bytes of a logged data that spread over several other records |
| LogDataGpsTimeDifference | <not available> | Time difference in seconds between logged data and the included GPS information |
| UtcTimeMySQL | 20251208195654 | UTC date/time of the data in SQL query format (yyyymmddhhmmss text) |
| GpsTimeMySQL | 20251208195712 | GPS date/time of the data in SQL query format (yyyymmddhhmmss text) |
| GpsTime | 1765223832.00 (=Mon, 08 Dec 2025 19:57:12 +0000 GPS) | GPS date/time of the data as a timestamp |
| View | 11 | Number of "visible" satellites |
| Fix | 5 | Number of satellites used to determine the GPS information |
| MaxDB | 42 | Signal reception strength in dBm (decibel referenced to 1 milliwatt) of the strongest GPS satellite |
| GpsHighestMaxDB | <not available> | Highest recorded GPS satellite signal strength in decibels received since module (re)started |
| HDOP | <not available> | Horizontal Dilution Of Precision |
| LatitudeSmall | 31125738 (=0x1DAF0EA) | Latitude in small storage form |
| LatitudeFloat | 51.87623 | Latitude as floating point value |
| LatitudeDegrees | 51°52'34" N / 51°52.5738' N | Latitude in Degrees, Minutes, Seconds, N(orth)/S(outh) and minute decimals |
| LongitudeSmall | 2606812 (=0x27C6DC) | Longitude in small storage form |
| LongitudeFloat | 4.34469 | Longitude as floating point value |
| LongitudeDegrees | 4°20'40" E / 4°20.6812' E | Longitude in Degrees, Minutes, Seconds, E(ast)/W(est) and minute decimals |
| LatLongMarginInMeters | 7.7 | Maximum Latitude/Longitude position dislocation in meters with a probability of 67% |
| LatLongMarginInFeet | 25.3 | Maximum Latitude/Longitude position dislocation in feet with a probability of 67% |
| AltitudeInMeters | 1.0 | Altitude in meters (above WGS84 ellipsoid) |
| AltitudeInFeet | 3.3 | Altitude in feet (above WGS84 ellipsoid) |
| AltitudeMarginInMeters | <not available> | Maximum altitude position dislocation in meters with a probability of 67% |
| AltitudeMarginInFeet | <not available> | Maximum altitude position dislocation in feet with a probability of 67% |
| Version | 463 | Firmware version of the module |
| Rev | 5 | Revision series number of the module for firmware requirement identification |
| SettingsError | <not available> | Error code of the uploaded settings data |
| SettingsCrc | <not available> | "Cyclic Redundancy Check" value of the settings data used by the module |
| GpsFirmwareCrc | <not available> | "Cyclic Redundancy Check" value of GPS firmware |
| GsmFirmwareCrc | <not available> | "Cyclic Redundancy Check" value of GSM/GPRS firmware |
| IsForwarded ByGateway() | FALSE | Check if the data was forwarded by a gateway and not received directly from a module |
| Accu | 27.65 | Power supply voltage of the module |
| Reset | 0 | Number of seconds since the module was powered-up (or reset) |
| Shake | 255 | Minimum number of seconds left for the module to return to the "Not Moving" state |
| TemperatureCelcius | 20.1 | Temperature of the built in (or external substitute) sensor in degrees Celsius |
| TemperatureFahrenheit | 68.2 | Temperature of the built in (or external substitute) sensor in degrees Fahrenheit |
| CounterSecondsActive | <not available> | Total number of seconds that the module has been active |
| CounterSecondsMoving | <not available> | Total number of seconds that the module has been active |
| CounterTravelledMeters | <not available> | Total number of GPS determined meters that the module has travelled |
| CounterTripMeters | <not available> | GPS determined meters travelled since the last "Start Moving" event |
| CounterPulsesInput1 | <not available> | Total number of pulses counted by the internal hardware pulse counter |
| CounterInput3Active | <not available> | Total number of 100 milliseconds units that the module detected an active signal on digital input 3 |
| PortDataSize | <not available> | Size in bytes of the data that the module received via a serial port |
| PortDataBytes | <not available> | The data bytes that the module received via a serial port |
| ExtraDataSize | <not available> | Size in bytes of the data that the module included with this record |
| PhotoLogDataSize | <not available> | Size in bytes of a logged picture that spread over several other records |
| PhotoPort | <not available> | The port number used to take the picture (for identification which camera was used in a multiple camera setup) |
| PhotoGpsTimeDifference | <not available> | Time difference in seconds between picture taken and the included GPS information |
| IButtonAttached | <not available> | Determine if an iButton or 1-Wire device was being attached or detached |
| IButtonSerialNumberText | <not available> | The serial number of an iButton or 1-Wire device as text |
| 1WireDataPart | <not available> | The part number of the current part of the 1-Wire (iButton) device data structure |
| 1WireDataClosure | <not available> | Determine if this is the last part of the 1-Wire (iButton) data |
| 1WireDataLength | <not available> | Length in bytes of this part of the 1-Wire device (iButton) data structure |
| 1WireDataBytes | <not available> | The binary data bytes of this part of the 1-Wire (iButton) device data structure |
| 1WireDS18B20celcius | <not available> | Temperature of a DS18B20/DS18S20/DS1822 1-Wire device in degrees Celsius |
| 1WireDS18B20fahrenheit | <not available> | Temperature of a DS18B20/DS18S20/DS1822 1-Wire device in degrees Fahrenheit |
| AccelerationX | <not available> | G-Force reading of the X direction acceleration sensor |
| AccelerationY | <not available> | G-Force reading of the Y direction acceleration sensor |
| AccelerationZ | <not available> | G-Force reading of the Z direction acceleration sensor |
| LcdDataPart | <not available> | The part number of the current part of the LCD-display data |
| LcdDataClosure | <not available> | Determine if this is the last part of the LCD-display data |
| LcdDataLength | <not available> | Length in bytes of this part of the LCD-display data |
| LcdDataBytes | <not available> | The data bytes of this part of the LCD-display data |
| CustomPositionData | <not available> | Custom data produced by custom firmware |
| GsmCREG | <not available> | Network Registration Report (AT+CREG?) |
| Fstr | <not available> | GSM network signal quality from 0 up to 31 or 99 for unknown (AT+CSQ?) |
| IMSI | <not available> | International Mobile Subscriber Identity (AT+CIMI?) |
| GsmNetworkID | <not available> | The ID number of the GSM network provider that is in use |
| SimPin | <not available> | The PIN-code used to attempt to unlock the SIM-card (FFFF=no PIN-code or 0000 was tried) |
| PhoneNumber | <not available> | Phone number that called or sent an SMS to the module |
| DigTach1UtcTime | <not available> | UTC date/time of the digital tachograph as a timestamp |
| DigTach1PositionTime | <not available> | UTC date/time with current position adjustment of the digital tachograph as a timestamp |
| DigTach1StatusChanges | <not available> | Bitmask with status changes since the previous data output of the digital tachograph |
| DigTach1Workstates | <not available> | Workstates information of the digital tachograph |
| DigTach1Driver1 | <not available> | Driver 1 information of the digital tachograph |
| DigTach1Driver2 | <not available> | Driver 2 information of the digital tachograph |
| DigTach1SpeedKPH | <not available> | Speed in kilometers per hour of the digital tachograph |
| DigTach1TravelledMeters | <not available> | Travelled meters of the digital tachograph |
| DigTach1TripMeters | <not available> | Trip meters of the digital tachograph |
| DigTach1Info1 | <not available> | Information 1 of the digital tachograph |
| DigTachDataSize | <not available> | Size in bytes of the data of the digital tachograph |
| DigTachDataBytes | <not available> | The data bytes of the digital tachograph |
| Fuel | <not available> | Fuel level (0..100% / 255=unknown) |
| UserCounter | <not available> | User counters that can count whatever you make them count |
Note: Result fields marked with "<not available>" are not encoded in this module data, according to the value that is returned by the "GetSwitch()" function.