| 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|ceVfb00DNJM1SL3G4Tfj9w01k1E7d0r0--0G0qvfJu42
www.YourServer.com/YourScript.php?YourVariableName=1234567|ceVfb00FGMs1SO22u2dzBw0JjTaelMd02x0S04hCKu42
www.YourServer.com/YourScript.php?YourVariableName=1234567|ceVfb00ZDv4O05GB00Tgp0shyfs000000000008V2c02|ceVfb00l10Q1LTiO07VzQw10mo2elMd42BkS02JCKuk2|ceVfb85cwv0Q-Y3-M35N3v-0kU2BvM-3J000002P0c02|ceVfb00BaVQ1MGObliNFK_00dL1ZF0beJ00Ew2GZBY02|ceVfb2zGXq5v50000exx0iwRfvM0000jn04N00380c00|ceVfb2zGXq602w000exD0g0000000000000000000c00|ceVfb5hEqndD5i1FsO1x87dBsCBxr21QpndQ00210c00|ceVfb4hOqnpM6mlOey1arSxKeO1jt65QtncW84NLos06|ceVfb6hFrCtN6i1zon9DrPIwimVSrSBzpjEwcj8Pdc06|ceVfb3kSdPxO1000001N500Hkcn22000J00y002Z0c06|ceVfbb003glEqNtZvQIg0c0bvlH50g40001g0gc0SY43
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|ceVfb00DNJM1SL3G4Tfj9w01k1E7d0r0--0G0qvfJu42
1234567|ceVfb00FGMs1SO22u2dzBw0JjTaelMd02x0S04hCKu42
1234567|ceVfb00ZDv4O05GB00Tgp0shyfs000000000008V2c02|ceVfb00l10Q1LTiO07VzQw10mo2elMd42BkS02JCKuk2|ceVfb85cwv0Q-Y3-M35N3v-0kU2BvM-3J000002P0c02|ceVfb00BaVQ1MGObliNFK_00dL1ZF0beJ00Ew2GZBY02|ceVfb2zGXq5v50000exx0iwRfvM0000jn04N00380c00|ceVfb2zGXq602w000exD0g0000000000000000000c00|ceVfb5hEqndD5i1FsO1x87dBsCBxr21QpndQ00210c00|ceVfb4hOqnpM6mlOey1arSxKeO1jt65QtncW84NLos06|ceVfb6hFrCtN6i1zon9DrPIwimVSrSBzpjEwcj8Pdc06|ceVfb3kSdPxO1000001N500Hkcn22000J00y002Z0c06|ceVfbb003glEqNtZvQIg0c0bvlH50g40001g0gc0SY43
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|ceUchM0FGMs1SO22u2dzBw0JjTaelMd02x0S04hCKu42") result: TRUE
CGPS::GetDataPartCount() result: 1
CGPS::SelectDataPart(0) result: TRUE
CGPS::IsValid() result: TRUE
| CGPS::Get...() function | Result | Description |
|---|---|---|
| UtcTime | 1765224682.00 (=Mon, 08 Dec 2025 20:11:22 +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 | 87 | Module log index number of the data |
| EventID | 68 (=Above speed limit) | 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 | 89.6 (=East) | Heading direction from 0.0 up to 359.9 degrees |
| SpeedKPH | 142.8 | Speed in kilometers per hour |
| SpeedMPH | 88.7 | Speed in miles per hour |
| SpeedKnots | 77.1 | Speed in knots |
| GpsStatus | 0 (=OK) | Status of the GPS receiver |
| IO | 16 (=in: 1a 2i 3i 4i / 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 | 20251208201122 | UTC date/time of the data in SQL query format (yyyymmddhhmmss text) |
| GpsTimeMySQL | 20251208201140 | GPS date/time of the data in SQL query format (yyyymmddhhmmss text) |
| GpsTime | 1765224700.00 (=Mon, 08 Dec 2025 20:11:40 +0000 GPS) | GPS date/time of the data as a timestamp |
| View | 11 | Number of "visible" satellites |
| Fix | 9 | Number of satellites used to determine the GPS information |
| MaxDB | 54 | 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 | 31137922 (=0x1DB2082) | Latitude in small storage form |
| LatitudeFloat | 51.89654 | Latitude as floating point value |
| LatitudeDegrees | 51°53'47" N / 51°53.7922' N | Latitude in Degrees, Minutes, Seconds, N(orth)/S(outh) and minute decimals |
| LongitudeSmall | 2730759 (=0x29AB07) | Longitude in small storage form |
| LongitudeFloat | 4.55126 | Longitude as floating point value |
| LongitudeDegrees | 4°33'04" E / 4°33.0759' E | Longitude in Degrees, Minutes, Seconds, E(ast)/W(est) and minute decimals |
| LatLongMarginInMeters | 3.3 | Maximum Latitude/Longitude position dislocation in meters with a probability of 67% |
| LatLongMarginInFeet | 10.9 | Maximum Latitude/Longitude position dislocation in feet with a probability of 67% |
| AltitudeInMeters | 45.0 | Altitude in meters (above WGS84 ellipsoid) |
| AltitudeInFeet | 147.6 | 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 | 358 | 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 | 13.15 | Power supply voltage of the module |
| Reset | 65536 | Number of seconds since the module was powered-up (or reset) |
| Shake | 10 | Minimum number of seconds left for the module to return to the "Not Moving" state |
| TemperatureCelcius | 19.4 | Temperature of the built in (or external substitute) sensor in degrees Celsius |
| TemperatureFahrenheit | 67.0 | 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.