This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
reference:qstar_gps_tracker [2014/08/04 18:31] mjallison [Sources] |
reference:qstar_gps_tracker [2014/10/06 16:56] (current) mjallison [Non-NMEA Protocol for AGTEK] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Introduction ====== | ====== Introduction ====== | ||
- | The QStarz GPS Q-1000XT tracker is small encapsulated GPS tracker, similar to a G-Ray, which provides standard GPS tasks, logging, point of interest (POI) recording, and basic functionality to enable navigation on devices not containing a built in GPS. http://www.amazon.com/Q-1000XT-BT-Q1000XT-Bluetooth-Waypoints-Vibration/dp/B00144PH1S | + | The QStarz GPS Q-1000XT and Holux 3000rcvr trackers are small encapsulated GPS tracker, similar to a G-Ray, which provides standard GPS tasks, logging, point of interest (POI) recording, and basic functionality to enable navigation on devices not containing a built in GPS. http://www.amazon.com/Q-1000XT-BT-Q1000XT-Bluetooth-Waypoints-Vibration/dp/B00144PH1S |
The instrument provides a serial (over USB) interface as well as bluetooth connection capability. The communication protocol is a super-set of NMEA 183 standard NMEA sentences for GPS satellite information and location information. Additional settings controllable through the serial protocol allow the user to set | The instrument provides a serial (over USB) interface as well as bluetooth connection capability. The communication protocol is a super-set of NMEA 183 standard NMEA sentences for GPS satellite information and location information. Additional settings controllable through the serial protocol allow the user to set | ||
Line 9: | Line 9: | ||
* Control of the frequency of location updates from 0.1 to 10 seconds. | * Control of the frequency of location updates from 0.1 to 10 seconds. | ||
- | The 1000XT is structured around the Mediatek MTK GPS chip which supports the standard NMEA sentences as well as the Mediatek extensions. | + | The QStarz and Holux are structured around the Mediatek MTK GPS chip which supports the standard NMEA sentences as well as the Mediatek extensions. |
===== Non-NMEA Protocol for AGTEK ===== | ===== Non-NMEA Protocol for AGTEK ===== | ||
Line 19: | Line 19: | ||
* Turn buzzer off | * Turn buzzer off | ||
- | | **Option** | **Command** (NB: Checksum not shown) | | + | | **PMTK sentences** | **Description** | |
- | | Motion Sensor | ''$PTSI004,2,1 (enable) and $PT SI004,2,0 (disable)'' | | + | | ''$PMTK001,182,5,3'' | Acknowledge packet, in this case "disable logging" | |
- | | Log rate (time) | ''$PMTK220,1000'' sets rate to 1Hz | | + | | ''$PMTK182,1,3,10'' | Set the logging period to 1/sec (units are in seconds*10) | |
- | | Log distance | | | + | | ''$PMTK182,1,4,990'' | Set the logging distance 99 m (units are in meters*10) | |
- | | Log speed | ''$PMTK397,0.0'' sets rate to zero m/S | | + | | ''$PMTK182,1,5,420'' | Set the logging speed to 42.0 km/h (units are speed*10) | |
- | | Log memory (overwrite) | | | + | | ''$PMTK182,2,2'' | Get Log format, has several sub-commands | |
+ | | ''$PMTK182,2,7'' | Get Log status | | ||
+ | | ''$PMTK182,2,8'' | Get flash usage, e.g. How much log data is stored | | ||
+ | | ''$PMTK182,3,3,10'' | Report logging time interval 1 second (units are seconds*10) | | ||
+ | | ''$PMTK182,3,4,990'' | Report logging speed to 99 m (units are in meters*10) | | ||
+ | | ''$PMTK182,3,5,420'' | Report logging speed set to 42 kmh (units are in speed*10) | | ||
+ | | ''$PMTK182,3,8,XXX'' | Report flash usage | | ||
+ | | ''$PMTK182,4'' | Enable logging | | ||
+ | | ''$PMTK182,5'' | Disable logging | | ||
+ | | ''$PMTK182,6,1'' | Log erase, responds with ''$PMTK001,182,6,3'' | | ||
+ | | ''$PMTK182,7,00000000,00010000'' | Download data, params are (hex) start, and length | | ||
+ | | ''$PMTK182,8,00000000,xxxx'' | Downloaded data from the instrument | | ||
+ | | ''$PMTK492'' | Query bluetooth mac address, resp == ''$PMTK592,0BAC01ii1C00*13'' useful for tracker id | | ||
+ | |||
+ | | **PTSI sentences** | **Command** (NB: Checksum not shown) | | ||
+ | | ''$PTSI004,2,1'' | Enabled motion sensor | | ||
+ | | ''$PTSI004,2,0'' | Disable motion Sensor | | ||
+ | | ''$PTSI002,1,xyz'' sets name to xyz | Set device name (QStarz only?), resp == ''$PTSI002,3,WriteOK'' | | ||
+ | | ''$PTSI002,2'' reads name of tracker | resp == ''$PTSI002,0,name'' | | ||
* Downloading tracks | * Downloading tracks | ||
+ | |||
+ | ===== AGTEK Initialization sequence ===== | ||
+ | TrackReader for Android uses the following initialization sequence (with comments). | ||
+ | <code> | ||
+ | $PTSI004,2,1 # Enable motion sensor | ||
+ | $PMTK182,1,3,10 # Set logging to 1 Hz | ||
+ | $PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
+ | $PMTK182,4 # Enable logging | ||
+ | </code> | ||
===== Sources ===== | ===== Sources ===== | ||
QStarz is (as a company) not forthcoming with the interface capabilities of their device. Others have reverse engineered a large portion of what's going on. The MTK chip is reasonably well documented and MTK documents are plentiful on the internet. | QStarz is (as a company) not forthcoming with the interface capabilities of their device. Others have reverse engineered a large portion of what's going on. The MTK chip is reasonably well documented and MTK documents are plentiful on the internet. | ||
Line 37: | Line 64: | ||
https://code.google.com/p/gpsbabel/source/browse/trunk/gpsbabel/mtk_logger.c?spec=svn3365&r=3365 | https://code.google.com/p/gpsbabel/source/browse/trunk/gpsbabel/mtk_logger.c?spec=svn3365&r=3365 | ||
and in a Java program: https://github.com/ryantenney/geologger/blob/master/BTQ1000.java | and in a Java program: https://github.com/ryantenney/geologger/blob/master/BTQ1000.java | ||
- | |||
- | Here is a subset of the PMTK182 commands | ||
- | |||
- | | **CMD** | **Description** | | ||
- | | ''$PMTK182,2,2'' | Log format, has several sub-commands | | ||
- | | ''$PMTK182,2,7'' | Log status | | ||
- | | ''$PMTK182,3,XX'' | Log time interval | | ||
- | | ''$PMTK182,3,4,990'' | Set logging speed to 99 m/s (units are in speed*10) | | ||
- | | ''$PMTK182,4'' | Enable logging | | ||
- | | ''$PMTK182,5'' | Disable logging | | ||
- | | ''$PMTK182,6,1'' | Log erase | | ||
- | | ''$PMTK182,7,00000000,00010000'' | Download data, params are (hex) start, and length | | ||
- | | ''$PMTK182,8,00000000,xxxx'' | Downloaded data from the instrument | | ||
The motion sensor control commands have been reversed engineered by using a serial monitor (here at AGTEK), and have been verified by others on the internet: http://www.bt747.org/de/forum/bt-q100xt-controlling-vibration-sensor | The motion sensor control commands have been reversed engineered by using a serial monitor (here at AGTEK), and have been verified by others on the internet: http://www.bt747.org/de/forum/bt-q100xt-controlling-vibration-sensor | ||
+ | |||
+ | The BT747 author has provided a nice spreadsheet of various operations on the Holux API: http://spreadsheets.google.com/pub?key=pyCLH-0TdNe-5N-5tBokuOA&gid=5 | ||
===== Questions ===== | ===== Questions ===== | ||
As of 2014-08-02 some questions still remain: | As of 2014-08-02 some questions still remain: | ||
- | * What commands are needed to download tracks | ||
- | * Are there other parameters that need to be set in order to make the device work? | ||
* Can we set a unique serial number? (Track Reader for Android can easily supply a unique serial number, and alias, based on the instrument's Bluetooth MAC address). | * Can we set a unique serial number? (Track Reader for Android can easily supply a unique serial number, and alias, based on the instrument's Bluetooth MAC address). | ||