Intro | Build it! | Command reference | How it works | Download | Customize | Todo | phpBB forum
Other projects: GPS Finder | One-LED clock for people with limited vision | GPS speedometer with setpoint and relay output

Commands for build 0.14

Commands are sent to the tracker as SMS messages (not EMS/MMS/picture messaging.) All commands must be prefaced by the correct password, or they will be ignored without reply. One command per message. Commands can be upper or lower case, but passwords are case sensitive. All time values are approximate, because the tracker uses a fairly inaccurate clock. Timing values are intended to adjust power versus tracking resolution, not for precise timekeeping. Units of measurement for speed and altitude are set when the firmware is assembled, and cannot be changed without an AVR programmer.

SETADDRESS phone-number optional-email-address
Sets the reply address. Phone-number is sent as the destination in the SMS message, and can be up to 32 digits. Email-address is prefixed to the message, and can be up to 64 characters. To send to a mobile phone, provide only the phone number. To send to an email address, provide the Email Gateway as the phone number, followed by a space and the email address. The Email Gateway for AT&T is 121.

LOCATE
Requests an immediate location report from the tracker. Tracking mode also generates location reports. In POWERSAVE mode, the locate will not occur until the next power-on interval.
Example location report:
LOCATE POS 34 05.8779 N 118 20.6368 W ALT 377 FT SPEED 0.0 MPH COURSE 11.05 AT 08/04/05 22:31:51 UTC SATS 04

Report causes (first parameter of location report) - all but LOCATE and timeout are tracking mode only.
SALOCATE phone-number optional-email-address
Sets the reply address and requests an immediate locate. The reply address remains changed to the new value. This is equivalent to SETADDRESS followed by LOCATE.

SETPASSWORD new-password new-password
Changes the tracker's password. The same password must be repeated twice. It is case sensitive. Range: 3-16 characters.

SETNAME tracker-name
Sets an identifier up to 16 characters that will be prefixed before all messages. This is useful when many trackers are reporting to the same address. SETNAME with no value removes the identifier.

TRACKON
Activates TRACKING mode, and takes the device out of POWERSAVE mode if set. The device will respond with a tracking report, and will send unsolicited reports based on its motion. Tracking mode uses a lot more power than normal mode.

TRACKOFF
Takes the device out of TRACKING mode and puts it in NORMAL mode. This command also cancels POWERSAVE mode if set.

POWERSAVE
Activates POWERSAVE mode and takes the device out of TRACKING mode if set. The device will immediately go off the air, and will not accept additional commands until the next power-on interval. Set message delivery to SIM First (Message, Options, Memory Meter, Select SMS Memory, SIM First.) If you do not do this, powersave mode will not work, and you will lose remote control of the device.

POWERON
Takes the device out of POWERSAVE mode and puts it in NORMAL mode. This command also cancels TRACKING mode if set.

STATUS
Requests the status page. The SETTRACK and SETPOWER commands also return a status page showing the new settings.
Example status page:
SPDLMT=0 STOPD=120/2 BLKD=600/2 MOVNG=120/5 PSV=3600/600 3D/FIX/BLKD=72/136/96 MD=200 BAT=78 SIG=19 WDR=0 V=0.14 Open GPS Tracker

SETTRACK <up to eight parameters>
  1. Speed limit, in the same units used to report speed. If this speed is exceeded in tracking mode, the device sends a SPEEDING report. The first time the speed limit is exceeded, and each time the current fastest speed (above the limit) is exceeded, the device sends an immediate report. Otherwise, reports are sent at normal MOVING intervals, but with the tag SPEEDING. Current fastest speed is cleared by TRACKON. Range: 0-255, and 0 disables speed checking.
  2. Stopped fix interval, in seconds. Sets how often the device takes GPS fixes in tracking mode, while stopped and in GPS coverage. Range: 0-65535
  3. Stopped notify delay, in fix intervals. This determines for how many fixes in a row the device must be stopped, before sending a stopped report and switching to the stopped fix interval. Range: 0-255
  4. Blocked fix interval, in seconds. Sets how often the device attempts to take GPS fixes in tracking mode, and with no GPS coverage. Setting this too short can drain the GPS battery. Range: 0-65535
  5. Blocked notify delay. This determines for how many fixes the device must be blocked, before sending a blocked report and switching to the blocked fix interval. Range: 0-255
  6. Moving fix interval, in seconds. Sets how often the device takes GPS fixes in tracking mode, while moving. Range: 0-65535
  7. Moving notify frequency. Sets how often, in moving fix intervals, the device sends a MOVING report. Range: 0-255
  8. Minimum displacement for MOVED report. Sets how far the device must be displaced to send a MOVED report. 1000 means one minute of longitude/latitude. Setting this too short will cause spurious MOVED reports. Range: 0-65535
Example: SETTRACK 70 120 2 600 2 120 5 200
Parameters not specified will be left unchanged. The command returns a STATUS report.
Stopped and moving fix intervals can be set short without excessive battery drain, because the GPS module takes a fix in just a few seconds once it has ephemeris. Blocked fix interval should be set longer to prevent battery drain.

SETPOWER <up to five parameters>

  1. Powersave phone off interval, in seconds. Sets how long to leave the phone off for, when in POWERSAVE mode. The device will not respond to commands during this interval. Range: 0-65535
  2. Powersave phone on interval, in seconds. Sets how long to leave the phone on for, when in POWERSAVE mode. The phone must stay on long enough to receive pending commands from the network. If this interval is set too short, you can lose remote control of the tracker, requiring a manual reset. Each incoming command restarts the power-on interval. Range: 0-65535
  3. Four-satellite wait time, in seconds. Determines how long the tracker will wait for a four-satellite (3D) fix, before accepting a less accurate three-satellite (2D) fix. This should be less than fix wait time. Range: 0-1023, granularity 4 seconds.
  4. Fix wait time, in seconds. Determines how long the tracker will wait for a fix before giving up and reporting a timeout. Range: 0-1023, granularity 4 seconds, lowest useful value is 64 seconds.
  5. Blocked fix wait time, in seconds. Determines how long the device will wait for a fix before giving up, while in blocked state. This can be set shorter than the fix time above to prevent battery drain when the tracker is blocked. Setting it too short causes the device to stay in blocked mode after it moves into coverage. Range: 0-1023, granularity 4 seconds.
Example: SETPOWER 3600 600 72 136 96
Parameters not specified will be left unchanged. The command returns a STATUS report.

REBOOT
Reboots the tracker, and if phone rebooting is enabled in the firmware, also reboots the phone. This clears working memory but does not erase saved settings. Equivalent to shorting pins 5 and 6 on the programming connector, or unplugging the phone and removing the batteries.

REINIT
Erases all settings and puts the device into "new chip" state. This wipes out the reply address and password, so the next command must be GPS SETADDRESS. Equivalent to the hardware reinit procedure. Also reboots the phone if phone rebooting is enabled in firmware.

Hardware reinit
This manual procedure erases all settings if you are unable to communicate with the device over the air (usually because you lost the password.) Make sure you are electrically grounded to prevent static damage. You need a jumper of the type used on CD-ROM and hard drives to set master/slave modes. Put the jumper between pins 3 and 4 (middle two pins) on the programming header (bridge MCU pins 7 and 9.) Reboot the device by either applying power with no phone attached, or momentarily shorting pins 5 and 6 on the programming header.

The status LED should blink code 34. When it stops blinking, remove the jumper. The LED will now blink 33 and 31. The device is cleared and ready for a GPS SETADDRESS. The clearing occurs when you remove the jumper.

Status codes - first digit blinks green, second digit blinks red.
CodeDescription
11phone polled
12send message failed
13phone poll failed
14no phone number defined
21invalid password
31power on or reset
32watchdog reset
33eeprom initialized from defaults
34remove jumper to reinit