Daviscomms MTD2000 Command Manual

Page 1
MTD2000 AT Command Guide R12
AT Command Guide
MTD2000
Revision 12
1 Jun 2010
Confidential DAVISCOMMS (S) PTE LTD 1 /105
Page 2
MTD2000 AT Command Guide R12
Revision History
Rev
01 02-Sep-08 CF Chan Initial release. 02 1-Dec-08 CF Chan 1. Add repeat command, event debug command.
03 30-Apr-09 CF Chan 1. Added panic button and counter command.
04 08-May-09 CF Chan 1. Revised standard report format to shorten the total length
05 12-Jun-09 CF Chan 1. Added $ACC for harsh acceleration detection.
06 03-Jul-09 CF Chan 1. Added $NU to support UDP channel.
07 20-Jul-09 CF Chan 1. Added $ND command for DNS server address.
Date Author Description
2. Revise standard report format.
3. Revise the setting list in $SC.
4. Rename $NR to $NA since $NR is used for NMEA.
5. Add the maximum length for IP address.
2. Added RS232 interface mode command.
3. Added GPS data flag in the event table.
4. Added host name constraints for TCP/IP address.
5. Revised GSM LED definition to follow MC55i.
6. Revised memory logging to overwrite memory data when memory is full.
7. Revised memory dump to keep the unsent data in the memory.
8. Revised $EV to support 5 conditions, 10 commands, 250 chars maximum length.
9. Revised the ADC conversion algorithm for external power and battery power.
10. Removed $NA as heartbeat message is not ready.
11. Removed $PI as debouncing is done via hardware mean.
12. Removed $PO as $OUT will serve the same purpose.
including device ID to less then 90 chars.
2. Removed ‘;’ as the command terminator for commands sent via SMS and TCP channel.
2. Added $DEC for harsh deceleration detection.
3. Added $DB to set the data memory size.
4. Revised the default port configuration to 8 input ports.
5. Revised $SS command to place individual GSM/GPS module to sleep.
6. Revised ADC reference voltage to 3.3V in $XE and $XB command.
2. Added $CR to support cell ID.
2. Added watchdog timer to prevent firmware lockup.
3. Monitor and reset GSM and GPS module if it stops responding.
4. Terminate command response with carriage return and line feed for TCP channel.
Confidential DAVISCOMMS (S) PTE LTD 2 /105
Page 3
MTD2000 AT Command Guide R12
07A 31-Jul-09 CF Chan 1. Revised default data buffer to 300 reports.
08 01-Aug-09 CF Chan 1. Added $MS and $MC for mileage counter.
2. Added GPS antenna detection.
3. Added error code 2303 to indicate failure to send report via SMS.
09 16-Sep-09 CF Chan 1. Increase APN length to 40 characters in $NG command.
2. Increase watchdog timeout to 65 seconds.
3. Revised SMS recipient in $EI to single SMS number.
4. Revised minimum report interval in $CR to 5 sec.
10 02-Oct-09 CF Chan 1. Added a System Overview section.
2. Added $SIM for dual SIM card.
3. Added GSM/GPRS commands pass through.
4. Removed the support of the following characters (text message, report, etc) which are not in the default GSM character set: [ \ ] ^ _ ` { | } ~
10A 10-Mar-10 CF Chan 1. Added $LB for low battery shutdown.
2. Revised interval of data log to 60 sec and above.
3. Revised the maximum length of AT command and event to 120 characters.
11 17-May-10 CF Chan 1. Added $GF and $GS for geo fence.
2. Added $AI and $AO for analog input and output.
3. Added $FSD and $FSO for fail safe output.
4. Added $MD for motion sensor sensitivity.
5. Added $DI for driver ID.
6. Added $OS for over speed detection.
7. Added $KR for key on reset.
8. Added $GM for GSM modem.
9. Added $SU for over the air firmware upgrade.
10. Added $CV for voice call and silent call.
11. Added $CA for auto answer incoming call.
12. Added $CS for MIC gain and speaker volume.
13. Added $GC and $GA for dead reckoning calibration.
14. Added $BC for battery charging control.
15. Added hardware watchdog timer.
16. Added test mode for peripheral test.
17. Support 5000 reports for data logging.
18. Removed $LB for low battery shutdown.
19. Revised the maximum length of AT command and event to 150 characters.
12 1-Jun-10 Kyle Hor 1. Updated system code 2105 to include possibility that no
battery is present.
2. Added precaution not to send $SR via SMS at less than 10sec interval.
3. Added $MZ for motion detect calibration and modified calibration mode not to be unique to gyroscope only.
4. $MD accuracy range and default value changed.
Confidential DAVISCOMMS (S) PTE LTD 3 /105
Page 4
MTD2000 AT Command Guide R12
Table of Contents
1 Introduction ........................................................................................................................7
2 Features Summary.............................................................................................................8
3 System Overview.............................................................................................................10
3.1 End-User-Based Reporting (SMS)............................................................................10
3.2 Server-Based Reporting (SMS) ................................................................................11
3.3 Server-Based Reporting (TCP/UDP Socket).............................................................11
4 AT Command Syntax.......................................................................................................12
4.1 AT Command............................................................................................................12
4.2 Write Command........................................................................................................13
4.3 Query Command.......................................................................................................13
4.3.1 Single Index Command......................................................................................13
4.3.2 Multiple Index Command...................................................................................13
4.4 Execution Command.................................................................................................14
4.5 Command Response................................................................................................14
4.5.1 Normal Response..............................................................................................14
4.5.2 Unsolicited Response........................................................................................15
4.6 Command Interface ..................................................................................................15
5 System Code....................................................................................................................16
5.1 MTD System Code....................................................................................................16
5.2 GSM System Code...................................................................................................16
5.3 GPS System Code....................................................................................................17
6 LED Indication..................................................................................................................18
6.1 Charging LED ...........................................................................................................18
6.2 GSM LED..................................................................................................................18
6.3 GPS LED..................................................................................................................18
7 Basic Command...............................................................................................................19
7.1 Command Mode – AT...............................................................................................19
7.2 Repeat Last Command – A/......................................................................................19
8 System Command............................................................................................................21
8.1 System Version – AT$SV..........................................................................................21
8.2 System Identity – AT$SI............................................................................................21
8.3 System Default – AT$SD..........................................................................................22
8.4 System Configuration – AT$SC................................................................................23
8.5 System Reset – AT$ST ............................................................................................24
8.6 System Sleep – AT$SS ............................................................................................25
8.7 System Upgrade – AT$SU........................................................................................25
8.8 System Boot Mode – AT$SB ....................................................................................27
8.9 Error and Status Indication – AT$EI..........................................................................28
9 SMS Command................................................................................................................29
9.1 SMS/Call Number List – $SL ....................................................................................29
10 Network Command.......................................................................................................31
10.1 TCP/IP Address List – AT$NT ..................................................................................31
10.2 UDP/IP Address List – AT$NU..................................................................................32
10.3 GPRS Profile List – AT$NG ......................................................................................33
10.4 DNS Server Address – AT$ND.................................................................................34
Confidential DAVISCOMMS (S) PTE LTD 4 /105
Page 5
MTD2000 AT Command Guide R12
10.5 Network Connection – AT$NC..................................................................................35
11 Text Message Command .............................................................................................39
11.1 Text Message List – AT$TL ......................................................................................39
11.2 Text Message – AT$TM............................................................................................40
12 Location Report Command...........................................................................................42
12.1 Standard Report – AT$SR ........................................................................................42
12.2 NMEA Report – AT$NR............................................................................................47
12.3 Cell ID Report – AT$CR............................................................................................48
13 Data Log Command .....................................................................................................52
13.1 Data Buffer – AT$DB ................................................................................................52
13.2 Data Dump – AT$DD................................................................................................52
13.3 Data Clear – AT$DC.................................................................................................53
14 Call Command..............................................................................................................55
14.1 Originate Call – AT$CV.............................................................................................55
14.2 Auto Answer – AT$CA..............................................................................................56
14.3 Speaker Volume and MIC Gain – AT$CS.................................................................56
15 Geo Fence Command ..................................................................................................58
15.1 Geo Fence – AT$GF.................................................................................................58
15.2 Geo Fence Status – AT$GS .....................................................................................59
16 Speed and Mileage Command.....................................................................................61
16.1 Over Speed Detection – AT$OS...............................................................................61
16.2 Harsh Acceleration – AT$ACC..................................................................................62
16.3 Harsh Deceleration – AT$DEC .................................................................................62
16.4 Mileage Setting – AT$MS .........................................................................................63
16.5 Mileage Counter – AT$MC........................................................................................64
17 Dead Reckoning...........................................................................................................66
17.1 Gyro Calibration – AT$GC ........................................................................................66
17.2 Dead Reckoning Calibration Accuracy – AT$GA......................................................67
18 Digital IO Command .....................................................................................................68
18.1 Port Configuration – AT$PC......................................................................................68
18.2 Output Port Default – AT$PD....................................................................................69
18.3 Port Status – AT$PS.................................................................................................70
18.4 Input Port – AT$IN ....................................................................................................71
18.5 Output Port – AT$OUT .............................................................................................71
19 Analog IO Command....................................................................................................73
19.1 Analog Input Port – AT$AI ........................................................................................73
19.2 Analog Output Port – AT$AO....................................................................................74
20 Fail Safe Output Command..........................................................................................75
20.1 Fail Safe Output Default – AT$FSD..........................................................................75
20.2 Fail Safe Output – AT$FSO ......................................................................................76
21 Peripherals Command..................................................................................................77
21.1 Driver ID – AT$DI......................................................................................................77
21.2 Dual SIM – AT$SIM ..................................................................................................77
21.3 Panic Button – AT$PB ..............................................................................................78
21.4 Key On Reset – AT$KR............................................................................................79
21.5 Battery Charging – AT$BC........................................................................................80
21.6 Motion Detection Calibration – AT$MZ .....................................................................81
21.7 Motion Detection Sensitivity – AT$MD......................................................................82
Confidential DAVISCOMMS (S) PTE LTD 5 /105
Page 6
MTD2000 AT Command Guide R12
21.8 GSM Modem – AT$GM.............................................................................................82
21.9 UART Control – AT$UM............................................................................................83
22 Power Status Command...............................................................................................85
22.1 External Power Status – AT$XE ...............................................................................85
22.2 Battery Power Status – AT$XB.................................................................................86
23 Timer and Counter Command......................................................................................88
23.1 Timer – AT$FT..........................................................................................................88
23.2 Counter – AT$FC......................................................................................................89
24 Event Command...........................................................................................................92
24.1 Event Table...............................................................................................................92
24.2 Event – $EV..............................................................................................................93
25 Miscellaneous Functions ..............................................................................................96
25.1 GSM Monitoring........................................................................................................96
25.2 GPS Monitoring.........................................................................................................96
25.3 GPS Antenna Detection............................................................................................96
25.4 Low Battery Shutdown..............................................................................................96
25.5 Watchdog Timer........................................................................................................97
25.6 Firmware Upgrade ....................................................................................................97
25.7 Test Mode.................................................................................................................97
26 Appendix ......................................................................................................................98
26.1 NMEA Messages ......................................................................................................98
26.1.1 GLL – Geographic Position (Latitude / Longitude).............................................98
26.1.2 GGA – Global Positioning System Fix Data.......................................................99
26.1.3 GSA – DOP and Active Satellites ......................................................................99
26.1.4 GSV – Satellites in View ..................................................................................100
26.1.5 VTG – Course Over Ground and Ground Speed.............................................101
26.1.6 RMC – Recommended Minimum Specific GNSS Data....................................101
26.1.7 ZDA – Time and Date ......................................................................................102
26.2 TCP Connection Setup ...........................................................................................104
26.2.1 Connecting from MTD to TCP Server..............................................................104
26.2.2 Disconnecting TCP Server from MTD..............................................................104
26.3 UDP Connection Setup...........................................................................................105
26.3.1 Connecting from MTD to UDP Server..............................................................105
26.3.2 Disconnecting UDP Server from MTD .............................................................105
Confidential DAVISCOMMS (S) PTE LTD 6 /105
Page 7
MTD2000 AT Command Guide R12
1 Introduction
This document defines the AT commands used for interfacing between a host application and the MTD2000. The MTD2000 comes with a built-in event driven engine which allow user to define the events for different applications.
Confidential DAVISCOMMS (S) PTE LTD 7 /105
Page 8
MTD2000 AT Command Guide R12
2 Features Summary
MTD2000 supports the following features:
1. LED
Red LED for charging indication
Green LED for GSM status indication
Yellow LED for GPS status indication
2. Configuration
Programmable unit ID
5 battery power monitor
5 external power monitor
10 programmable SMS numbers
10 programmable TCP/IP addresses
10 programmable UDP/IP addresses
10 programmable GPRS profiles
10 programmable timers
10 programmable counters
20 geographical fences
20 text messages
20 user defined events
3. Message and Report
User defined text message
NMEA 0183 report (GLL, GGA, GSA, etc)
Standard report (location, IO and system status, etc)
Cell ID report (cell ID of serving cell and neighbor cells)
Data logging of up to 300 / 5000 standard reports
4. Speed and Mileage
Mileage counter
Over speed detection
Harsh acceleration / deceleration detection
5. Digital IO Port
4 digital input ports
4 programmable digital input / output ports
Confidential DAVISCOMMS (S) PTE LTD 8 /105
Page 9
MTD2000 AT Command Guide R12
1 fail safe output port
6. Analog IO Port
1 analog input port
1 analog output port
7. Power Monitor
Backup battery low power detection
External power source low power detection
8. Data and Configuration
Configure device via serial port, SMS and TCP/UDP channel
Receive data via serial port, SMS and TCP/UDP channel
9. Firmware Upgrade
Firmware upgrade via serial port
Over the air firmware upgrade
10. General
Driver ID
Panic button
Key on reset
Dead reckoning
Motion detection with programmable sensitivity
Dual SIM cards for SIM fail switchover and border crossing
GSM/GPRS command pass through
GPS external antenna tamper sensing
Support DNS for server PC with dynamic IP address
Watchdog timer to prevent unit lockup
Low battery shutdown
Turn of battery charging when external voltage drops below a designated threshold
Function as GSM/GPRS modem
Confidential DAVISCOMMS (S) PTE LTD 9 /105
Page 10
MTD2000 AT Command Guide R12
3 System Overview
3.1 End-User-Based Reporting (SMS)
The device can be configured to send reports or text messages in SMS to mobile phones as illustrated below:
GSM/GPRS network
SMS Messages
Confidential DAVISCOMMS (S) PTE LTD 10 /105
Page 11
MTD2000 AT Command Guide R12
3.2 Server-Based Reporting (SMS)
The device can be configured to send reports in SMS to the server (with GSM Modem) as illustrated below:
Tracking Units
GSM/GPRS
network
GSM Modem
Application
Server
SMS messages
3.3 Server-Based Reporting (TCP/UDP Socket)
The device can be configured to send reports via TCP Socket to the server as illustrated below:
GSM/GPRS
network
Application
Server
Internet
TCP/UDP Socket
Confidential DAVISCOMMS (S) PTE LTD 11 /105
Page 12
MTD2000 AT Command Guide R12
4 AT Command Syntax
The MTD AT commands are accessible via serial port, SMS and TCP / UDP channel. The maximum length of AT commands including the overhead is 120 characters. The default settings of serial port are as follows: 115200 bps, 8 data bits, no parity bit, 1 stop bit, hardware flow control. Upon power, the device will send out “MTD2000 READY” to the serial port using the serial port setting.
The MTD AT command has the prefix of “AT$” or “at$” and is not case sensitive in both the command and the parameters.
Note 1: All settings via MTD AT commands (command with prefix “AT$”) are saved into the flash at the point of entry.
Note 2: The native GSM/GPRS AT commands (command with prefix “AT+” and “AT^”) will be routed to the GSM module for handling and the corresponding response will be sent back to the host via serial port. The GSM/GPRS AT commands are only available via serial port.
4.1 AT Command Serial Port
The "AT" or "at" prefix must be set at the beginning of each command line. To terminate a command line enter <CR><LF>. Commands are usually followed by a response that includes "<CR><LF><response><CR><LF>". Throughout this document, only the responses are presented, <CR><LF> are omitted intentionally.
Single AT command can be sent to the device via serial port using the following format:
Syntax Example
<AT$Command><CR><LF>
SMS and TCP / UDP Channel
Single AT command can be sent to the device via SMS and TCP / UDP channel using the following format without the “AT” or “at” prefix:
Syntax Example
<$Command> $SV
AT$SV
Confidential DAVISCOMMS (S) PTE LTD 12 /105
Page 13
MTD2000 AT Command Guide R12
4.2 Write Command
The write command is used to set the parameters in an AT command.
Command Response
AT$ABC=<parameter 1>,…,<parameter N>
OK Other responses (if any)
4.3 Query Command
The query command is used to query the current setting of an AT command.
4.3.1
Single Index Command
Single index command is referred to the command that holds only one element (e.g. AT$PC, port configuration). The following query command is used to query the current setting of a single index AT command.
Command Response
AT$ABC?
OK $ABC: <Parameter 1>,…,<Parameter N>
4.3.2
Multiple Index Command
Multiple index command is referred to the command that holds multiple elements (e.g. AT$SL, SMS number list).
Query Individual Setting
The following query command is used to query the current setting of an element in a multi index AT command.
Command Response
AT$ABC=<Index>
OK $ABC: <Index>,<Parameter 1>,…,<Parameter N>
Query All Setting
Confidential DAVISCOMMS (S) PTE LTD 13 /105
Page 14
MTD2000 AT Command Guide R12
The following query command is used to query the current setting of all the elements in a multi index AT command. The query all setting is not accessible via SMS due to large amount of data.
If the user is trying to query all settings via SMS, the device will send out an unsolicited response to indicate settings retrieval not allowed.
Command Response
AT$ABC?
OK $ABC: 1,<Parameter 1>,…,<Parameter N> … $ABC: M,<Parameter 1>,…,<Parameter N>
4.4 Execution Command
The execution command is used to execute an AT command.
Command Response
AT$ABC
OK Other responses (if any)
4.5 Command Response
4.5.1
Normal Response
For any command sent to the device, it will respond with either “OK” or “ERROR”. If there is no syntax error in the command and all the parameters are correct, the device will respond with “OK”, followed by the result (if any) after command execution. Otherwise, the device will respond with “ERROR” and will not execute the command.
The command response (e.g. standard report) will be terminated by carriage return and line feed (<CR><LF>) if the channel is serial port or TCP channel (no carriage return and line feed for SMS channel).
Syntax Example
<CR><LF>OK<CR><LF> Note: Successful response.
<CR><LF>ERROR<CR><LF Note: Failure response.
<CR><LF><$Command>: <Parameter 1>,…,<Parameter n> $SL: 1,”91234567”
OK
ERROR
Confidential DAVISCOMMS (S) PTE LTD 14 /105
Page 15
MTD2000 AT Command Guide R12
<CR><LF> Note: Response without device ID.
<CR><LF><$Command>: <Parameter 1>,…,<Parameter n>; <Device ID><CR><LF> Note: Response with device ID.
$SL: 1,”91234567”;ABC1234D
4.5.2
Unsolicited Response
When the device is unable to execute the command successfully or has status update, it will send out unsolicited response for error and status indication via the selected channels (serial port, SMS or TCP / UDP channel).
The unsolicited response will be terminated by carriage return and line feed (<CR><LF>) if the channel is serial port or TCP channel (no carriage return and line feed for SMS channel).
For example, if the user is trying to establish another TCP / UDP connection without closing the existing TCP / UDP connection first, the device will send out an unsolicited response to indicate network connection not allowed.
Syntax Example
<CR><LF>$MTD: <System Code><CR><LF> $MTD: 5201
4.6 Command Interface
The command can be sent to the device via:
1. RS232 Serial Port
2. Over the air via SMS (GSM)
3. Over the air via TCP / UDP channel (GPRS) Notes:
Only MTD2000 AT commands (command with prefix “AT$”) are allowed in SMS and TCP / UDP channel.
Confidential DAVISCOMMS (S) PTE LTD 15 /105
Page 16
MTD2000 AT Command Guide R12
5 System Code
5.1 MTD System Code
Data Dump 1001 Data dump started 1002 Data dump completed
1003 No logged data in the memory 1004 Data dump not allowed while logging is in progress
AT Command
2001 Command input buffer is full 2002 Invalid command 2003 Invalid parameter
General
2101 Memory full for data log 2102 Data dump stopped due to communication link down 2103 Not allow to retrieve all settings via SMS due to large amount of data
2104 Device shutdown due to low battery 2105 Stop battery charging due to low external voltage or no battery connected 2106 Resume battery charging when low external voltage goes up
Input / Output
2201 Invalid input port
2202 Invalid output port
Send Report
2301 Network channel is not established to send report
2302 SMS number is not defined to send report
2303
Network Connection
2401 New network connection not allowed until the existing connection is closed
2402 Network disconnection not allowed while data dump is in progress
OTA Firmware Upgrade 2501 Download complete and upgrade start 2502 Fail to download 2503 Invalid GPRS profile 2504 Invalid FTP URL 2505 Invalid user name 2506 Invalid user password 2507 Invalid image
Fail to send report via SMS
5.2 GSM System Code
5000 GSM is in sleep mode 5001 GSM bearer connection failed 5002 GSM is not registered 5101 GPRS bearer connection failed
Confidential DAVISCOMMS (S) PTE LTD 16 /105
Page 17
MTD2000 AT Command Guide R12
5201 TCP / UDP channel establishment failed 5202 TCP / UDP channel connected 5203 TCP / UDP channel disconnected by remote (via SMS or TCP / UDP channel) 5204 TCP / UDP channel disconnected by local (via serial port or event)
5.3 GPS System Code
6001 GPS is in sleep mode 6002 GPS is not operational 6003 Calibration not supported 6004 Dead reckoning failed 6005 Calibration entry 6006 Calibration exit 6007 Motion Detect failed
Confidential DAVISCOMMS (S) PTE LTD 17 /105
Page 18
MTD2000 AT Command Guide R12
6 LED Indication
6.1 Charging LED
Charging status is indicated by a red LED as follows:
1. Red LED On
Charging of Li-ion battery is in progress.
2. Red LED Off
Charging of Li-ion battery is completed.
6.2 GSM LED
GSM status is indicated by a green LED as follows:
1. Green LED Blinking
Fast Blink (600 ms on / 600ms off)
No SIM card inserted or network search in progress.
Slow Blink (75 ms on / 3 s off)
Registered to the GSM network.
2. Green LED Off
GSM module is in sleep or power down mode.
6.3 GPS LED
GPS status is indicated by a yellow LED as follows:
1. Yellow LED On
GPS position is fixed, ready for tracking.
2. Yellow LED Off
GPS position is not fixed, not ready for tracking.
Confidential DAVISCOMMS (S) PTE LTD 18 /105
Page 19
MTD2000 AT Command Guide R12
7 Basic Command
7.1 Command Mode – AT
This command will prompt the device to return a positive acknowledgement via the command channel, which can be used to check the communication link between the remote host and the device.
Syntax
Command Response
AT
Parameters
Nil
Example
Command Response
AT Note: Send this command via serial port to check the corresponding communication link.
AT Note: Send this command via SMS and check the corresponding communication link.
AT Note: Send this command via network channel to check the corresponding communication link.
7.2 Repeat Last Command – A/
This command will repeat the last valid command of the open session, only the A/ command itself cannot be repeated. If this command is the first one of the open session, the response is OK without any treatment.
OK
OK Note: Send to serial port.
OK Note: Send to SMS number.
OK Note: Send to network channel.
Syntax
Command Response
A/ <repeat last command>
Confidential DAVISCOMMS (S) PTE LTD 19 /105
Page 20
MTD2000 AT Command Guide R12
Parameters
Nil
Example
Command Response
AT$SV Note: Query firmware version.
A/ Note: Repeat last command.
OK $SV: R0100
OK $SV: R0100
Confidential DAVISCOMMS (S) PTE LTD 20 /105
Page 21
MTD2000 AT Command Guide R12
8 System Command
8.1 System Version – AT$SV
This command will get the firmware version of the device.
Syntax
Command Response
AT$SV or AT$SV?
Note: Query setting.
Parameters
Version Firmware version in “RXXYY” format: XX is the major version, YY is
the minor version.
Example
Command Response
AT$SV Note: Query the firmware version.
8.2 System Identity – AT$SI
This command will set and control the device ID of the device. Device ID can be used to identify and differentiate the device with a unique code (e.g. vehicle number). The device ID is appended at the back of the responses and reports.
Syntax
Command Response
AT$SI=<Mode>[,<ID>]
Note: Write setting.
AT$SI?
Note: Query setting.
Parameters
OK $SV: <Version>
OK $SV: R0100 Note: Firmware version is 1.00.
OK
OK $SI: <Mode>,<ID>
Confidential DAVISCOMMS (S) PTE LTD 21 /105
Page 22
MTD2000 AT Command Guide R12
Mode 0 – Disable device ID 1 – Append device ID to every response and report 2 – Append device ID to every response and report except NMEA
report
Default mode is 0 (Disable device ID).
ID Device ID of up to 10 alphanumeric characters, limited to the following
characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Default device ID is “0123456789”.
Example
Command Response
AT$SI=1,”ABC1234D” Note: Set and enable device ID.
AT$SI? Note: Query device ID.
AT$SV Note: Query the firmware version with device ID.
OK
OK $SI: 1,”ABC1234D”;ABC1234D
OK $SV: R0100;ABC1234D
8.3 System Default – AT$SD
This command will restore factory default settings.
Syntax
Command Response
AT$SD=<Mode>
Note: Write setting.
OK
Parameters
Mode 0 – Restore factory default
1 – Restore factory default except the device ID, port configuration,
output port default, SMS number list, TCP / UDP address list, GPRS profile list and DNS server address.
Example
Confidential DAVISCOMMS (S) PTE LTD 22 /105
Page 23
MTD2000 AT Command Guide R12
Command Response
AT$SD=0 Note: Restore factory default.
AT$SD=1 Note: Restore factory default except some important user settings.
OK
OK
8.4 System Configuration – AT$SC
This command will retrieve and send the device settings all at one go via the command channel. This command is not accessible via SMS due to large amount of data.
Note: If the user is trying to retrieve device settings via SMS, the device will send out an unsolicited response to indicate settings retrieval not allowed.
Syntax
Command Response
AT$SC or AT$SC?
Note: Query device setting.
OK $SV: <...> $SI: <…> $SS: <...> $DB: <...> $CA: <…> $CS: <…> $SIM: <...> $OS: <…> $ACC: <...> $DEC: <...> $MS: <...> $MC: <...> $GA: <…> $PC: <…> $PD: <…> $FSD: <...> $MD: <...> $KR: <...> $BC: <...> $GM: <...> $UM: <...> $EI: <…> $NC: <…> $GF: <…> $XE: <…> $XB: <…>
Confidential DAVISCOMMS (S) PTE LTD 23 /105
Page 24
MTD2000 AT Command Guide R12
$FT: <…> $FC: <…> $TL: <…> $SL: <…> $NT: <…> $NU: <…> $NG: <…> $ND: <…> $EV: <…>
Parameters
Nil
Example
Command Response
AT$SC Note: Retrieve device settings.
OK $SV: R0100 $SI: 0,ABC1234D … $EV: 20,”” $NC: 0
8.5 System Reset – AT$ST
This command will reset the system or GSM / GPS module.
Syntax
Command Response
AT$ST=<Mode>
Note: Write setting.
OK
Parameters
Mode 0 – System reset including GSM and GPS module
1 – Reset GSM module only 2 – Reset GPS module only
Example
Command Response
AT$ST=0 Note: Reset the system.
OK
Confidential DAVISCOMMS (S) PTE LTD 24 /105
Page 25
MTD2000 AT Command Guide R12
AT$ST=1 Note: Reset the GSM module only.
OK
8.6 System Sleep – AT$SS
This command will place the GSM / GPS module into sleep mode. After power is cycled or device is reset, the GSM / GPS module will revert to awake mode.
Syntax
Command Response
AT$SS=<Module>[,<Mode>]
Note: Write setting.
AT$SS=<Module>
Note: Query setting.
OK
OK $SS: <Module>,<Mode>
Parameters
Module 0 – GSM 1 – GPS
Mode 0 – Awake
1 – Sleep Default is 0 (Awake).
Example
Command Response
AT$SS=0,1 Note: Place GSM module into sleep mode.
AT$SS=0 Note: Query status of GSM module.
OK
OK $SS: 0,1
8.7 System Upgrade – AT$SU
User can use this command to upgrade the firmware over the air via a FTP server which hosts the firmware image. The OTA firmware upgrade consists of image download and image upgrade process. After the firmware upgrade, the device will initiate a reset to run in normal mode.
Confidential DAVISCOMMS (S) PTE LTD 25 /105
Page 26
MTD2000 AT Command Guide R12
Note:
1. During the image download process, the device will continue the normal operation.
2. After download complete and during the image upgrade process, the device will enter boot mode and stop the normal operation.
3. Once the image upgrade is completed, the device will reset to run in normal mode.
4. If the FTP URL is invalid, the device will send out an unsolicited response to indicate invalid FTP URL.
5. If the FTP user name is invalid, the device will send out an unsolicited response to indicate invalid FTP user name.
6. If the FTP user password is invalid, the device will send out an unsolicited response to indicate invalid FTP user password.
7. If the device cannot connect to the GPRS gateway via the GPRS profile, the device will send out an unsolicited response to indicate invalid GPRS profile.
8. If the incorrect image is downloaded, the device will send out an unsolicited response to indicate invalid image.
9. If the image download is failed, the device will send out an unsolicited response to indicate download fail.
10. If the image download is completed, the device will send out an unsolicited response to indicate download complete and upgrade start.
Syntax
Command Response
AT$SU=<URL>,<User>,<Password>,<GPRS Profile>
Note: Perform OTA firmware upgrade.
OK
Parameters
URL FTP URL of up to 60 alphanumeric characters, limited to the
following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
User FTP user name of up to 20 alphanumeric characters, limited
to the following characters list:
Confidential DAVISCOMMS (S) PTE LTD 26 /105
Page 27
MTD2000 AT Command Guide R12
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Password FTP user password of up to 20 alphanumeric characters,
limited to the following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
GPRS Profile GPRS profile 1 to 10
Example
Command Response
AT$SU=”ftp://ftp.com.sg/MTD2000-R0240.hex”,”1234”,”abcd”,1 Note: Perform firmware upgrade over the air.
OK
8.8 System Boot Mode – AT$SB
This command will place the device into boot mode, which is used by Downloader for firmware upgrade via serial port. After power is cycled or device is reset, the device will remain in boot mode until it is set to normal mode by the Downloader.
Note: This command is password protected, it is not meant for normal user. It is to be used only by the Downloader for firmware upgrade.
Syntax
Command Response
AT$SB=<Password>
Note: Enter boot mode with password protection.
OK
Parameters
Password Password to enter boot mode
Example
Command Response
AT$SB=#### Note: Place the device into boot mode.
OK
Confidential DAVISCOMMS (S) PTE LTD 27 /105
Page 28
MTD2000 AT Command Guide R12
Note: Send error and status indication to serial port
8.9 Error and Status Indication – AT$EI
This command will send error and status indication as unsolicited response to the selected channel.
Syntax
Command Response
AT$EI=<Mode>[,<Recipient>]
Note: Write setting.
AT$EI?
Note: Query setting.
OK
OK AT$EI: <Mode>,<Recipient>
Parameters
Mode 0 – Disable error and status indication 1 – Enable error and status indication
Default is 1 (enable error and status indication).
Recipient Send error and status indication to single or multiple recipients as
follows, default is serial port:
U – Serial port (UART) N – Network channel (TCP / UDP) Sx – Single SMS number in decimal (1 to 10)
Example
Command Response
AT$EI=1,”U S1” and SMS number 1. AT$EI=1,”N S1”
Note: Send error and status indication to network channel and SMS number 1.
OK
OK
Confidential DAVISCOMMS (S) PTE LTD 28 /105
Page 29
MTD2000 AT Command Guide R12
9 SMS Command
9.1 SMS/Call Number List – $SL
This command allows user to store maximum 10 SMS / Call numbers in the device. The device will receive commands or send data only via the programmed SMS numbers. Similarly, the device will initiate call or accept incoming call only via the programmed call numbers.
Syntax
Command Response
AT$SL=<Index>,<SMS Number>
Note: Write setting.
AT$SL=<Index>
Note: Query one setting.
AT$SL?
Note: Query all settings (not accessible via SMS).
Parameters
Index SMS number 1 to 10
SMS Number Phone number of up to 20 digits (including ‘+’ sign), default
is blank.
Example
Command Response
AT$SL=1,”91234567” Note: Store a SMS number.
AT$SL=1 Note: Query a SMS number.
AT$SL? Note: Query all SMS numbers.
OK
OK $SL: <Index>,<SMS Number>
OK $SL: 1, <SMS Number> … $SL: 10, <SMS Number>
OK
OK $SL: 1,”91234567”
OK $SL: 1,”91234567” $SL: 2,”” … $SL: 10,””
Confidential DAVISCOMMS (S) PTE LTD 29 /105
Page 30
MTD2000 AT Command Guide R12
Confidential DAVISCOMMS (S) PTE LTD 30 /105
Page 31
MTD2000 AT Command Guide R12
10 Network Command
10.1 TCP/IP Address List – AT$NT
This command allows user to store maximum 10 TCP/IP server addresses in the device.
Syntax
Command Response
AT$NT=<Index>,<IP Address>,<Port>
Note: Write setting.
AT$NT=<Index>
Note: Query one setting.
AT$NT?
Note: Query all settings (not accessible via SMS).
Parameters
Index TCP server address 1 to 10
IP Address TCP server IP address in host name or dotted decimal
notation, maximum 60 characters. A hostname may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.
Default is blank
Port TCP server port number (1 to 65535)
Default is 1000
Example
Command Response
AT$NT=1,”192.168.123.168”,2000 Note: Store a server address.
AT$NT=2,”www.yahoo.com”,80 OK
OK
OK $NT: <Index>,<IP Address>,<Port>
OK $NT: 1,<IP Address>,<Port> … $NT: 10,<IP Address>,<Port>
OK
Confidential DAVISCOMMS (S) PTE LTD 31 /105
Page 32
MTD2000 AT Command Guide R12
Note: Store a server address. AT$NT=1
Note: Query a server address. AT$NT?
Note: Query all server addresses.
OK $NT: 1,”192.168.123.120”,2000
OK $NT: 1,”192.168.123.120”,2000 $NT: 2,”www.yahoo.com”,80 … $NT: 10,””
10.2 UDP/IP Address List – AT$NU
This command allows user to store maximum 10 UDP/IP server addresses in the device.
Syntax
Command Response
AT$NU=<Index>,<IP Address>,<Port>
Note: Write setting.
AT$NU=<Index>
Note: Query one setting.
AT$NU?
Note: Query all settings (not accessible via SMS).
OK
OK $NU: <Index>,<IP Address>,<Port>
OK $NU: 1,<IP Address>,<Port> … $NU: 10,<IP Address>,<Port>
Parameters
Index UDP server address 1 to 10
IP Address UDP server IP address in host name or dotted decimal
notation, maximum 60 characters. A hostname may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.
Default is blank
Port UDP server port number (1 to 65535)
Default is 1000
Confidential DAVISCOMMS (S) PTE LTD 32 /105
Page 33
MTD2000 AT Command Guide R12
Example
Command Response
AT$NU=1,”192.168.123.168”,2000 Note: Store a server address.
AT$NU=2,”www.yahoo.com”,80 Note: Store a server address.
AT$NU=1 Note: Query a server address.
AT$NU? Note: Query all server addresses.
OK
OK
OK $NU: 1,”192.168.123.120”,2000
OK $NU: 1,”192.168.123.120”,2000 $NU: 2,”www.yahoo.com”,80 … $NU: 10,””
10.3 GPRS Profile List – AT$NG
This command allows user to store maximum 10 GPRS profiles in the device.
Syntax
Command Response
AT$NG=<Index>,<APN>,<User>,<Password>
Note: Write setting.
AT$NG=<Index>
Note: Query one setting.
AT$NG?
Note: Query all settings (not accessible via SMS).
OK
OK $NG: <Index>,<APN>,<User>,<Password>
OK $NG: 1,<APN>,<User>,<Password> … $NG: 10,<APN>,<User>,<Password>
Parameters
Index GPRS profile 1 to 10
APN GPRS access point name of up to 40 alphanumeric characters,
limited to the following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Confidential DAVISCOMMS (S) PTE LTD 33 /105
Page 34
MTD2000 AT Command Guide R12
Default is blank
User GPRS user name of up to 20 alphanumeric characters, limited to
the following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Default is blank
Password GRPS user password of up to 20 alphanumeric characters, limited
to the following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Default is blank
Example
Command Response
AT$NG=1,”internet”,”1234”,”abcd” Note: Store a GPRS profile
AT$NG=1 Note: Query a GPRS profile
AT$NG? Note: Query all GPRS profiles
OK
OK $NG: 1,”internet”,”1234”,”abcd”
OK $NG: 1, ”internet”,”1234”,”abcd” … $NG: 10,””
10.4 DNS Server Address – AT$ND
This command allows user to set the DNS server address to resolve server address name.
Syntax
Command Response
AT$ND=<DNS1>[,<DNS2>]
Note: Write setting.
AT$ND?
Note: Query setting.
OK
OK $ND: <DNS1>,<DNS2>
Confidential DAVISCOMMS (S) PTE LTD 34 /105
Page 35
MTD2000 AT Command Guide R12
Parameters
DNS1 Primary DNS server address (IP address in dotted-four-byte
format). This value determines whether to use the DNS server
addresses dynamically assigned by the network or a specific DNS
server address given by the user. "DNS1" = "0.0.0.0" (default)
means that the GPRS connection profile uses dynamic DNS
assignment. Any other address means that the Primary DNS is
manually set. The default value applies automatically if no other
address is set.
DNS2 Secondary DNS server address (IP address in dotted-four-byte format). If
"DNS1" = "0.0.0.0" this setting will be ignored. Otherwise this value can
be used to manually configure an alternate server for the DNS1. If
"DNS1" is not equal "0.0.0.0" and no "DNS2" address is given, then
"DNS2"="0.0.0.0" will be assumed automatically.
Example
Command Response
AT$ND=”165.21.83.88” Note: Set only primary DNS address.
AT$ND? Note: Query DNS address.
AT$ND=”165.21.83.88”,”165.21.100.88” Note: Set primary and secondary DNS address.
AT$ND? Note: Query DNS address.
OK
OK $ND: ”165.21.83.88”,”0.0.0.0”
OK
OK $ND: ”165.21.83.88”,”165.21.100.88”
10.5 Network Connection – AT$NC
This command is used to setup a network connection via GPRS. Note:
1. If the user is trying to establish a new network connection without closing the
existing connection, the device will send out an unsolicited response to indicate network connection not allowed.
Confidential DAVISCOMMS (S) PTE LTD 35 /105
Page 36
MTD2000 AT Command Guide R12
2. If the user is trying to close the existing network connection while data dump is in
progress, the device will send out an unsolicited response to indicate network disconnection not allowed.
3. If network connection is not successful due to GSM/GPRS network or remote server,
the device will send out an unsolicited response to indicate the respective error status. If the network connection is successful, the online flag in the event table will be set.
After connected to network,
The online flag will remain set if GSM network is down.
The online flag will be cleared if remote server is down.
Syntax
Command Response
AT$NC=<Mode>,<Channel>,<Channel Index>,<GPRS Profile>
Note: Write setting.
AT$NC?
Note: Query setting.
OK
OK $NC: <Mode>,<Channel>,<Channel Index>,<GPRS Profile>
Parameters
Mode 0 – Disconnect from network (the rest of the fields are not needed)
1 – Connect to network Default is 0 (Disconnect) Channel 0 – TCP channel
1 – UDP channel
Channel Index Channel address index 1 to 10
GPRS Profile GPRS profile 1 to 10
Example
Command Response
AT$NT=1,”192.168.123.168”,1000 Note: Store a server address.
AT$NG=1,”internet”,””,”” Note: Store a GPRS profile.
OK
OK
Confidential DAVISCOMMS (S) PTE LTD 36 /105
Page 37
MTD2000 AT Command Guide R12
AT$NC=1,0,1,1 Note: Connect to the TCP server.
AT$NC? Note: Query connection status.
AT$NC=0 Note: Disconnect from the TCP server.
AT$NC? Note: Query connection status.
OK
OK $NC: 1,0,1,1
OK
OK $NC: 0
Confidential DAVISCOMMS (S) PTE LTD 37 /105
Page 38
MTD2000 AT Command Guide R12
TCP / UDP Connection Flow
The device will send out an unsolicited response if the TCP / UDP connection is not successful. For example: $MTD: 5201.
Start
GSM
Registered
?
No
Report
Error 5001
Yes
GPRS
Connected
?
No
Connect to GPRS
Yes
Error?
Yes
No
Report
Error 5101
Connect to TCP / UDP Server
Error?
No
Yes
Report
Error 5201
End
Confidential DAVISCOMMS (S) PTE LTD 38 /105
Page 39
MTD2000 AT Command Guide R12
11 Text Message Command
11.1 Text Message List – AT$TL
This command allows user to store maximum 20 text messages in the device.
Syntax
Command Response
AT$TL=<Index>,<Message>
Note: Write setting.
AT$TL=<Index>
Note: Query one setting.
AT$TL?
Note: Query all settings (not accessible via SMS).
Parameters
Index Text message 1 to 20
Message Text message of up to 40 alphanumeric characters, limited to the
following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @
Default is blank
Example
Command Response
AT$TL=1,”Car Alarm!” Note: Store a text message.
AT$TL=1 Note: Query a text message.
AT$TL? Note: Query setting of all text messages.
OK
OK $TL: <Index>,<Message>
OK $TL: 1,<Message> … $TL: 20,<Message>
OK
OK AT$TL=1,”Car Alarm!”
OK $TL: 1,”Car Alarm!” $TL: 2,”” … $TL: 20,””
Confidential DAVISCOMMS (S) PTE LTD 39 /105
Page 40
MTD2000 AT Command Guide R12
11.2 Text Message – AT$TM
This command will send a pre-programmed text message via the selected channels. Note:
1. If the user is trying to send a text message via inactive network channel, the device
will send out an unsolicited response to indicate inactive network channel.
2. If the user is trying to send a text message to a SMS number which is not defined,
the device will send out an unsolicited response to indicate undefined SMS number.
Syntax
Command Response
AT$TM=<Index>,<Recipient>
Note: Execute command.
OK
Parameters
Index Text message 1 to 20 Recipient Send a text message to single or multiple recipients as follows:
U – Serial port (UART) N – Network channel (TCP / UDP) Sx or Mx – Single SMS number in decimal (1 to 10)
Mulitple SMS numbers in hexadecimal (001 to 3FF)
Bit presentation for multiple SMS numbers:
Bit # 9 8 7 6 5 4 3 2 1 0 SMS # 10 9 8 7 6 5 4 3 2 1
Example
Command Response
AT$TM=1,”U” Note: Send a text message via serial port.
AT$TM=1,”N S1” Note: Send a text message via network channel
OK Car Alarm!
OK Car Alarm!
Confidential DAVISCOMMS (S) PTE LTD 40 /105
Page 41
MTD2000 AT Command Guide R12
and SMS number 1. AT$TM=1,”N M003”
Note: Send a text message via network channel, SMS number 1 and 2.
OK Car Alarm!
Confidential DAVISCOMMS (S) PTE LTD 41 /105
Page 42
MTD2000 AT Command Guide R12
=<Prefix>,<Recipient>[,<Interval>,<Cycle>]
12 Location Report Command
12.1 Standard Report – AT$SR
This command will send one or more standard reports via the selected channels. Note:
1. If the device is unable to acquire position, the last valid position will be sent with
status indicator marked as invalid. The device will start afresh and will not keep the last valid position if power is cycled. In the case of no valid position at all, all the GPS data fields (date, time, latitude, longtitude, speed, heading) will be set to 0.
2. If the user is trying to send standard report while the GPS is in sleep mode, the
device will send out an unsolicited response to indicate GPS sleep.
3. If the user is trying to send standard report while the GPS is not operational, the
device will send out an unsolicited response to indicate GPS not operational.
4. If the user is trying to send standard report via inactive network channel, the device
will send out an unsolicited response to indicate inactive network channel.
5. If the user is trying to send standard report to a SMS number which is not defined,
the device will send out an unsolicited response to indicate undefined SMS number.
6. Once maximum reports (set in $DB command) are logged, the device will overwrite
the report data in the memory in FIFO order, at the same time, it will send out an unsolicited response to indicate memory full.
7. Note that excessive data log (e.g. data log and dump every min) may result in
overwritten data flash beyond the life cycle.
8. Note that it is not recommended to send $SR via SMS at less than 10sec interval.
Syntax
Command Response
AT$SR
Note: Send multiple reports.
OK <Standard Report> … <Standard Report>
Confidential DAVISCOMMS (S) PTE LTD 42 /105
Page 43
MTD2000 AT Command Guide R12
AT$SR=<Prefix>,<Recipient>
Note: Send one report.
AT$SR
Note: Stop sending report.
OK <Standard Report>
OK
Parameters
Prefix ASCII text of up to 10 alphanumeric characters, limited to the
following characters list:
0-9 a-z A-Z ! # $ % & ‘ ( ) * + - . / : < = > ? @ Recipient Send report to single or multiple recipients as follows: D – Log data into memory
U – Serial port (UART) N – Network channel (TCP / UDP)
Sx or Mx – Single SMS number in decimal (1 to 10)
Mulitple SMS numbers in hexadecimal (001 to 3FF)
Bit presentation for multiple SMS numbers:
Bit # 9 8 7 6 5 4 3 2 1 0 SMS # 10 9 8 7 6 5 4 3 2 1
Interval Interval between reports in second:
Internal Memory – 60 to 65000 sec SMS Channel – 5 to 65000 sec Other Channel – 1 to 65000 sec
Cycle Number of reports to be sent (1 to 65000 reports, 0 is non-stop
sending)
Example
Command Response
AT$SR=”Location”,”D” Note: Log one report into memory.
AT$SR=”Location”,”U” Note: Send one report via serial port.
AT$SR=”Location”,”N S1” Note: Send one report via network channel and SMS number 1.
OK
OK <Standard Report>
OK <Standard Report>
Confidential DAVISCOMMS (S) PTE LTD 43 /105
Page 44
MTD2000 AT Command Guide R12
AT$SR=”Location”,”N M003”,300,100 Note: Send 100 reports with interval 5 min via network channel, SMS number 1 and 2.
OK <Standard Report> … <Standard Report>
Confidential DAVISCOMMS (S) PTE LTD 44 /105
Page 45
MTD2000 AT Command Guide R12
Standard Report Format Syntax
$SR:<Prefix>,<Status><Date><Time><Location><Speed><Heading><System><Ports>
Parameters
Field Identifier Description
Prefix User defined short-text prefix for the report.
Up to 10 alphanumeric characters.
Status
V <v>
0 = invalid location data 1 = valid location data
Date D <ddmmyy>
dd:day, mm:month, yy:year
Time T <hhmmss>
hh:hour, mm:minute, ss:second
Location
- Latitude
- Longtitude
L <Aaa.bbbbbb><Brrr.hhhhhh>
<Aaa.bbbbbb> A: ‘+’ = North, ‘-‘ = South aa.bbbbbb degree
<Brrr.hhhhhh> B: ‘+’ = East, ‘-‘ = West rrr.hhhhhh degree
Speed S <nnn.mmm>
nnn.mmm km/h
000.000 – 300.000 km/h
Heading H <nnn.mmm>
nnn.mmm degree
000.000 – 359.999 degree
System W <aa>
aa = 00 to FF Bit 0: GSM Registered Bit 1: GPRS Registered Bit 2: GPRS Connected Bit 3: Active TCP / UDP Session
Confidential DAVISCOMMS (S) PTE LTD 45 /105
Page 46
MTD2000 AT Command Guide R12
Port P <bb>
bb = 00 to FF Bit 0 to 7: Port #1 (LSB) to #8 (MSB)
Example 1: Valid GPS data
$SR:Location,V1D061208T143500L+01.225296+103.521991S067.231H403.412W0FP03
Example 2: No valid GPS data, use last valid position
$SR:Location,V0D061208T143500L+01.225296+103.521991S067.231H403.412W0FP03
Example 3: No valid GPS data since startup
$SR:Location,V0D000000T000000L+00.000000+000.000000S000.000H000.000W0FP03
Confidential DAVISCOMMS (S) PTE LTD 46 /105
Page 47
MTD2000 AT Command Guide R12
12.2 NMEA Report – AT$NR
This command will send one or more NMEA reports via the selected channels. Note:
1. If GPS is in sleep mode, the device will send out the requested NMEA type without
data.
2. If the user is trying to send NMEA report while the GPS is in sleep mode, the device
will send out an unsolicited response to indicate GPS sleep.
3. If the user is trying to send NMEA report while the GPS is not operational, the device
will send out an unsolicited response to indicate GPS not operational.
4. If the user is trying to send NMEA report via inactive network channel, the device will
send out an unsolicited response to indicate inactive network channel.
5. If the user is trying to send NMEA report to a SMS number which is not defined, the
device will send out an unsolicited response to indicate undefined SMS number.
Syntax
Command Response
AT$NR=<Type>,<Recipient>[,<Interval>,<Cycle>]
Note: Send multiple reports.
AT$NR=<Type>,<Recipient>
Note: Send one report.
AT$NR
Note: Stop sending report.
OK <NMEA Report> … <NMEA Report>
OK <NMEA Report>
OK
Parameters
Type NMEA report type as follows:
0 - $GPGLL 1 - $GPGGA 2 - $GPGSA 3 - $GPGSV 4 - $GPVTG 5 - $GPRMC 6 - $GPZDA
Confidential DAVISCOMMS (S) PTE LTD 47 /105
Page 48
MTD2000 AT Command Guide R12
Recipient Send report to single or multiple recipients as follows:
U – Serial port (UART) N – Network channel (TCP / UDP) Sx or Mx – Single SMS number in decimal (1 to 10)
Mulitple SMS numbers in hexadecimal (001 to 3FF)
Bit presentation for multiple SMS numbers:
Bit # 9 8 7 6 5 4 3 2 1 0 SMS # 10 9 8 7 6 5 4 3 2 1
Interval Interval between reports in second:
SMS Channel – 5 to 65000 sec
Other Channel – 1 to 65000 sec
Cycle Number of reports to be sent (1 to 65000 reports, 0 is non-stop
sending)
Example
Command Response
AT$NR=0,”U” Note: Send one report via serial port.
AT$NR=0,”N S1” Note: Send one report via network channel and SMS number 1.
AT$NR=0,”N M003”,300,100 Note: Send 100 reports with interval 5 min via network channel, SMS number 1 and 2.
AT$NR=0,”U” Note: Send one GLL report via serial port while GPS is in sleep mode.
OK <NMEA Report>
OK <NMEA Report>
OK <NMEA Report> … <NMEA Report>
OK $GPGLL Note: Send only the NMEA type in sleep mode.
12.3 Cell ID Report – AT$CR
This command will send one or more Cell ID reports via the selected channels.
Confidential DAVISCOMMS (S) PTE LTD 48 /105
Page 49
MTD2000 AT Command Guide R12
Note:
1. If GSM is in sleep mode, the device will send out $CR without data.
2. If the user is trying to send Cell ID report while the GSM is in sleep mode, the device
will send out an unsolicited response to indicate GSM sleep.
3. If the user is trying to send Cell ID report while the GSM is not registered, the device
will send out an unsolicited response to indicate GSM not registered.
4. If the user is trying to send Cell ID report via inactive network channel, the device will
send out an unsolicited response to indicate inactive network channel.
5. If the user is trying to send Cell ID report to a SMS number which is not defined, the
device will send out an unsolicited response to indicate undefined SMS number.
6. If any field in the cell ID information is not available, it will be marked as ‘,’.
Syntax
Command Response
AT$CR=<Recipient>[,<Interval>,<Cycle>]
Note: Send multiple reports.
AT$CR=<Recipient>
Note: Send one report.
AT$CR
Note: Stop sending report.
OK <Cell ID Report> … <Cell ID Report>
OK <Cell ID Report>
OK
Parameters
Recipient Send report to single or multiple recipients as follows:
U – Serial port (UART) N – Network channel (TCP / UDP) Sx or Mx – Single SMS number in decimal (1 to 10)
Mulitple SMS numbers in hexadecimal (001 to 3FF)
Bit presentation for multiple SMS numbers:
Bit # 9 8 7 6 5 4 3 2 1 0 SMS # 10 9 8 7 6 5 4 3 2 1
Interval Interval between reports in second (5 to 65000 sec)
Confidential DAVISCOMMS (S) PTE LTD 49 /105
Page 50
MTD2000 AT Command Guide R12
Cycle Number of reports to be sent (1 to 65000 reports, 0 is non-stop
sending)
Example
Command Response
AT$CR=”U” Note: Send one report via serial port.
AT$CR=”N S1” Note: Send one report via network channel and SMS number 1.
AT$CR=”N M003”,300,100 Note: Send 100 reports with interval 5 min via network channel, SMS number 1 and 2.
AT$CR=”U” Note: Send one report via serial port while GSM is in sleep mode.
OK <Cell ID Report>
OK <Cell ID Report>
OK <Cell ID Report> … <Cell ID Report>
OK $CR Note: Send only the report type in sleep mode.
Cell ID Report Format Syntax
$CR: <Serving Cell><Neighbor Cells><Timing Advance>
Parameters
Field Description
Serving Cell
Cell ID (2 bytes or 4 hexadecimal digits), e.g. 4EAF Received signal level in dBm (1 byte), e.g. 55 which is -55 dBm
Neighbor Cells List of neighbor cells from strongest to weaker signal:
Cell ID 1 (2 bytes), strongest signal Received signal level in dBm (1 byte) … Cell ID 6 (2 bytes), weakest signal Received signal level in dBm (1 byte)
Timing Advance
Timing advance for the serving cell (1 byte)
Confidential DAVISCOMMS (S) PTE LTD 50 /105
Page 51
MTD2000 AT Command Guide R12
Example 1: Information of all cells available
$CR:0103,50,0104,84,0105,90,0106,91,0107,96,0108,96,0109,100,1
Example 2: Information of last two neighbor cells not available
$CR:0103,50,0104,84,0105,90,0106,91,0107,96,,,,1
Confidential DAVISCOMMS (S) PTE LTD 51 /105
Page 52
MTD2000 AT Command Guide R12
13 Data Log Command
13.1 Data Buffer – AT$DB
This command will set the data memory size to store reports. Note: While data logging is in progress, changing the data buffer will clear the logged data in
the memory.
Syntax
Command Response
AT$DB=<Memory>
Note: Write setting.
AT$DB?
Note: Query setting.
Parameters
Memory 0 – Data memory of 5000 reports
1 – Data memory of 300 reports Default is 1 (300 reports)
Example
Command Response
AT$DB=1 Note: Select data memory of 300 reports.
AT$DB? Note: Query current setting.
13.2 Data Dump – AT$DD
This command will dump the logged data in the memory via the selected channel. The logged data is not allowed to dump via SMS channel due to large amount of data.
Note:
OK
$DB: <Memory>
OK
OK $DB: 1
Confidential DAVISCOMMS (S) PTE LTD 52 /105
Page 53
MTD2000 AT Command Guide R12
1. The data dump is allowed only if data logging is stopped first. If data dump is
initiated while logging is in progress, the device will send an unsolicited response to indicate data dump not allowed.
2. Before data dump is started, the device will first send out an unsolicited response via
the selected channel to indicate data dump start.
3. The device will dump all the reports one at a time in FIFO order. If data dump is
stopped before dump completion, the remaining reports will be cleared from the memory.
4. At the end of the data dump, it will send out another unsolicited response to indicate
data dump completed.
5. If the connection between the remote host and the device is down while data dump
is in progress, the device will stop the data dump (and clear the remaining logged data) and send an unsolicited response to indicate data dump stopped due to communication link down.
Syntax
Command Response
AT$DD=<Mode>
Note: Write setting.
OK
Parameters
Mode 0 – Stop data dump and clear remaining data
1 – Dump data via serial port 2 – Dump data via TCP / UDP channel
Example
Command Response
AT$DD=1 Note: Dump data via serial port.
AT$DD=0 Note: Stop dumping data.
OK <Logged Data> … <Logged Data>
OK
13.3 Data Clear – AT$DC
Confidential DAVISCOMMS (S) PTE LTD 53 /105
Page 54
MTD2000 AT Command Guide R12
This command will clear the logged data in the device memory.
Syntax
Command Response
AT$DC
Note: Execute command.
OK
Parameters
Nil
Example
Command Response
AT$DC Note: Remove logged data.
OK
Confidential DAVISCOMMS (S) PTE LTD 54 /105
Page 55
MTD2000 AT Command Guide R12
14 Call Command
14.1 Originate Call – AT$CV
This command is used to initiate a voice call (normal or silent call). For normal call, the device will start the two-way call session after call is connected. For silent call, the device will start one-way call session by turning on the MIC and mute the speaker (no ring back tone, no voice heard from the called party).
Note:
1. User can use event to trigger a call (e.g. press panic button or other means). Once
the call is initiated, the panic button is used to end the call. Thus pressing panic button during call in progress will not trigger the event but end the call.
2. If the panic button is pressed while normal call is being established or in the midst of
active normal call, the device will end the call.
3. If the panic button is pressed while silent call is being established or in the midst of
active silent call, the device will not end the call. Only the called part (far end) can end the silent call.
4. If the user is trying make call to a SMS number which is not defined, the device will
send out an unsolicited response to indicate undefined SMS number.
Syntax
Command Response
AT$CV=<Index>,<Type>
Note: Write setting.
Parameters
Index Call number index 1 to 10 (corresponding to the SMS number in
$SL) Type Call type (0 – normal call, 1 – silent call)
Example
Command Response
AT$CV=1,0 Note: Initiate a normal call.
OK
OK
Confidential DAVISCOMMS (S) PTE LTD 55 /105
Page 56
MTD2000 AT Command Guide R12
AT$CV=1,1 Note: Initiate a silent call.
OK
14.2 Auto Answer – AT$CA
This command will enable / disable auto answer incoming call. If auto answer is enabled, the device will auto answer incoming call provided the call is in the SMS number list, otherwise, it will reject the call. If auto answer is disabled, the device will reject incoming call.
Note: If the incoming call number is not in the SMS number list, the device will send out an
unsolicited response to indicate undefined SMS number.
Syntax
Command Response
AT$CA=<Mode>
Note: Write setting.
AT$CA?
Note: Query setting.
OK
OK $CA: <Mode>
Parameters
Mode 0 – Reject incoming call
1 – Auto answer incoming call Default is 0 (reject incoming call)
Example
Command Response
AT$CA=1 Note: Enable auto answer.
AT$CA? Note: Query call answer setting.
OK
OK $CA: 1
14.3 Speaker Volume and MIC Gain – AT$CS
Confidential DAVISCOMMS (S) PTE LTD 56 /105
Page 57
MTD2000 AT Command Guide R12
This command is used to set the speaker volume and MIC gain for voice call. Note:
1. The device will turn off the speaker when call is not established and after the call is
ended.
2. The device supports both internal and external MIC in which higher gain will be set
for external MIC.
3. The device supports both internal and external speaker in which higher volume will
be set for external speaker.
4. The device will assume external speaker is used when external MIC is detected. If
external MIC is inserted, the device will switch to external MIC automatically and up the MIC gain and speaker volume accordingly.
Syntax
Command Response
AT$CS=<Speaker>,<MIC>
Note: Write setting.
AT$CS?
Note: Query setting.
OK
OK $CS: <Speaker>,<MIC>
Parameters
Speaker Speaker volume (0 – Low, 1 – Mid, 2 – High), default is 1 MIC MIC gain (0 – Low, 1 – Mid, 2 – High), default is 1
Example
Command Response
AT$CS=2,2 Note: Set speaker and MIC to high level.
AT$CS? Note: Query speaker and MIC setting.
OK
OK $CS: 2,2
Confidential DAVISCOMMS (S) PTE LTD 57 /105
Page 58
MTD2000 AT Command Guide R12
15 Geo Fence Command
15.1 Geo Fence – AT$GF
This command allows user to set maximum 20 geographical fences. When the device enters (exits) the geo fence, the respective geo fence flag in the event table will be set (cleared).
Syntax
Command Response
AT$GF=<Index>,<Mode>[,<Latitude>,<Longitude>,<Radius>]
Note: Write setting.
AT$GF=<Index>
Note: Query one setting.
AT$GF?
Note: Query all settings
Parameters
Index Geo fence 1 to 20 Mode 0 – Disable
1 – Enable
Latitude Format of latitude is as follows: <Aaa.bbbbbb>
Default is +00.000000. Longitude Format of longitude is as follows: <Brrr.hhhhhh>
Default is +000.000000.
(not accessible via SMS)
Default is 0 (Disable).
A: ‘+’ = North, ‘-‘ = South
aa.bbbbbb degree
B: ‘+’ = East, ‘-‘ = West
rrr.hhhhhh degree
.
OK
OK $GF: <Index>,<Mode>,<Latitude>,<Longitude>,<Radius> OK $GF: 1,<…> … $GF: 20,<…>
Confidential DAVISCOMMS (S) PTE LTD 58 /105
Page 59
MTD2000 AT Command Guide R12
Radius Radius of the geo fence (0.1 – 100.0 km) Default is 0.1 km
Example
Command Response
AT$GF=1,1,+89.121432,-103.242351,0.1 Note: Set geo fence 1.
AT$GF=1,0 Note: Disable geo fence 1.
AT$GF=1,1 Note: Enable geo fence 1.
AT$GF=1 Note: Query geo fence 1 setting.
AT$GF? Note: Query setting of geo fences.
OK
OK
OK
OK $GF: 1,1,+89.121432,-103.242351,0.1
OK $GF: 1, 1,+89.121432,-103.242351,0.1 … $GF: 20,0,0,0
15.2 Geo Fence Status – AT$GS
This command allows user to query the current status of all geo fences.
Syntax
Command Response
AT$GS or AT$GS?
Note: Query geo fences status.
OK $GS: <Status>
Parameters
Status Current status of all geo fences in hexadecimal value (00000 to
FFFFF) with LSB and MSB as geo fence 1 and 20 respectively: 0 – exit geo fence
1 – enter geo fence Default is 0 for those disabled geo fences.
Bit presentation for geo fences:
Confidential DAVISCOMMS (S) PTE LTD 59 /105
Page 60
MTD2000 AT Command Guide R12
Bit # 19 18 17 2 1 0 Geo Fence # 20 19 18 3 2 1
Example
Command Response
AT$GS Note: Query status of all geo fences.
OK
$GS: 00001
Note: Enter geo fence 1, exit the rest of geo fences (00001 = 0000 0000 0000 0000 0001).
Confidential DAVISCOMMS (S) PTE LTD 60 /105
Page 61
MTD2000 AT Command Guide R12
16 Speed and Mileage Command
16.1 Over Speed Detection – AT$OS
This command will set the speed threshold for over speed detection. When the speed exceeds the high speed threshold, the over speed flag in the event table will be set. When the speed falls below the normal speed threshold, the over speed flag in the event table will be cleared.
Note: The device will return ERROR if user sets the high speed threshold equal or less than the normal speed threshold.
Syntax
Command Response
AT$OS=<Mode>[,<High Speed>,<Normal Speed>]
Note: Write setting.
AT$OS?
Note: Query setting.
Parameters
Mode 0 – Disable 1 – Enable
Default is 0 (Disable)
High Speed High speed threshold in km/h (10 to 300 km/h) to trigger high
speed alert condition. Default is 100 km/h.
Normal Speed Normal speed threshold in km/h (10 to 250 km/h) to clear
high speed alert condition. Default is 60 km/h.
Example
Command Response
AT$OS=1,110,50 Note: Set speed threshold.
AT$OS? Note: Query high speed setting.
OK
OK $OS: <Mode>,<High Speed>,<Normal Speed>
OK
OK $OS: 1,110,50
Confidential DAVISCOMMS (S) PTE LTD 61 /105
Page 62
MTD2000 AT Command Guide R12
16.2 Harsh Acceleration – AT$ACC
This command will set the speed change threshold for harsh accelerating detection, which can only occur at speed above 40 km/h. When the desired speed change is detected, the acceleration flag in the event table will be set.
Syntax
Command Response
AT$ACC=<Mode>[,<Speed Change>,<Duration>]
Note: Write setting.
AT$ACC?
Note: Query setting.
OK
OK $ACC: <Mode>,<Speed Change>,<Duration>
Parameters
Mode 0 – Disable 1 – Enable
Default is 0 (Disable)
Speed Change Sudden increase in speed in km/h (10 to 40 km/h) caused by
harsh accelerating. Default is 20 km/h.
Duration Duration in second for speed change to take place (1 to 5
sec). Default is 3 sec.
Example
Command Response
AT$ACC=1,12,3 Note: Set speed change threshold.
AT$ACC? Note: Query current setting.
OK
OK $ACC: 1,12,3
16.3 Harsh Deceleration – AT$DEC
This command will set the speed change threshold for harsh breaking detection, which can only occur at speed above 40 km/h. When the desired speed change is detected, the deceleration flag in the event table will be set.
Syntax
Confidential DAVISCOMMS (S) PTE LTD 62 /105
Page 63
MTD2000 AT Command Guide R12
Command Response
AT$DEC=<Mode>[,<Speed Change>,<Duration>]
Note: Write setting.
AT$DEC?
Note: Query setting.
OK
OK $DEC: <Mode>,<Speed Change>,<Duration>
Parameters
Mode 0 – Disable 1 – Enable
Default is 0 (Disable)
Speed Change Sudden drop in speed in km/h (10 to 40 km/h) caused by
harsh breaking. Default is 20 km/h.
Duration Duration in second for speed change to take place (1 to 5
sec). Default is 3 sec.
Example
Command Response
AT$DEC=1,12,3 Note: Set speed change threshold.
AT$DEC? Note: Query current setting.
OK
OK $DEC: 1,12,3
16.4 Mileage Setting – AT$MS
This command allows user to set the initial odometer reading. The device will counts pulses and increase the odometer reading whenever a predefined pulses that equivalent to 1 km is reached.
Note: The mileage counter will configure analog input as digital input for pulse counting. Thus mileage counter and analog input are mutual exclusive and cannot be used at the same time.
Syntax
Command Response
AT$MS=<Mode>[,<Initial>,<Pulse>] OK
Confidential DAVISCOMMS (S) PTE LTD 63 /105
Page 64
MTD2000 AT Command Guide R12
Note: Write setting.
AT$MS?
Note: Query setting.
$MS: <Mode>,<Initial>,<Pulse>
Parameters
Mode 0 – Disable mileage counter (pulse counting) 1 – Enable mileage counter (pulse counting)
Default is 0 (Disable) Initial Initial odometer reading in km (0 to 800,000 km) Default is 0 km. Pulse Number of pulses that equivalent to 1 km (100 to 5000 pulses) Default is 100 pulses.
Example
Command Response
AT$MS=1,10,200 Note: Set odometer reading.
AT$MS? Note: Query odometer setting.
OK
$MS: 1,10,200
16.5 Mileage Counter – AT$MC
This command allows user to set odometer threshold for monitoring. When the odometer reading is equal to the preset threshold, the mileage counter flag in the event table will be set.
Note: The current odometer reading is saved and will not be reset when the power of the device is cycled.
Syntax
Command Response
AT$MC=<Mode>[,<Threshold>]
Note: Write setting.
OK
Confidential DAVISCOMMS (S) PTE LTD 64 /105
Page 65
MTD2000 AT Command Guide R12
AT$MC?
Note: Query setting and current odometer reading.
$MC: <Mode>,<Threshold>,<Current>
Parameters
Mode 0 – Disable 1 – Enable
Default is 0 (Disable) Threshold Odometer threshold in km (1 to 800,000 km) Default is 1 km. Current Current odometer reading in km (0 to 800,000 km)
Example
Command Response
AT$MC=1,200 Note: Set odometer threshold.
AT$MC? Note: Query setting and current odometer reading.
OK
$MC: 1,200,50
Confidential DAVISCOMMS (S) PTE LTD 65 /105
Page 66
MTD2000 AT Command Guide R12
17 Dead Reckoning
17.1 Gyro Calibration – AT$GC
For every device installation on vehicle, the gyro needs to be calibrated for dead reckoning. This command allows user to instruct the device to start gyro calibration during the calibration mode. The calibration process is as follows:
- Long press the reset button for 3 sec to enter calibration mode.
- Put the vehicle to forward gear.
- Send this command to the device to start the calibration. The device will take less than one min for calibration and return an unsolicited response to indicate calibration result.
Note:
1. When the reset button is long pressed for 3 seconds, the device will enter calibration mode and send out an unsolicited response to indicate calibration entry.
2. Once the gyro is calibrated (by $GC command) or 5 min is due, the device will return to normal mode and send out an unsolicited response to indicate calibration exit. This command ($GC) has no effect during normal mode.
3. When the reset button of device without dead reckoning or motion detect is long pressed for 3 sec, it will send out an unsolicited response to indicate calibration is not supported.
4. During normal operation, if the dead reckoning fails to work, the device will send out an unsolicited response to indicate dead reckoning failed.
Syntax
Command Response
AT$GC
Note: Execute command.
Parameters
Nil
Example
Command Response
AT$GC OK
OK
Confidential DAVISCOMMS (S) PTE LTD 66 /105
Page 67
MTD2000 AT Command Guide R12
Note: Start gyro calibration.
17.2 Dead Reckoning Calibration Accuracy – AT$GA
This command allows user to find out the accuracy of speed tick and gyro calibration. The device will return 0% if it does not support dead reckoning.
Note: For the device without dead reckoning, it will send out unsolicited response to indicate
dead reckoning not supported.
Syntax
Command Response
AT$GA or AT$GA?
Note: Query setting.
OK $GA: <Speed>,<Gyro>
Parameters
Speed Speed tick calibration accuracy in terms of percentage (0 to 100%) Gyro Gyro calibration accuracy in terms of percentage (0 to 100%)
Example
Command Response
AT$GA? Note: Query dead reckoning calibration accuracy (with dead reckoning).
AT$GA? Note: Query dead reckoning calibration accuracy (without dead reckoning).
OK $GA: 80,90
OK $GA: 0,0
Confidential DAVISCOMMS (S) PTE LTD 67 /105
Page 68
MTD2000 AT Command Guide R12
18 Digital IO Command
18.1 Port Configuration – AT$PC
This command will set the four programmable digital IO ports to either input or output port. There are total 8 IO ports in which port 1 to 4 are input port and port 5 to 8 are programmable IO port which can be configured as either input or output port.
Note:
1. Port 3 cannot be used if driver ID option is hardware configured in factory.
2. Port 4 is typically used to connect to the ignition switch as it comes with a key on reset feature, which allows the hardware reset button to take effect only if ignition is switched on.
Syntax
Command Response
AT$PC=<Configuration>
Note: Write setting.
AT$PC?
Note: Query setting.
Parameters
Configuration Port configuration in hexadecimal (00 to FF) with LSB and
MSB as port 1 and port 8 respectively, only port 5 to 8 are effective.
0 – Output port 1 – Input port
Default port configuration is as follows: port 1 to 8 are input port.
Bit presentation for ports:
Bit # 7 6 5 4 3 2 1 0 Port # 8 7 6 5 4 3 2 1
Example
OK
OK $PC: <Configuration>
Confidential DAVISCOMMS (S) PTE LTD 68 /105
Page 69
MTD2000 AT Command Guide R12
Command Response
AT$PC=3F Note: Set port 7 and 8 to output port and the rest to input ports.
AT$PC? Note: Query port configuration.
OK
OK $PC: 3F
18.2 Output Port Default – AT$PD
This command will set the default value of output ports upon power. It is recommended to set the output port to LOW for power saving if the output port is not used.
Note:
1. If the output port is used as current source, the current direction is from device to the load when output is set to HIGH (activate output). In this case, set the output to LOW will deactivate the output.
2. If the output port is used as current sink, the current direction is from load to the device when output is set to LOW (activate output). In this case, set the output to HIGH will deactivate the output.
Syntax
Command Response
AT$PD=<Value>
Note: Write setting.
AT$PD?
Note: Query setting.
OK
OK $PD: <Value>
Parameters
Value Output port default value in hexadecimal (00 to FF) with LSB
and MSB as port 1 and port 8 respectively, only output ports are effective. Default is 0 (LOW).
0 – LOW 1 – HIGH
Port 1 to 4 are input ports, port 5 to 8 can be input or output port depending on the port configuration.
Bit presentation for ports:
Confidential DAVISCOMMS (S) PTE LTD 69 /105
Page 70
MTD2000 AT Command Guide R12
Bit # 7 6 5 4 3 2 1 0 Port # 8 7 6 5 4 3 2 1
Example
Command Response
AT$PC? Note: Query port configuration.
AT$PD=30 Note: Set default value of output port 5 and 6 to HIGH, output port 7 and 8 to LOW.
AT$PD? Note: Query default value of output ports.
OK $PC: 0F
OK
OK $PD: 30
18.3 Port Status – AT$PS
This command will return the current value of both input and output ports.
Syntax
Command Response
AT$PS or AT$PS?
Note: Query setting.
OK $PS: <Status>
Parameters
Status Port status in hexadecimal (00 to FF) with LSB and MSB as
port 1 and port 8 respectively.
0 – LOW 1 – HIGH
Bit presentation for ports:
Bit # 7 6 5 4 3 2 1 0 Port # 8 7 6 5 4 3 2 1
Example
Command Response
AT$PC? Note: Query port configuration.
OK $PC: 0F
Confidential DAVISCOMMS (S) PTE LTD 70 /105
Page 71
MTD2000 AT Command Guide R12
AT$PS Note: Query port status.
OK $PS: F0 Note: Input port 1 to 4 are LOW, output port 5 to 8 are HIGH.
18.4 Input Port – AT$IN
This command will get the status of a user specified input port. Note:
If the user is trying to read an output port, the device will send out an unsolicited response to indicate invalid input port.
Syntax
Command Response
AT$IN=<Index>
Note: Get input port status.
OK $IN: <Index>,<Status>
Parameters
Index Port 1 to 8, only input ports are effective (port 1 to 4 are input
port, port 5 to 8 can be input or output port depending on the port configuration)
Status 0 – LOW
1 – HIGH
Example
Command Response
AT$PC? Note: Query port configuration.
AT$IN=1 Note: Get status of input port 1.
OK $PC: 0F
OK $IN: 1,1
18.5 Output Port – AT$OUT
This command will set a user specified output port to either HIGH or LOW.
Confidential DAVISCOMMS (S) PTE LTD 71 /105
Page 72
MTD2000 AT Command Guide R12
Note:
1. If the output port is used as current source, the current direction is from device to the load when output is set to HIGH (activate output). In this case, set the output to LOW will deactivate the output.
2. If the output port is used as current sink, the current direction is from load to the device when output is set to LOW (activate output). In this case, set the output to HIGH will deactivate the output.
3. If the user is trying to set an input port, the device will send out an unsolicited response to indicate invalid output port.
Syntax
Command Response
AT$OUT=<Index>,<Value>
Note: Write setting.
OK
Parameters
Index Port 1 to 8, only output ports are effective (port 1 to 4 are input port,
port 5 to 8 are depending on the port configuration)
Value 0 – LOW 1 – HIGH
Example
Command Response
AT$PC? Note: Query port configuration.
AT$OUT=5,1 Note: Set output port 5 to HIGH.
AT$OUT=8,1 Note: Set output port 8 to HIGH.
AT$PS Note: Query port status.
OK $PC: 0F
OK
OK
$PS: 90
Confidential DAVISCOMMS (S) PTE LTD 72 /105
Page 73
MTD2000 AT Command Guide R12
19 Analog IO Command
19.1 Analog Input Port – AT$AI
This command allows user to set analog input thresholds for monitoring, which is in term of digital value. When the analog input level is equal or higher than the preset threshold, the analog input status flag in the event table will be set.
The ADC reference voltage is 3.3 volts. The external power level is reduced by ten times before connecting to the ADC channel.
For the conversion from digital value to actual voltage, refer to “ADC Conversion Formula” below. The factor value for external power level is 31. For example, the voltage of 12 V is corresponding to digital value of 372.
ADC Conversion Formula
Analog Input Level = (Digital Value / Factor) volts
Syntax
Command Response
AT$AI=<Mode>[,<Threshold>]
Note: Write setting.
AT$AI?
Note: Query setting and current analog input level.
Parameters
Mode 0 – Disable 1 – Enable
Default is 0 (Disable) Threshold Analog input threshold in digital value (0 to 1023 units)
Default is 0 units
Current Current analog input level in digital value (0 to 1023 units)
Example
OK
$AI: <Mode>,<Threshold>,<Current>
Confidential DAVISCOMMS (S) PTE LTD 73 /105
Page 74
MTD2000 AT Command Guide R12
Command Response
AT$AI=1,372 Note: Set analog input threshold.
AT$AI? Note: Query setting and current analog input level.
OK
$AI: 1,372,300
19.2 Analog Output Port – AT$AO
This command allows user to set the analog output maximum capped at the external power level.
Syntax
Command Response
AT$AO=<Value>
Note: Write setting.
AT$AO?
Note: Query setting.
OK
$AO: <Value>
Parameters
Value Analog output value in terms of percentage (0 to 100%) of the
external power level Default is 0%
Example
Command Response
AT$AO=50 Note: Set analog output to 50% of the external power (e.g. 6V if external power is 12V).
AT$AO? Note: Query setting.
OK
$AO: 50
Confidential DAVISCOMMS (S) PTE LTD 74 /105
Page 75
MTD2000 AT Command Guide R12
20 Fail Safe Output Command
20.1 Fail Safe Output Default – AT$FSD
This command will set the default value of fail safe output port upon power up. It is recommended to set the output port to LOW for power saving if the output port is not used.
Note:
1. If the fail safe output port is used as current source, the current direction is from device to the load when output is set to LOW (activate output). In this case, set the output to HIGH will deactivate the output.
2. If the fail safe output port is used as current sink, the current direction is from load to the device when output is set to HIGH (activate output). In this case, set the output to LOW will deactivate the output.
Syntax
Command Response
AT$FSD=<Value>
Note: Write setting.
AT$FSD?
Note: Query setting.
Parameters
Value Fail safe output port default value, default is 0 (LOW).
0 – LOW 1 – HIGH
Example
Command Response
AT$FSD=1 Note: Set default value of fail safe output port to HIGH.
AT$PD? Note: Query default value of fail safe output port.
OK
OK $FSD: <Value>
OK
OK $FSD: 1
Confidential DAVISCOMMS (S) PTE LTD 75 /105
Page 76
MTD2000 AT Command Guide R12
20.2 Fail Safe Output – AT$FSO
This command will set the fail safe output port to either HIGH or LOW. Note:
1. If the fail safe output port is used as current source, the current direction is from device to the load when output is set to HIGH. In this case, set the output to LOW will deactivate output.
2. If the fail safe output port is used as current sink, the current direction is from load to the device when output is set to LOW. In this case, set the output to HIGH will deactivate the output.
Syntax
Command Response
AT$FSO=<Value>
Note: Write setting.
AT$FSO?
Note: Query setting.
OK
OK AT$FSO: <Value>
Parameters
Value 0 – LOW 1 – HIGH
Example
Command Response
AT$FSO=1 Note: Set fail safe output port to HIGH.
AT$FSO? Note: Query fail safe output port setting.
OK
OK $FSO: 1
Confidential DAVISCOMMS (S) PTE LTD 76 /105
Page 77
MTD2000 AT Command Guide R12
21 Peripherals Command
21.1 Driver ID – AT$DI
This command will return the driver ID of the driver ID Tag connected to the device. When this command is initiated, the device will poll for valid driver ID for 5 sec and return the driver ID right away if valid driver ID is read in 5 sec.
Note:
1. The device will return “0000000000000000” after 5 sec when no driver ID Tag is connected.
2. The device will return “FFFFFFFFFFFFFFFF” after 5 sec when there is error in reading the driver ID Tag.
Syntax
Command Response
AT$DI or AT$DI?
Note: Query setting.
Parameters
Driver ID Driver ID of 8 bytes in hex values.
Example
Command Response
AT$DI? Note: Query peripheral driver ID.
21.2 Dual SIM – AT$SIM
This command allows user to select one of the SIM cards for registration or set the dual SIM setting to auto switch mode for border crossing.
Note:
OK $DI: <Driver ID>
OK $DI: ”1234567890123456”
Confidential DAVISCOMMS (S) PTE LTD 77 /105
Page 78
MTD2000 AT Command Guide R12
For border crossing, user can place two SIM cards (e.g. SIM 1 for home country, SIM 2 for foreign country) into the device and set the dual SIM setting to auto switch mode. The device will switch over to SIM 2 when crossing from home to foreign country and vice-versa.
Syntax
Command Response
AT$SIM=<Mode>
Note: Write setting.
AT$SIM?
Note: Query setting.
OK
$SIM: <Mode>
Parameters
Mode 0 – Auto switch to another SIM when roaming take place or current
network connection is down (GSM/GPRS down or TCP/UDP
connection down) 1 – Select SIM1 for GSM registration (default setting) 2 – Select SIM2 for GSM registration
Example
Command Response
AT$SIM=0 Note: Switch over to another SIM when roaming takes place or current network connection is down.
AT$SIM=2 Note: Select SIM2 for GSM registration.
OK
OK
21.3 Panic Button – AT$PB
This command will get the status of the panic button.
Syntax
Command Response
AT$PB or AT$PB?
Note: Get panic button status.
OK $PB: <Status>
Confidential DAVISCOMMS (S) PTE LTD 78 /105
Page 79
MTD2000 AT Command Guide R12
Parameters
Status 0 – LOW (button release)
1 – HIGH (button press)
Example
Command Response
AT$PB Note: Get status of panic button.
OK $PB: 1
21.4 Key On Reset – AT$KR
This command will turn on / off the key on reset feature. Once this feature is turned on, the hardware reset button will take effect only when the digital input port 4 is set to HIGH (normally connected to ignition switch).
Syntax
Command Response
AT$KR=<Value>
Note: Write setting.
AT$KR?
Note: Query setting.
OK
OK AT$KR: <Value>
Parameters
Value 0 – Disable key on reset 1 – Enable key on reset
Default is 0 (disable key on reset)
Example
Command Response
AT$KR=1 Note: Enable key on reset.
AT$KR? Note: Query setting.
OK
OK $KR: 1
Confidential DAVISCOMMS (S) PTE LTD 79 /105
Page 80
MTD2000 AT Command Guide R12
21.5 Battery Charging – AT$BC
This command allows user to turn off battery charging when the external power falls below a preset threshold.
Note:
1. With battery charging disabled, when the external power falls below a preset threshold, the device will send out an unsolicited response to indicate stop battery charging.
2. With battery charging disabled, when the external power goes above the preset threshold, the device will send out an unsolicited response to indicate resume battery charging.
Syntax
Command Response
AT$BC=<Mode>[,<Threshold>]
Note: Write setting.
AT$BC?
Note: Query setting.
OK
OK AT$BC: <Mode>,<Threshold>
Parameters
Mode 0 – Turn off battery charging when external power drops below a
preset threshold 1 – Always turn on battery charging Default is 1
Threshold External power threshold (9 to 12 V) for 12 V power source, default
is 10 V.
For 24 V power source, the threshold range (9 to 12 V) are
corresponding to (18 to 24 V) and the default is 20 V.
Example
Command Response
AT$BC=0,9 Note: Disable battery charging when the external power drops below 9 V.
AT$BC? OK
OK
Confidential DAVISCOMMS (S) PTE LTD 80 /105
Page 81
MTD2000 AT Command Guide R12
Note: Query setting.
$BC: 0,9
21.6 Motion Detection Calibration – AT$MZ
For every device installation on vehicle, the motion detection needs to be calibrated to zero for sensitive detection of motion / acceleration. This command allows user to instruct the device to start the motion detection calibration during calibration mode. The calibration process is as follows:
- Long press the reset button for 3 sec to enter calibration mode.
- Send this command to the device to start the calibration. The device will take less than one min for calibration and return a unsolicited response to indicate calibration result.
Note:
1. When the reset button is long pressed for 3 seconds, the device will enter calibration mode and send out an unsolicited response to indicate calibration entry.
2. Once the motion detect is calibrated (by $MZ command) or 5 min is due, the device will return to normal mode and send out an unsolicited response to indicate calibration exit. This command ($MZ) has no effect during normal mode.
3. When the reset button of device without dead reckoning or G-sensor (motion detect) is long pressed for 3 sec, it will send out an unsolicited response to indicate calibration is not supported.
4. During normal operation, if the G-sensor (motion detect) fails to work, the device will send out an unsolicited response to indicate G-sensor failed.
Syntax
Command Response
AT$MZ
Note: Execute command.
OK Followed by x, y, z calibrated values upon completion.
Parameters
Nil
Example
Command Response
Confidential DAVISCOMMS (S) PTE LTD 81 /105
Page 82
MTD2000 AT Command Guide R12
AT$MZ Note: Start motion detect calibration. Upon completion of calibration
OK $MZ: <X, Y, Z>
21.7 Motion Detection Sensitivity – AT$MD
This command allows user to set the sensitivity of the motion sensor for motion detection.
Syntax
Command Response
AT$MD=<Sensitivity>
Note: Write setting.
AT$MD?
Note: Query setting.
OK
OK $MD: <Sensitivity>
Parameters
Sensitivity Sensitivity of the motion Sensor, ranged from 7 to 255. Default sensitivity
is 200.
Note: Range 0 to 6 is too sensitive for MTD application on vehicle and is disabled. To turn off Motion Detection, set sensitivity value to maximum, i.e. 255.
Example
Command Response
AT$MD=50 Note: Set sensitivity of motion sensor.
$MD? Note: Query motion sensor setting.
OK
OK $MD: 50
21.8 GSM Modem – AT$GM
This command will set the device as GSM modem. In GSM modem mode, the device will not accept MTD2000 commands and will stop executing events. The user can press the panic button to place the device back to GPS tracker mode, the device will reset and resume the event execution.
Confidential DAVISCOMMS (S) PTE LTD 82 /105
Page 83
MTD2000 AT Command Guide R12
Note:
1. Cycle power or reset the device while it is in GSM modem mode, it will remain in GSM modem mode and display “MTD2000 READY (GSM Modem)” via serial port.
2. This command is only valid via serial port. If user issues this command via SMS or TCP/UDP channel, the device will return ERROR.
Syntax
Command Response
AT$GM
Note: Write setting.
OK
Parameters
Nil
Example
Command Response
AT$GM Note: Set the device as GSM modem.
OK
21.9 UART Control – AT$UM
This command will enable / disable RS232 interface (UART) to further conserve power. After power is cycled or device is soft reset, the device will re-activate RS232 interface.
Syntax
Command Response
AT$UM=<Mode>
Note: Write setting.
AT$UM?
Note: Query setting.
OK
OK $UM: <Mode>
Parameters
Mode 0 – Disable
1 – Enable Default is 1 (Enable).
Confidential DAVISCOMMS (S) PTE LTD 83 /105
Page 84
MTD2000 AT Command Guide R12
Example
Command Response
AT$UM=0 Note: Disable RS232 interface.
$UM? Note: Query RS232 interface status via SMS or TCP / UDP channel.
$UM=1 Note: Enable RS232 interface via SMS or TCP channel.
OK
OK $UM: 0
OK
Confidential DAVISCOMMS (S) PTE LTD 84 /105
Page 85
MTD2000 AT Command Guide R12
22 Power Status Command
22.1 External Power Status – AT$XE
This command allows user to set maximum 5 external power thresholds for monitoring, which is in term of digital value. When the external power level is equal or higher than the preset threshold, the respective external power status flag in the event table will be set.
The ADC reference voltage is 3.3 volts. The external power level is reduced by ten times before connecting to the ADC channel.
For the conversion from digital value to actual voltage, refer to “ADC Conversion Formula” below. The factor value for external power level is 29. For example, the voltage of 12 V is corresponding to digital value of 348.
ADC Conversion Formula
External Power Level = (Digital Value / Factor) volts
Syntax
Command Response
AT$XE=<Index>,<Mode>[,<Threshold>]
Note: Write setting.
AT$XE=<Index>
Note: Query one setting and current external power level.
AT$XE?
Note: Query all settings (not accessible via SMS).
Parameters
Index External power status 1 to 5 Mode 0 – Disable
1 – Enable Default is 0 (Disable)
OK
$XE: <Index>,<Mode>,<Threshold>,<Current>
OK $XE: 1, <Mode>,<Threshold> … $XE: 5, <Mode>,<Threshold>
Confidential DAVISCOMMS (S) PTE LTD 85 /105
Page 86
MTD2000 AT Command Guide R12
Threshold External power threshold in digital value (0 to 1023 units)
Default is 0 units
Current Current external power level in digital value (0 to 1023 units)
Example
Command Response
AT$XE=1,1,200 Note: Set an external power threshold.
AT$XE=1 Note: Query setting and current external power level.
AT$XE=2 Note: Query setting and current external power level.
AT$XE? Note: Query all settings.
OK
$XE: 1,1,200,250
$XE: 1,0,0,250
OK $XE: 1,1,200 $XE: 2,0,0 … $XE: 5,0,0
22.2 Battery Power Status – AT$XB
This command allows user to set maximum 5 battery power thresholds for monitoring, which is in term of digital value. When the battery power level is equal or higher than the preset threshold, the respective battery power status flag in the event table will be set.
The ADC reference voltage is 3.3 volts. The battery power level is reduced by half before connecting to the ADC channel.
For the conversion from digital value to actual voltage, refer to “ADC Conversion Formula” below. The factor value for battery power level is 155. For example, the voltage of 3.3 V is corresponding to digital value of 512.
ADC Conversion Formula
Battery Power Level = (Digital Value / Factor) volts
Syntax
Command Response
Confidential DAVISCOMMS (S) PTE LTD 86 /105
Page 87
MTD2000 AT Command Guide R12
AT$XB=<Index>,<Mode>[,<Threshold>]
Note: Write setting.
AT$XB=<Index>
Note: Query one setting and current battery power level.
AT$XB?
Note: Query all settings (not accessible via SMS).
OK
$XB: <Index>,<Mode>,<Threshold>,<Current>
OK $XB: 1, <Mode>,<Threshold> … $XB: 5, <Mode>,<Threshold>
Parameters
Index Battery power status 1 to 5 Mode 0 – Disable
1 – Enable Default is 0 (Disable) Threshold Battery power threshold in digital value (0 to 1023 units)
Default is 0 units
Current Current battery power level in digital value (0 to 1023 units)
Example
Command Response
AT$XB=1,1,200 Note: Set a battery voltage threshold.
AT$XB=1 Note: Query one setting and current battery power level.
AT$XB=2 Note: Query one setting and current battery power level.
AT$XB? Note: Query all settings.
OK
$XB: 1,1,200,250
$XB: 1,0,0,250
OK $XB: 1,1,200 $XB: 2,0,0 … $XB: 5,0,0
Confidential DAVISCOMMS (S) PTE LTD 87 /105
Page 88
MTD2000 AT Command Guide R12
23 Timer and Counter Command
23.1 Timer – AT$FT
This command allows user to set maximum 10 timers. When the timer is expired, the respective timer flag in the event table will be set.
Note:
1. When timer is disabled, the current tick will be paused.
2. When timer is enabled, the current tick will resume from its last paused tick. In the case of once timer, it will not resume running if the current tick is equal to the user specified interval.
3. When timer is disabled, reset the timer will set the current tick to 0.
4. When timer is enabled, reset the timer will set the current tick to 0 and then start running again.
5. The current tick will not be saved and will be reset to 0 when power is cycled or device is reset.
6. After power is cycled or device is reset, the timer will start to run if it is enabled.
Syntax
Command Response
AT$FT=<Index>,<Mode>[,<Interval>,<Cyclic>]
Note: Write setting.
AT$FT=<Index>
Note: Query one setting and current tick.
AT$FT?
Note: Query all settings
SMS)
.
(not accessible via
Parameters
Index Timer 1 to 10 Mode 0 – Disable
OK
OK $FT: <Index>,<Mode>,<Interval>,<Cyclic>,<Current>
OK $FT: 1,<…> … $FT: 10,<…>
Confidential DAVISCOMMS (S) PTE LTD 88 /105
Page 89
MTD2000 AT Command Guide R12
1 – Enable 2 – Reset
Default is 0 (Disable). Note: Mode = 2 is only valid with AT$FT=<Index>,<Mode> Interval Timer interval in second (1 to 65000 seconds) Default is 1 Cyclic 0 – Once timer
1 – Cyclic timer Default is 0 (Once timer) Current Current timer tick in second
Example
Command Response
AT$FT=1,1,10,0 Note: Start timer 1 of interval 10 seconds.
AT$FT=1 Note: Query timer 1 setting and current tick.
AT$FT=1,2 Note: Reset timer 1 and start to run from beginning.
AT$FT=1,0 Note: Pause timer 1.
AT$FT=1 Note: Query timer 1 setting and current tick.
AT$FT? Note: Query setting of all timers (without current tick).
OK
OK $FT: 1,1,10,0,3
OK
OK
OK $FT: 1,0,10,0,5
OK $FT: 1,1,10,0 … $FT: 10,0,0,0
23.2 Counter – AT$FC
Confidential DAVISCOMMS (S) PTE LTD 89 /105
Page 90
MTD2000 AT Command Guide R12
This command allows user to set maximum 10 counters. When the current counter value reaches the user defined counter value, the respective counter flag in the event table will be set.
Note:
1. The current counter value starts with 0.
2. The current counter value will not decrement further once it reaches 0.
3. The current counter value will not increment further once it reaches the user defined
counter value.
4. The current counter value will not increment / decrement if the counter is disabled.
5. The current counter value is saved and will not be reset when the power of the device is
cycled.
6. Note that excessive use of counter (e.g. frequent increment / decrement counter value)
may result in overwritten data flash beyond the life cycle.
Syntax
Command Response
AT$FC=<Index>,<Mode>[,<Counter>]
Note: Write setting.
AT$FC=<Index>
Note: Query one setting and current counter value.
AT$FC?
Note: Query all settings
(not accessible via SMS)
OK
OK $FC: <Index>,<Mode>,<Counter>,<Current>
OK $FC: 1,<…>
.
… $FC: 10,<…>
Parameters
Index Counter 1 to 10 Mode 0 – Disable
1 – Enable 2 – Reset to 0 count 3 – Increment one count 4 – Decrement one count
Default is 0 (Disable) Note: Mode = 2, 3 or 4 are only valid with AT$FC=<Index>,<Mode>
Confidential DAVISCOMMS (S) PTE LTD 90 /105
Page 91
MTD2000 AT Command Guide R12
Counter User defined counter value (1 to 65000) Default is 1 Current Current counter value
Example
Command Response
AT$FC=1,1,10 Note: Start counter 1 of user defined counter value 10.
AT$FC=1,3 Note: Increment counter 1.
AT$FC=1 Note: Query counter 1 setting and current counter value.
AT$FC? Note: Query all settings (without current counter value).
OK
OK
OK $FC: 1,1,10,1
OK $FC: 1,1,10,1 … $FC: 10,0,0,0
Confidential DAVISCOMMS (S) PTE LTD 91 /105
Page 92
MTD2000 AT Command Guide R12
24 Event Command
24.1 Event Table
The event flags are used as conditions to trigger event.
Function Flag Value Remarks
GSM Sleep G1 1 (GSM sleep) 0 (GSM awake) GSM Registered G2 1 (GSM registered) 0 (GSM not registered) GPRS Registered G3 1 (GPRS registered) 0 (GPRS not registered) GPRS Connected G4 1 (GPRS connected) 0 (GPRS not connected) GPS Sleep L1 1 (GPS sleep) 0 (GPS awake) GPS Data L2 1 (valid GPS fix) 0 (invalid GPS fix) GPS Operational L3 1 (GPS functioning) 0 (GPS not functioning) GPS Antenna L4 1 (antenna disconnected) 0 (antenna connected) GPS external antenna Online Flag N1 1 (network connected) 0 (network disconnected) Geo Fence Z1 to Z20 1 (enter zone) 0 (exit zone) Digital Input P1 to P8 1 (high) 0 (low) External Power E1 to E5 1 (>= preset threshold) 0 (< preset threshold) Battery Power B1 to B5 1 (>= preset threshold) 0 (< preset threshold) Timer T1 to T10 1 (timer expire) 0 (timer not expire) Counter C1 to C10 1 (= preset count) 0 (< preset count) Harsh Acceleration H1 1 (>= speed change) 0 (< speed change) Harsh Deceleration H2 1 (>= speed change) 0 (< speed change) Mileage Counter H3 1 (= preset threshold) 0 (not used) Over Speed Detection H4 1 (>= high speed threshold ) 0 (<= normal speed threshold)
Dual SIM R1 1 (SIM 2 active) 0 (SIM 1 active) Panic Button R2 1 (button press) 0 (button release) Analog Input R3 1 (>= preset threshold) 0 (< preset threshold) Motion Detection R4 1 (motion detected) 0 (no motion)
Confidential DAVISCOMMS (S) PTE LTD 92 /105
Page 93
MTD2000 AT Command Guide R12
24.2 Event – $EV
This command allows user to set up maximum 20 events for user application. Event is used to define certain conditions (using event flags) and trigger the predefined commands when the conditions are met. The maximum length of event including the overhead is 150 characters.
Note:
1. Multiple conditions of up to 5 are supported.
2. Multiple commands of up to 10 are supported (use vertical bar character ‘|’ as a
separator).
3. The event will be triggered when the condition changes state and become true
again.
4. The events will be saved in the flash and will execute after power is cycled (or reset).
5. The event will be triggered right away when the condition is met after power is
cycled (or reset).
Format
AT$EV=<Index>,<Mode>,<Operator>,”<Condition 1> <Condition 2> … <Condition N>”,<Command 1>|<Command 2>|…|<Command M>
Syntax
Command Response
AT$EV=<Index>,<Mode>[,<Operator>,<Conditions> ,<Commands>]
Note: Write setting.
AT$EV=<Index>
Note: Query one setting (not accessible via SMS).
AT$EV?
Note: Query all settings (not accessible via SMS).
OK
OK AT$EV: <Index>,<Mode>,<Operator>,<Conditions>, <Commands>
OK AT$EV: 1,<…> … AT$EV: 20,<…>
Parameters
Index Event 1 to 20
Confidential DAVISCOMMS (S) PTE LTD 93 /105
Page 94
MTD2000 AT Command Guide R12
Mode 0 – Disable
1 – Enable Default is 0 (Disable)
Operator 0 – Logical AND operation in the condition
1 – Logical OR operation in the condition
Conditions Specify up to 5 conditions using event flags Commands Specify up to 10 commands to be triggered when conditions are
met
Example:
Command Response
Refer to example 1 for event with AND condition.
Refer to example 2 for event with OR condition.
AT$EV=1 Note: Query an event.
AT$EV? Note: Query setting of all events
OK
OK
OK AT$EV: 1,1,0,”P1=1 P3=1”,$SR=”Alarm!”,”S1”|$NR=0,”N”
OK AT$EV: 1,1,0,”P1=1 P3=1”,$SR=”Alarm!”,”S1”|$NR=0,”N” AT$EV: 2,1,1,”E1=0 B1=0”, $OUT=1,1|$TM=1,”S1” … AT$EV: 20,””
Example 1: Event with AND Condition
When the following conditions are met, send out one standard report via SMS and one NMEA report via TCP / UDP channel.
Condition:
Port #1 is HIGH AND Port #3 is HIGH
Event:
AT$EV=1,1,0,”P1=1 P3=1”, $SR=”Alarm!”,”S1”|$NR=0,”N”
Example 2: Event with OR Condition
When any of following conditions is met, turn on output port and send out a text message via SMS.
Confidential DAVISCOMMS (S) PTE LTD 94 /105
Page 95
Condition:
External OR Battery power level drops below preset threshold
Event:
AT$EV=2,1,1,”E1=0 B1=0”, $OUT=1,1|$TM=1,”S1”
MTD2000 AT Command Guide R12
Confidential DAVISCOMMS (S) PTE LTD 95 /105
Page 96
MTD2000 AT Command Guide R12
25 Miscellaneous Functions
25.1 GSM Monitoring
The firmware will monitor the GSM module every 4 minutes to check if the GSM module is alive. It will shorten the monitoring interval to every minute if there is no response from the GSM module, and reset the GSM module and clear the GSM register flag in the event table if there is no response after three consecutive attempts with one minute interval. It will repeat the above cycle and set the GSM register flag once there is response from the GSM module.
If dual SIM auto switching is enabled, the firmware will switch over to another SIM card when GSM module has no response.
The firmware will monitor the GSM module every 4 minutes to check if roaming occurs. If dual SIM auto switching is enabled, the firmware will switch over to another SIM when roaming take places.
25.2 GPS Monitoring
The firmware will monitor the GPS module every 10 seconds to check if the GPS module is alive. It will reset the GPS module and clear the GPS operational flag in the event table if there is no response from the GPS module after three consecutive checks. Thereafter, the firmware will monitor the GPS module every 2 minutes and will set the GPS operational flag if the response is resumed.
25.3 GPS Antenna Detection
The firmware will monitor the GPS external antenna to check for disconnection. When the GPS external antenna is disconnected from the device, the firmware will set the GPS antenna flag in the event table. When the GPS external antenna is connected to the device, the firmware will clear the GPS antenna flag.
25.4 Low Battery Shutdown
When the battery voltage drops below 3 V, the device will shutdown and send out an unsolicited response to indicate device shutdown. The device will reset and resume normal operation when the battery voltage goes above 3.6 V (e.g. apply external power source).
Confidential DAVISCOMMS (S) PTE LTD 96 /105
Page 97
MTD2000 AT Command Guide R12
25.5 Watchdog Timer
The device provides watchdog function to prevent firmware lockup. If any function in the firmware is lockup for a period of time (65 sec for software watchdog timer / 90 sec for hardware watchdog timer), the watchdog timer will kick in to reset the device.
25.6 Firmware Upgrade
The firmware of the device can be upgraded over the air using the $SU command or via the serial port using the Downloader on PC.
25.7 Test Mode
The device provides a test mode for peripherals test in factory. The device will enter test mode when panic button is pressed and hold for 2 sec upon power up. Upon entering test mode (around 10 sec from power up), the device will display “MTD2000 Test Mode”. User may press the RESET button to exit test mode. In test mode, the GSM module will always turn on and will not enter cyclic mode.
Confidential DAVISCOMMS (S) PTE LTD 97 /105
Page 98
26 Appendix
26.1 NMEA Messages
MTD2000 AT Command Guide R12
26.1.1
GLL – Geographic Position (Latitude / Longitude)
It is for showing latitude and longitude, UTC time of fix and status.
Syntax: $GPGLL,xxmm.dddd,<N|S>,yyymm.dddd,<E|W>,hhmmss.dd,S,M*hh<CR><LF>
xxmm.dddd
Latitude xx = degrees mm = minutes dddd = decimal part of minutes
<N|S>
Either character N or character S, N = North, S = South )
yyymm.dddd
Longitude yyy = degrees mm = minutes dddd = decimal part of minutes
<E|W> hhmmss.dd
Either character E or character W, E = East, W = West UTC time hh = hours mm = minutes ss = seconds dd = decimal part of seconds
S
Status indicator A = valid V = invalid
M
Mode indicator A=autonomous GNSS fix D=differential GNSS fix E=estimated/dead reckoning fix N=no fix
Example:
$GPGLL,6016.3073,N,02458.3817,E,090110.10,A,A*61
Remarks:“*61” is the checksum of the example message and is calculated as described in page 13 of NMEA 3.0.
Confidential DAVISCOMMS (S) PTE LTD 98 /105
Page 99
MTD2000 AT Command Guide R12
26.1.2
GGA – Global Positioning System Fix Data
It is to show the time, position and fix related data for a GPS receiver.
Syntax: $GPGGA,hhmmss.dd,xxmm.dddd,<N|S>,yyymm.dddd,<E|W>,v,ss,d.d,h.h,M,g. g,M,a.a,xxxx*hh<CR><LF>
Hhmmss.dd
UTC time hh = hours mm = minutes ss = seconds dd = decimal part of seconds
xxmm.dddd
Latitude xx = degrees mm = minutes dddd = decimal part of minutes
<N|S> yyymm.dddd
Either character N or character S, ( N = North, S = South ) Longitude yyy = degrees mm = minutes dddd = decimal part of minutes
<E|W> V
Either character E or character W, E = East, W = West Fix valid indicator 0 = Fix not valid 1 = Fix valid
Ss d.d h.h M g.g M a.a Xxxx
Number of satellites used in position fix, 00-12. Fixed length HDOP – Horizontal Dilution Of Precision Altitude (mean-sea-level, geoid) NULL (missing) NULL (missing) NULL (missing) NULL (missing) NULL (missing)
Example:
$GPGGA,084053.39,6016.3051,N,02458.3735,E,0,00,0.0,46.6,M,18.2,M,,*5D
26.1.3
GSA – DOP and Active Satellites
It is to show the GPS receivers’ operating mode, satellites used in the navigation solution reported by the GGA sentence, and DOP values.
Syntax: $GPGSA,a,b,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,p.p,h.h,v.v*hh<CR><LF>
a
Mode: M = Manual, forced to operate in 2D or 3D mode.
Confidential DAVISCOMMS (S) PTE LTD 99 /105
Page 100
b xx p.p h.h v.v
Example:
$GPGSA,A,3,06,10,15,16,21,25,30,,,,,,2.1,1.2,1.8*38
MTD2000 AT Command Guide R12
A = Automatic, allowed to automatically switch 2D/3D Mode: 1 = Fix not available, 2 = 2D, 3 = 3D ID (PRN) numbers of GPS satellites used in solution PDOP HDOP VDOP
26.1.4
GSV – Satellites in View
It shows the number of satellites in view, satellite ID (PRN) numbers, elevation, azimuth, and SNR value. The satellites are in PRN number order.
Before a position fix is acquired the information contains only the SNR (Signal to Noise Ratio) value. After a fix is acquired, the elevation and azimuth angles will be added. Note that there can be also “theoretical” satellites in the GSV message. These are satellites of which the angles (elevation, azimuth) are known but for some reasons, e.g. due to an obstruction, have not been found by the GPS receiver. The SNR value for these satellites is therefore zero.
Syntax: $GPGSV,n,m,ss,xx,ee,aaa,cn,…………. ,xx,ee,aaa,cn*hh<CR><LF>
n m ss xx ee aaa cn
Total number of messages, 1 to 9 Message number, 1 to 9 Total number of satellites in view Satellite ID (PRN) number Satellite elevation, degrees 90 max Satellite azimuth, degrees True, 000 to 359 SNR ( C/No) 00-99 dB-Hz. zero when not tracking
Examples:
$GPGSV,4,1,14,03,66,207,50,08,09,322,44,11,01,266,42,14,00,155,00* 79
$GPGSV,4,2,14,15,41,088,48,17,21,083,44,18,57,087,51,21,57,173,50* 78
$GPGSV,4,3,14,22,05,203,00,23,52,074,49,26,17,028,44,27,00,300,00* 79
$GPGSV,4,4,14,28,32,243,00,31,48,286,00*70
Confidential DAVISCOMMS (S) PTE LTD 100 /105
Loading...