Maestro M100 2G User manual

Maestro Smart Pack
User Manual
100 2G
Rev.1.0
Confidential, the whole present document is the sole property of Maestro Wireless Solutions Ltd.
Revision history
Rev.
0.97e
Rev 1.0
Date
29Apr2013
Details
First release
Originated by
Wallace Lee
This manual is written without any warranty. Maestro Wireless Solutions Ltd. reserves the
right to modify or improve the product and its accessories which can also be withdrawn without
prior notice.
Besides, our company stresses the fact that the performance of the product as well as
accessories depends not only on the proper conditions of use, but also on the environment
around the places of use.
Maestro Wireless Solutions Ltd. assumes no liability for damage incurred directly or indirectly
from errors, omissions or discrepancies between the modem and the manual.
Confidential, the whole present document is the sole property of Maestro Wireless Solutions Ltd.
Table of contents
1.
INTRODUCTION ...............................................................................................................................................................................................6
2.
INSTALLATION .................................................................................................................................................................................................6
3.
2.1.
CHECKING THE SMARTPACK PROGRAM .............................................................................................................................. 6
2.2.
ERASING THE SMART PACK................................................................................................................................................. 6
GPRS AND TCP/UDP PARAMETERS SETUP .................................................................................................................................................7
3.1.
3.1.1.
3.2.
3.2.2.
AT+IPCONNECT command ........................................................................................................................................ 8
AT+IPTCP command .................................................................................................................................................... 9
3.3.2.
AT+IPUDP command ................................................................................................................................................. 11
3.3.3.
AT+IPBUFF command ............................................................................................................................................... 12
EXTRA TCP/UDP PARAMETERS SETUP ............................................................................................................................ 13
AT+IPOPT command.................................................................................................................................................. 13
AUTOMATIC AND SELF-RECOVERY TCP/UDP CONNECTION ...................................................................................................................15
4.1.
FLOW DIAGRAM OF AUTO TCP/UDP CONNECTION FUNCTION .......................................................................................... 16
4.2.
AT COMMANDS FOR AUTO TCP/UDP CONNECTION ......................................................................................................... 17
4.2.1.
AT+AUTOTCP command .......................................................................................................................................... 17
4.2.2.
AT+AUTOUDP command .......................................................................................................................................... 18
4.3.
4.3.1.
4.4.
4.4.1.
AT COMMANDS FOR TUNING AUTOTCP/UDP CONNECTION ............................................................................................. 19
AT+AUFCM command .............................................................................................................................................. 19
AT COMMANDS FOR TCP/UDP CONNECTION CONTROL.................................................................................................... 19
AT+AUOPT command ............................................................................................................................................... 19
AT COMMAND DRIVEN TCP/UDP CONNECTION .........................................................................................................................................22
5.1.
AT COMMANDS FOR AUTO TCP/UDP CONNECTION ......................................................................................................... 22
5.1.1.
AT+DLEMODE command ......................................................................................................................................... 22
5.1.2.
AT+OTCP command................................................................................................................................................... 23
5.1.3.
AT+OUDP command .................................................................................................................................................. 23
PING SERVICE ...............................................................................................................................................................................................25
6.1.
6.1.1.
7.
TCP/UDP PARAMETERS SETUP .......................................................................................................................................... 9
3.3.1.
3.4.1.
6.
ACTIVATING GPRS CONNECTION ....................................................................................................................................... 8
AT+CGATT command .................................................................................................................................................. 8
3.4.
5.
AT+IPGPRS command ................................................................................................................................................. 7
3.2.1.
3.3.
4.
GPRS NETWORK PARAMETERS .......................................................................................................................................... 7
AT COMMAND FOR SETTING UP AND EXECUTE PING .......................................................................................................... 25
AT+IPPING command ................................................................................................................................................ 25
DYNAMIC DNS ...............................................................................................................................................................................................27
7.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 27
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
1
7.2.
8.
AT COMMAND FOR CONFIGURING DYNAMIC DNS ........................................................................................................... 28
7.2.1.
AT+IPDDNSSERV command .................................................................................................................................... 28
7.2.2.
AT+IPDDNSACCT command .................................................................................................................................... 28
7.2.3.
AT+IPDDNSUPD command ...................................................................................................................................... 29
TCP TERMINAL ..............................................................................................................................................................................................31
8.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 31
8.2.
AT COMMAND FOR TCP TERMINAL .................................................................................................................................. 31
8.2.1.
9.
10.
11.
AT+TCPTERM command .......................................................................................................................................... 31
EMAIL SENDING (SMTP) SERVICE ...............................................................................................................................................................33
9.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 33
9.2.
AT COMMAND FOR EMAIL SENDING .................................................................................................................................. 33
9.2.1.
AT+IPSMTP command ............................................................................................................................................... 33
9.2.2.
AT+IPSMTP command ............................................................................................................................................... 34
9.2.3.
AT+EMSUBJ command ............................................................................................................................................. 35
9.2.4.
AT+EMBODY command ........................................................................................................................................... 35
9.2.5.
AT+EMSEND command ............................................................................................................................................ 37
SOCKET COMMUNICATION SERVICE ..........................................................................................................................................................39
10.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 39
10.2.
AT COMMAND FOR SOCKET COMMUNICATION .................................................................................................................. 39
10.2.1.
AT+SCHOST command ......................................................................................................................................... 39
10.2.2.
AT+SCMESS command......................................................................................................................................... 40
10.2.3.
AT+SCSEND command......................................................................................................................................... 41
REMOTE AT COMMAND BY SMS ..................................................................................................................................................................43
11.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 43
11.2.
AT COMMAND FOR CONFIGURING AT COMMAND BY SMS ................................................................................................ 44
11.2.1.
11.3.
12.
LIMITATION AND CAUTION TO BE TAKEN WHEN USING REMOTE AT COMMAND ................................................................. 44
I/O TRIGGERED AT COMMAND .....................................................................................................................................................................45
12.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 45
12.2.
AT COMMAND FOR CONFIGURING I/O TRIGGERED AT COMMAND ..................................................................................... 46
12.2.1.
12.3.
13.
AT+SMSAT command ........................................................................................................................................... 44
AT+IOAT command ............................................................................................................................................... 46
NOTES AND CAUTIONS TO BE TAKEN WHEN USING I/O TRIGGERED AT COMMAND ............................................................ 47
AI TRIGGERED AT COMMAND ......................................................................................................................................................................48
13.1.
DESCRIPTION OF THE OPERATION ..................................................................................................................................... 48
13.2.
AT COMMAND FOR CONFIGURING AI TRIGGERED AT COMMAND ...................................................................................... 49
13.2.1.
AT+ADCAT command ........................................................................................................................................... 49
13.2.2.
AT+ADCATLMT command .................................................................................................................................. 50
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
2
13.3.
14
CALL SCREENING .........................................................................................................................................................................................51
14.1
15
AT COMMAND FOR CONFIGURING CALL SCREENING ......................................................................................................... 51
14.1.1
AT+CSRN command ............................................................................................................................................. 51
14.1.2
AT+CSNW command ............................................................................................................................................ 51
14.1.3
AT+CSNR command ............................................................................................................................................. 52
14.1.4
AT+CSND command ............................................................................................................................................. 53
MODEM STATUS CHECK AND MONITORING...............................................................................................................................................54
15.1
16
NOTES AND CAUTIONS TO BE TAKEN WHEN USING AI TRIGGERED AT COMMAND ............................................................. 50
AT COMMAND FOR MODEM STATUS CHECK AND MONITORING ........................................................................................ 54
15.1.1
AT+TMODE command .......................................................................................................................................... 54
15.1.2
Operation of Modem Status Check and Monitoring .............................................................................................. 55
AUTOMATIC PIN ENTRY ................................................................................................................................................................................56
16.1
AT COMMAND FOR AUTOMATIC PIN ENTRY ..................................................................................................................... 56
16.1.1
17
REMOTE PROGRAM UPDATE .......................................................................................................................................................................58
17.1
AT+IPFTP command.............................................................................................................................................. 58
17.1.2
AT+FTPDOTA command ...................................................................................................................................... 59
17.1.3
AT+ADINSTALL command .................................................................................................................................. 60
COMMAND STRING AND “SERVICE” CONCEPT .................................................................................................................. 62
COMMAND STRING – WRITING AND USING................................................................................................................................................63
19.1
20
NOTES AND CAUTIONS TO BE TAKEN ON USING REMOTE PROGRAM UPDATE ...................................................................... 61
COMMAND STRING - INTRODUCTION .........................................................................................................................................................62
18.1
19
AT COMMAND FOR REMOTE PROGRAM UPDATE ................................................................................................................ 58
17.1.1
17.2
18
AT+AUTOPIN command ...................................................................................................................................... 56
STRUCTURE OF COMMAND STRING .................................................................................................................................. 63
19.1.1
Service type ............................................................................................................................................................ 63
19.1.2
Service Id ............................................................................................................................................................... 63
19.1.3
Operation type and Operation argument ................................................................................................................ 63
19.2
CONCATENATING COMMAND STRING ............................................................................................................................... 63
19.3
ENTERING AND EXECUTING COMMAND STRING ............................................................................................................... 64
19.3.1
AT+CSTR command .............................................................................................................................................. 64
19.3.2
AT+CSTRSET command ....................................................................................................................................... 64
COMMAND STRING – SERVICES..................................................................................................................................................................66
20.1
ALARM SERVICE ............................................................................................................................................................... 66
20.1.1
Alarm Service Command String Syntax and explanation ...................................................................................... 66
20.1.2
Reading Alarm Service Status ................................................................................................................................ 66
20.2
COUNTER SERVICE ........................................................................................................................................................... 67
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
3
20.2.1
Counter Service Command String Syntax and explanation ................................................................................... 67
20.2.2
Reading Counter Service Status ............................................................................................................................. 67
20.3
20.3.1
Countdown Timer Service Command String Syntax and explanation ................................................................... 67
20.3.2
Reading Countdown Timer status .......................................................................................................................... 68
20.4
Input Port Service Command String Syntax and explanation ................................................................................ 68
20.4.2
Input Port operation mechanism ............................................................................................................................ 68
20.4.3
Reading Input Port status ....................................................................................................................................... 69
SMS Service Command String Syntax and explanation ........................................................................................ 69
20.5.2
Using “variable” options within SMS content ....................................................................................................... 70
EMAIL SENDING SERVICE ................................................................................................................................................. 70
20.6.1
Email Sending Service Command String Syntax and explanation ......................................................................... 70
20.6.2
Using “variable” options within additional email content...................................................................................... 71
20.6.3
Reading Email Sending Service status ................................................................................................................... 72
20.7
ANALOGUE INPUT SERVICE .............................................................................................................................................. 72
20.7.1
Analogue Input Service Command String Syntax and explanation ....................................................................... 72
20.7.2
Analogue Input operation mechanism.................................................................................................................... 72
20.7.3
Reading Analogue Input Service status .................................................................................................................. 73
20.8
SOCKET COMMUNICATION SERVICE ................................................................................................................................. 73
20.8.1
Socket Communication Service Command String Syntax and explanation ........................................................... 73
20.8.2
Using “variable” options within additional email content...................................................................................... 74
20.8.3
Reading Input Port status ....................................................................................................................................... 74
COMMAND STRING - READING STATUS OF SERVICES .............................................................................................................................75
21.1
23
SMS SERVICE ................................................................................................................................................................... 69
20.5.1
20.6
22
INPUT PORT SERVICE ........................................................................................................................................................ 68
20.4.1
20.5
21
COUNTDOWN TIMER SERVICE .......................................................................................................................................... 67
COMMAND FOR READING CURRENT INFORMATION OF SERVICES ...................................................................................... 75
21.1.1
AT+CSTRSTAT Command .................................................................................................................................... 75
21.1.2
Reading Alarm Service .......................................................................................................................................... 75
21.1.3
Reading Counter Service........................................................................................................................................ 76
21.1.4
Reading Countdown Timer Service ....................................................................................................................... 76
21.1.5
Reading Input Pin Service ...................................................................................................................................... 76
21.1.6
Reading Email Sending Service ............................................................................................................................. 76
21.1.7
Reading Analogue Input Service ............................................................................................................................ 76
21.1.8
Reading Socket Communication Service ............................................................................................................... 76
KNOWN ISSUES.............................................................................................................................................................................................77
22.1
MUTUALLY EXCLUSIVE TCP/UDP FUNCTIONS. ................................................................................................................ 77
22.2
SENDING MAESTRO SMART PACK AT COMMANDS OVER SMS AND TCP .......................................................................... 77
QUESTIONS AND ANSWERS ........................................................................................................................................................................78
23.1
INSTALLATION .................................................................................................................................................................. 78
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
4
24
25
23.2
AUTOTCP/UDP ............................................................................................................................................................... 78
23.3
AT COMMAND DRIVEN TCP/UDP CONNECTION ............................................................................................................... 78
23.4
REMOTE AT COMMAND BY SMS ...................................................................................................................................... 78
23.5
I/O TRIGGERED AT COMMAND .......................................................................................................................................... 78
23.6
TCP TERMINAL ................................................................................................................................................................ 79
EXAMPLES OF MSP SETUP AND OPERATION ............................................................................................................................................80
24.1
TO SETUP AN AUTOMATIC TCP CONNECTION .................................................................................................................... 80
24.2
TO MAKE A AT COMMAND DRIVEN TCP CONNECTION ...................................................................................................... 80
24.3
TO SETUP PERIODIC PING .................................................................................................................................................. 81
24.4
TO SETUP TCP TERMINAL AND DYNAMIC DNS AUTOMATIC UPDATE ................................................................................ 81
24.5
SETUP PERIODIC PING ....................................................................................................................................................... 81
24.6
SETUP TCP TERMINAL AND DYNAMIC DNS AUTOMATIC UPDATE ..................................................................................... 81
24.7
PERFORM REMOTE PROGRAM UPDATE BY SENDING COMMAND OVER SMS ...................................................................... 82
24.8
COMMAND STRING PROGRAMMING EXAMPLE 1 ............................................................................................................... 82
24.9
COMMAND STRING PROGRAMMING EXAMPLE 2 ............................................................................................................... 83
24.10
COMMAND STRING PROGRAMMING EXAMPLE 3 ............................................................................................................... 83
COMMAND STRING QUICK REFERENCE ....................................................................................................................................................84
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
5
1. INTRODUCTION
Maestro Smart Pack (MSP) package is a software solution for Maestro 100 2G modem. New functions added to increase
application range of various industrial and automated applications:
-
Automatic and self-recovery TCP/UDP socket connection
-
AT command driven TCP/UDP socket connection
-
Ping service
-
Dynamic DNS (* note 1)
-
Remote AT command through SMS and TCP Terminal (* note 1)
-
I/O triggered AT command execution
-
Call screening (reject call made by unauthorized phone number)
-
Modem status check and monitoring
-
Socket data sending (Raw TCP data)
-
Email sending (SMTP)
-
“Command String” programming scripts
-
Remote program updating
-
AI triggered AT command
Users can configure and use the above features by AT commands.
Note 1: Special GPRS service from network recommended. See Chapter 8 and 9 for details
2. INSTALLATION
2.1. Checking the SmartPack program
SmartPack for M100 2G have been installed and activated in factoryFirst check the Maestro 100 2G firmware before
installation. Enter MSP version command AT+VAFV to verify :
Command
Expected response
AT+VAFV
SMARTPACK_M1002G_097eRC3_SL6087_R746_250413
OK
If the above command returns ERROR, please try to enter command AT+WOPEN=1 and retry.
2.2. Erasing the Smart Pack
If you need to erase the Smart Pack on HyperTerminal enter the following commands step by steps:
Command entered
AT+WOPEN=0
AT+WOPEN=3
AT+WOPEN=4
AT&F
Expected response
(modem may reset)
OK
(modem may reset)
OK
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
6
3. GPRS AND TCP/UDP PARAMETERS SETUP
GPRS related functions (Automatic and AT command driven TCP/UDP connection, PING service, DDNS support,
Remote program update described in Chapter 5,6,7,8 and 17) requires GPRS connection and TCP / UDP parameters
setup. This chapter will describe those required setups.
3.1. GPRS Network Parameters
User need to enter the following parameters for GPRS connection:
-
Access point name (APN)
-
User name
-
Password
They are to be entered by using AT+IPGPRS command. Contact your network operator for these parameters.
3.1.1. AT+IPGPRS command
Description:
This command is used to setup GPRS network parameters for the TCP/UDP connection feature.
Command Syntax
AT+IPGPRS=<Cid>,<APN>,<UN>,<PW>
Response Syntax
+IPGPRS: <Cid>,<APN>,<UN>,<PW>
Command
AT+ IPGPRS?
AT+ IPGPRS=1,
AT+ IPGPRS =1,”INTERNET”
AT+ IPGPRS=?
Possible responses:
+IPGPRS: 1,"INTERNET","" ,””
OK
Note: show current settings
OK
Note: set Cid value to 1
OK
Note: set the PDP value to 1 and APN to “INTERNET”
+IPGPRS: (1-4),(100),(50),(50)
OK
Note: possible values
Defined Values :
<Cid>
PDP context identifier.
Note: to use with MSP TCP/UDP connection feature this value must be set to 1.
<APN>
Access point name of the GPRS network. Max 100 characters.
<UN>
User name to access the GPRS service. Max 50 characters.
<PW>
Password used to access the GPRS service. Max 50 characters.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
7
3.2. Activating GPRS Connection
For using AT command driven TCP/UDP connection (described in Chapter 5), you need to first activate the MSP GPRS
connection. There are two AT commands:
-
AT+CGATT
-
AT+IPCONNECT
3.2.1. AT+CGATT command
This standard AT command is to make the modem to attach to or detach GPRS network. For details please read AT
command document.
Command Syntax
AT+CGATT=<state>
Response Syntax
+CGATT: <state>
Command
AT+ CGATT?
AT+ CGATT=1
AT+ CGATT =0
Possible responses:
+CGATT: 0
OK
Note: display current status
OK
Note: GPRS attach success
OK
Note: GPRS detach success
Defined Values:
<state>
1:
attach GPRS
0:
detach GPRS.
3.2.2. AT+IPCONNECT command
This MSP AT commands is to make the modem to activate or deactivate GPRS connection. Once IPCONNECT is
success you can perform TCP/UDP connection as described on other chapters. Please read note below on using this
command.
Command Syntax
AT+IPCONNECT = <Bearer>,<Connect>
Response Syntax
+IPCONNECT: <Bearer>,<Connect>
Command
AT+ IPCONNECT=?
AT+ IPCONNECT?
AT+IPCONNECT=1,1
Possible responses:
+IPCONNECT: (0-1) , (0-1)
OK
Note: display possible values
+IPCONNECT: 1,0
OK
Note: display current status
OK
OK
OK
Note: Activate GPRS connection success
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
8
AT+IPCONNECT=1,1
AT+ IPCONNECT =1,0
+CME ERROR: 3
Note: Activate GPRS connection fail
OK
Note: Deactivate GPRS connection success
Defined Values:
<Bearer>
0:
using GSM Bearer ( Note: do NOT use this for MSP )
1:
using GPRS Bearer.
<Connect>
0:
to stop connection
1:
to start connection.
Note: Before you making GPRS connection by this command make sure you have finished the following first:
1. Entered APN settings by AT+IPGPRS command Chapter 3.1.1)
2. Attached to GPRS network by AT+CGATT command (Chapter 3.2.1)
It is suggested after modem power up wait about 20 seconds before making GPRS connection.
3.3. TCP/UDP Parameters Setup
For using automatic or AT command driven TCP/UDP connection (described in Chapter 4 and 5), you need to first enter
the target TCP/UDP peer parameters. There are
-
AT+IPTCP
-
AT+IPUDP
-
AT+IPBUFF
-
3.3.1. AT+IPTCP command
This command specifies the TCP socket parameters and mode that to be used by automatic or AT command driven TCP
connection (described in Chapter 4 and 5).
Command Syntax
AT+IPTCP=<port>,<mode>,<server>,<TCPTxDelay>
Response Syntax
+ IPTCP: <port>,<mode>,<server>,<TCPTxDelay>
Command
AT+ IPTCP?
AT+ IPTCP =23
AT+ IPTCP =23,”C”,202.144.111.222”,0
Possible responses:
+IPTCP: 0,"S","",0
OK
Note : show current settings
OK
Note: set the TCP port to 23
OK
Note: to set the modem to connect TCP socket Client (caller)
mode
to target :address 202.144.111.222 and port 23)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
9
AT+ IPTCP =23,”S”,255.255.255.255”,0
AT+ IPTCP =?
OK
to set the modem to wait for TCP socket connection request
(Server (listening) mode)
any calling IP address allowed, port 23 (for main UART)
+IPTCP: (0-65535),("C","S"),(120),(0-1)
OK
Note : possible argument
Defined Values:
<port>
The port number to be used for the TCP socket connection. Default value is 0. Valid range is 0 to 65535.
<mode>
Mode of TCP operation. Default value is “S”.
“S”
Server (Listening) mode. This configures Maestro 100 2G to open a listening TCP connection on the specified
<port> . The TCP connection will be active upon getting socket connection request from the allowed remote TCP peer
(see <address>)
“C”
Client (caller) mode. This configures Maestro 100 2G to request opening a TCP connection to the server with the
specified <address> and <port> .
Note: This parameter is used by Auto TCP connection (see Chapter 4) only.
<address>
The address of the TCP server (or host). Default value is empty. Legal values could be 32-bit in dotted-decimal notation
(i.e. xxx.xxx.xxx.xxx) or alphanumeric ASCII test string up to 120 characters (only if DNS is available on the GPRS
network)
Note: In “Server” (Listening) mode the modem will only accept TCP connection request for the caller with address
specified in the <address> field. Yet if the it is set to “255.255.255.255” the modem will accept request from ANY
address.
<TCPTxDelay>
This parameter determines if there is time delay introduced before sending a TCP frame that has not been entirely filled
with user data. If it is set to 0 initiates the sending of a TCP frame as soon as possible after the reception of a single
character value from the host. If it is set to 1 initiate a delay will be introduced before the sending of a TCP frame
The default value is 0.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
10
3.3.2. AT+IPUDP command
This command specifies the UDP socket parameters and mode that to be used by automatic or AT command driven UDP
connection (described in Chapter 4 and 5).
Command Syntax
AT+IPUDP=<port>,<mode>,<server>,<UDPTxDelay>,<UART)
Response Syntax
+ IPUDP: <port>,<mode>,<server>,<UDPTxDelay>,0
+ IPUDP: <port>,<mode>,<server>,<UDPTxDelay>,1
Command
AT+ IPUDP?
AT+ IPUDP =23,”C”,202.144.111.222”,0
AT+ IPUDP =23,”S”,255.255.255.255”,0
AT+ IPUDP=?
Possible responses:
+IPUDP: 0,"S","",0
OK
Note : show current settings
OK
Note: to set the modem to connect UDP socket Client (caller)
mode
to target :address 202.144.111.222 and port 23
OK
to set the modem to wait for UDP socket connection request
(Server (listening) mode)
any calling IP address allowed, port 23
+IPUDP: (0-65535),("C","S"),(120),(0-1)
OK
Note : possible argument
Defined Values:
<port>
The port number to be used for the UDP socket connection. Default value is 0. Valid range is 0 to 65535.
<mode>
Mode of UDP operation. Default value is “S”.
“S”
Server (Listening) mode. This configures Maestro 100 2G to open a listening UDP connection on the specified
<port> . The UDP connection will be active upon getting socket connection request from the allowed remote UDP peer
(see <address>)
“C”
Client (caller) mode. This configures Maestro 100 2G to request opening a UDP connection to the server with the
specified <address> and <port> .
Note: This parameter is used by Auto UDP connection (see Chapter 4) only.
<address>
The address of the UDP server (or host). Default value is empty. Legal values could be 32-bit in dotted-decimal notation
(i.e. xxx.xxx.xxx.xxx) or alphanumeric ASCII test string up to 120 characters (only if DNS is available on the GPRS
network)
Note: In “Server” (Listening) mode the modem will only accept UDP connection request for the caller with address
specified in the <address> field. Yet if it is set to “255.255.255.255” the modem will accept request from ANY address.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
11
<UDPTxDelay>
This parameter determines if there is time delay introduced before sending a UDP frame that has not been entirely filled
with user data. If it is set to 0 initiates the sending of a UDP frame as soon as possible after the reception of a single
character value from the host. If it is set to 1 initiate a delay will be introduced before the sending of a UDP frame
The default value is 0.
3.3.3. AT+IPBUFF command
This command specifies the number of bytes of payload data from remote peer buffered inside the modem when
automatic or AT command driven TCP / UDP connection is made.
-
If the quantity of buffered data reaches this value, the whole buffered data will be sent out to the serial port.
-
If the data from remote is large enough at one time, only multiple of this value data will be sent out to the serial port.
Remainder will be kept inside buffer.
Example: AT+IPBUFF=5
1234567890A
18 bytes of data sent
from TCP or UDP
socket to modem
BCDEFGH
FGH
15 bytes (multiple of
5) data sent out to
serial port, remaining
data buffered inside
1234567890A
Command Syntax
AT+IPBUFF = <buff>
Response Syntax
+IPBUFF: <buff>
Command
AT+ IPBUFF=?
AT+ IPBUFF?
AT+IPBUFF = 5
Possible responses:
+IPBUFF: 0-100
OK
Note: display possible values
+IP BUFF: 0
OK
Note: display current status
OK
Note: Set IPBUFF value to 5
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
12
Defined Values:
<buff>
The number of bytes of data to be buffered. Default value is 0 (i.e. no buffering). Valid range is 0 to 100.
Note: If the TCP or UDP socket connection is broken, buffered data will be lost.
3.4. Extra TCP/UDP Parameters Setup
User can set additional parameters of TCP/UDP connection, including “keep alive” packet, maximum packet size, TTL
and periodic PING action to monitor Internet connection
3.4.1. AT+IPOPT command
This command specifies the extra TCP/UDP socket parameters.
Command Syntax
AT+IPOPT=<CMDType>,<parameter>,[,<action>,<conn_str>]
Response Syntax
+ IPOPT: <CMDType>,<parameter>[,<action>,<conn_str>]
Command
AT+ IPOPT?
AT+ IPOPT =1,60
AT+IPOPT=2,512
AT+ IPOPT=3,128
AT+IPOPT=4,60,1
AT+IPOPT=5,”010203FF”
AT+ IPOPT=?
Possible responses:
+IPOPT: 1, 0
+IPOPT: 2, 1500
+IPOPT: 3, 64
+IPOPT: 4, 0, 0
+IPOPT: 5,””
OK
Note: display current settings
OK
Note: enable the keep alive packet feature (for 60 seconds cycle
period)
OK
Note: set the size of maximum packet that to be sent to 512 bytes
OK
Note: set TTL to 128
OK
Note: Enable Ping action every 60 seconds, if ping fail then
disconnect GPRS
Set F bytes (0x01,0x02,0x03,0xFF) will be sent to remote
TCP/UDP peer when AutoTCP/UDP connection is just made
+IPOPT: (1-5),(0-65535)[,(0-2),(120)]
OK
Note : possible argument
Defined Values:
<CMDType>
1
setup “keep alive” packet feature:
when <parameter> is 0, the feature is disabled
when <parameter> is larger than 1 the modem will send an empty “keep alive” packet over the TCP socket every
<parameter> seconds, in order to avoid socket being closed because of idle timeout. The value of <parameter> is
0 to 65536.
2
specify the maximum size of the outgoing packet to <parameter>. The size can be set from 1 to 65535(0xFFFF)
default value is 1500.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
13
3
specify the TTL value of the socket connection to <parameter>. The value can be set from 1 to 255.
default value is 64.
4
specify weather to use ping function to check Internet connectivity:
<parameter> is the period in second of calling ping function after GPRS connected (+IPCONNECT: 1,1)
<action> is to specify the action will be taken if a set of ping action fail :
0: do nothing (default)
1: disconnect GPRS (+IPCONNECT=1,0)
2: reset Maestro
5
specify a set data to be send over the TCP/UDP connection to remote peer when it is just made. This can be used
as a identifier to the remote party.
<conn_str> is data to be sent when connection is just established. Data is entered in hexadecimal format (01 to FF).
Maximum 60 bytes can be set.
Note :
-
Before enabling periodic ping action (+IPOPT=4,1,…) be sure to setup Ping parameters properly. See Chapter 6 for
details.
-
Periodic ping action is enabled with GPRS disconnection (+IPOPT:4,x,1) then Automatic TCP/UDP connection
should be also enabled, so that those functions will try to re-connect GPRS after disconnection caused by ping fail.
-
Period of ping action should be set larger than the maximum time of one set of ping action.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
14
4. AUTOMATIC AND SELF-RECOVERY TCP/UDP
CONNECTION
The Auto TCP/UDP connection feature is defined for accessing serial devices over the Internet. Maestro 100 2G can be
configured that after power up it will connect to a remote TCP/UDP socket (client mode) or to wait for the TCP/UDP
socket connection request from remote peer (server mode).
If the socket connection is unsuccessful or disconnected it will repeat the connection request and back to waiting stage.
This make remote peer can access serial device connected to Maestro 100 2G.
Direct serial connection
RS-232 cable
serial device
TCP Socket connection via the Internet /GPRS network
Broad band
RS-232 cable
GPRS
Fixed IP:
123.456.789.0
Program monitoring
Auto TCP connection set to connect
Port 23
123.456.789.0 port 23
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
15
4.1. Flow diagram of Auto TCP/UDP connection function
Modem Power on/
restart
No
Is AutoTCP/UDP
enabled ?
Stop
Yes
Wait for 20 secs
No
Re-attach GPRS
No
GPRS attach OK ?
Yes
Re-activate GPRS
No
GPRS activation OK ?
Yes
TCP/UDP connection
request from allowed
peer?
No
No
Client mode ?
Yes
No
OK to open pre-defined
TCP/UDP socket ?
Dealy 2
seconds
Yes
No
Open TCP/UDP
socket, connect to
serial port
Open TCP/UDP
socket, connect to
serial port
TCP/UDP
disconnected or
closed ?
TCP/UDP
disconnected or
closed ?
Yes
Yes
GPRS attach fail ?
No
Yes
GPRS activation
fail ?
No
No
Yes
GPRS attach fail ?
Yes
No
GPRS activation
fail ?
Yes
No
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
16
4.2. AT commands for Auto TCP/UDP connection
4.2.1. AT+AUTOTCP command
This command controls the Maestro 100 2G to start TCP socket connection automatically.
Before using AT+AUTOTCP TCP and GPRS settings MUST be setup properly using AT+IPTCP and AT+IPGPRS
command respectively.
Command Syntax
AT+AUTOTCP=<mode>
Response syntax:
+AUTOTCP: <mode>
Command
AT+AUTOTCP=0
AT+AUTOTCP=1
AT+ AUTOTCP?
AT+AUTOTCP=?
Possible responses:
OK
Note : disable AutoTCP
OK
Enable AutoTCP for main UART
+AUTOTCP : 1
OK
Note display current status
+AUTOTCP : (0-1)
Note : possible argument
Defined Values:
<mode>
0
disable auto TCP (for main and USB UART)
1
enable auto TCP for main UART, disable autoTCP for USB UART
Note :
-
Before enabling Auto TCP, it MUST be properly set the GPRS settings by AT+IPGPRS command and TCP settings
by AT+IPTCP command (see Chapter 3)
-
ONLY GPRS PDP context # 1 will be used. So please setup +IPGPRS settings with <cid>=1
-
Once AutoTCP is enabled, it will start the TCP socket connection automatically after 20 seconds.
-
Once the TCP connection is established successfully, the serial port will go to data mode, all data entered to the serial
port will be sent to remote TCP peer. No more AT commands will be accepted then.
-
In TCP connected data mode, the DSR and DCD signals of the serial port will go to high.
-
If the TCP connection is broken the modem will try to reconnect automatically. During re-connection period serial port
will go back to command mode, and DSR/DCD signal back to low.
-
The setting will be saved, and after power off, the AUTOTCP will be restarted with the 20 seconds delay after power
up.
-
To stop auto TCP connection, you need to enter the command AT+AUTOTCP=0 by either 1: within 20 seconds after
power up, or 2: during reconnection (serial port back to command mode), or 3: by SMS (see Chapter 11, SMS AT
command).
-
Auto TCP connection is exclusive to other TCP/UDP feature. See Chapter 23 Q&A)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
17
4.2.2. AT+AUTOUDP command
This command controls the Maestro 100 2G to start UDPacket connection automatically.
Before using AT+AUTOUDP TCP and GPRS settings MUST be setup properly using AT+IPUDP and AT+IPGPRS
command respectively.
Command Syntax
AT+AUTOUDP=<mode>
Response syntax:
+AUTOUDP: <mode>
Command
AT+AUTOUDP=0
AT+AUTOUDP=1
AT+ AUTOUDP?
AT+AUTOUDP=?
Possible responses:
OK
Note : disable AutoUDP
OK
Note: Enable AutoUDP
+AUTOUDP : 1
OK
Note: display current status
+AUTOUDP : (0-3)
Note : possible argument
Defined Values:
<mode>
0
disable auto UDP (for main and USB UART)
1
enable auto UDP for main UART, disable autoUDP for USB UART
Note :
-
Before enabling Auto UDP, it MUST be properly set the GPRS settings by AT+IPGPRS command and UDP settings
by AT+IPUDP command
-
ONLY GPRS PDP context # 1 will be used. So please setup +IPGPRS settings with <cid>=1
-
Once AutoUDP is enabled, it will start the UDP socket connection automatically after 20 seconds.
-
Once the UDP connection is established successfully, the serial port will go to data mode, all data entered to the
serial port will be sent to remote UDP peer. No more AT commands will be accepted then.
-
In UDP connected data mode, the DSR and DCD signals of the serial port will go to high.
-
If the UDP connection is broken the modem will try to reconnect automatically. During re-connection period serial port
will go back to command mode, and DSR/DCD signal back to low.
-
The setting will be saved, and after power off, the AUTOUDP will be restarted with the 20 seconds delay after power
up.
-
To stop auto UDP connection, you need to enter the command AT+AUTOUDP=0 by 1: within 20 seconds after
power up, or 2: during reconnection (serial port back to command mode) or 3: by SMS (see Chapter 11, SMS AT
command).
-
Auto UDP connection is exclusive to other TCP/UDP feature. See Chapter 22Q&A)
-
Due to the nature of UDP socket connection, AT+AUTOUDP=0 may not be able to disconnection. in this case you
may send command AT+IPCONNECT=1,0 to disconnect GPRS connection.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
18
4.3. AT commands for tuning AutoTCP/UDP connection
4.3.1. AT+AUFCM command
This command controls the buffering time of TDP/UDP data sent to remote peer. Data coming towards UART will be
buffered for a “delay” period before being sent out.
Command Syntax
AT+AUFCM=<delay>
Response syntax:
+AUFCM: <delay>
Command
AT+AUFCM=1
AT+ AUFCM?
AT+AUFCM=?
Possible responses:
OK
Note : set the +AUFCM value to 1
+AUFCM : 2
OK
Note: display current status
+AUFCM : (1-255)
Note : possible argument
Defined Values:
<delay>
Default value: 0
Possible value: 1 to 255
Delay units between sending buffered data to TCP/UDP peer. The actual delay time is calculated by the value of <delay>
times 18.5 ms. So if <delay> is equal to 2 that means data will be sent to remote peer every 39ms (or immediately if
internal buffer is full) Increasing this value can make the data packet size bigger especially when data flow is slow, thus
reducing overhead.
Note :
-
If the value is set too high the maximum data transfer speed may be decreased.
4.4. AT commands for TCP/UDP connection control
4.4.1. AT+AUOPT command
This command lets user to set option parameters to control socket connection. There are three option parameters:
1. Socket idle period:
period of connected socket but zero data traffic, close socket when timeout
2. Server idle period:
period of connected socket but zero data traffic, de-activate GPRS and reactivate GPRS when timeout
3. Socket connect period:
period of maximum allowed connection time, close socket when timeout.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
19
Option Applicable mode
Serial port behavior if option enabled
1
Client / Server as client: in data mode all the time, data buffered
as server: in data mode when socket connected,
command mode when not (data not buffered)
2
Server
(n/a)
3
Server
(n/a)
Command Syntax
AT+AUOPT=<option>,<val>
Response syntax:
+AUOPT:
<option>,<val>
Command
AT+AUOPT=1,5
AT+AUOPT=2,720
AT+AUOPT=3,15
AT+AUOPT=1,0
AT+ AUOPT?
AT+AUOPT=?
Possible responses:
OK
Note : set the socket idle period to value to 5 (mins)
OK
Note : set the server idle period to value to 720 (mins)
OK
Note : set the socket connect period to value to 5 (minute)
OK
Note : set the socket idle period to value to 0 (disable)
+AUOPT : 1,5
+AUOPT : 2,15
+AUOPT : 3,750
OK
Note: display current status
+AUOPT : (1-3),(0-65535)
Note : possible argument
Defined Values:
<option>
1 socket idle period. (for client and server mode)
After AutoTCP/UDP socket is connected , if there is no data transport in both direction for the time longer than the
<val> (in minutes) of this <option> the socket will be disconnected. Please read notes below when using it with TCP
client mode.
2 server idle period. (for server mode only)
If the unit set as a server have stayed in listening mode for the time longer than the <val> (in minutes) of this <option>
the GPRS PDP context will be deactivated and then re-activated, and server listening modem will be resumed. This Is
to prevent GPRS network closing of GPRS becausee of zero data flow after some period.
3 socket connect period. (for server mode only)
If a AutoTCP/UDP socket stays connected for longer than the <val> (in minutes) of this <option> the socket will be
disconnected
<val>
Value of the corresponding option. Unit is in minute. Default value is 0 (connection control disabled). Valid range is 0 to
65535.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
20
Note :
-
When <option> #1 is enabled with client mode, the serial port of the modem will be changed into data mode without
waiting socket connection. And once data enter to serial port data will be buffered and then start connecting remote
TCP server. This option is good when remote TCP server is not good for keeping socket all the time.
-
New entered option values will become valid only after AutoTCP/UDP is disabled then re-enabled.
-
When socket for TCP Terminal is connected GPRS de-activation by <option>#2 timeout will be deferred.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
21
5. AT COMMAND DRIVEN TCP/UDP CONNECTION
This feature let user to make a TCP or UDP connection upon the AT+OTCP or AT+OUDP command.
This socket connection feature does support DLE/ETX character coding.
Make sure you have made the GPRS connection by AT+IPCONNECT command before making socket connection (see
Chapter 24, setup examples).
5.1. AT commands for Auto TCP/UDP connection
5.1.1. AT+DLEMODE command
When performing the AT command driven TCP or UDP socket connection, the attached host has the choice to code or
not the ETX character.
When DLEMODE is set to 0, no specific process is needed on ETX characters. It means that it is not possible for a host
to request a end of connection or to receive a clear indication of end of connection from the TCP/IP stack.
When DLEMODE is set to 1, the ETX character means a request or an indication of end of connection.
As a consequence, ETX characters that belongs to the payload data must be sent by the host on the serial port preceded
by a DLE
character. Similarly ETX characters received by the TCP/IP stack from the Internet are sent to the host through the serial
port preceded by a DLE character
“ETX” is character hex 03, “DLE” character is hex 10 (Dec 16)
Default value is 0.
Command Syntax
AT+DLEMODE=<mode>
Response syntax:
+DLEMODE: <mode>
Command
AT+ DLEMODE =0
AT+ DLEMODE =1
AT+ DLEMODE?
AT+ DLEMODE =?
Possible responses:
OK
Note : disable DLEMODE
OK
Note: Enable DLEMODE
+DLEMODE : 1
OK
Note: display current status
+DELMODE : (0-1)
Note : possible argument
Defined Values:
<mode>
1
enable DLEMODE
0
disable DLEMODE
Note :
-
DLEMODE is not available for Automatic TCP/UDP connection.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
22
5.1.2. AT+OTCP command
This command sent by the attached host to open a TCP connection to the TCP server specified by the AT+IPTCP
command. If socket connection is made successfully it will response CONNECT 115200 and the serial port will go to data
mode, all data entered to the serial port will be sent to remote TCP/UDP peer.
If socket connection is unsuccessful or socket is disconnected afterwards the modem will send out NO CARRIER
message and back to command mode.
Command Syntax
AT+OTCP
Response syntax:
CONNECT 115200
Command
AT+ OTCP
Possible responses:
CONNECT 115200
Note : TCP connection made successfully
+CME ERROR 3
Note: fail, either IPCONNECT is not ready or socket service
is used already
NO CARRIER
Note: possibly remote server no response
AT+ OTCP
AT+ OTCP
Note :
-
AT+OTCP connection is exclusive to other TCP feature. See Chapter (Q&A)
-
If TCP connection is unsuccessful or broken after connection the GPRS connection will also be disconnected.
(+IPCONNECT: 1,0). So please enter AT+IPCONNECT=1,1 to reconnect GPRS before entering AT+OTCP.
5.1.3. AT+OUDP command
This command sent by the attached host to open a UDP connection to the UDP server specified by the AT+IPUDP
command. If socket connection is made successfully it will response CONNECT 115200 and the serial port will go to data
mode, all data entered to the serial port will be sent to remote UDP peer.
If socket connection is unsuccessful or socket is disconnected afterwards the modem will send out NO CARRIER
message and back to command mode.
Command Syntax
AT+OTCP
Response syntax:
CONNECT 115200
Command
AT+ OUDP
AT+ OUDP
AT+ OUDP
Possible responses:
CONNECT 115200
Note : UDP connection made successfully
+CME ERROR 3
Note: fail, either IPCONNECT is not ready or socket service
is used already
NO CARRIER
Note: possibly remote server no response
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
23
Note :
-
AT+OUDP connection is exclusive to other TCP/UDP feature. See Chapter 23 (Q&A)
-
If UDP connection is unsuccessful or broken after connection the GPRS connection will also be disconnected.
(+IPCONNECT: 1,0). So please enter AT+IPCONNECT=1,1 to reconnect GPRS before entering AT+OUDP.
-
Due to the nature of UDP socket connection, sending ETX characters (when DLEMODE is 1)may not be able to
make disconnection.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
24
6. PING SERVICE
This feature is to make a ping (ICMP Echo Request) to a specified IP address and get back the echo result. Ping service
can also be called by IPCONNECT as a tool to check Internet connection. See AT+IPOPT command in Chapter 3 for
details.
6.1. AT command for setting up and execute ping
6.1.1. AT+IPPING command
Command Syntax
AT+IPPING
AT+IPPING= <mode>,<target>, <nb>, <delay>, <timeout>
Response syntax:
+IPPING : ,<address>, time=<echo time>
OK
Command
AT+ IPPING=2, ”210.103.11.18”,3,1,15
AT+ IPPING
AT+IPPING=?
AT+ IPPING?
Possible responses:
OK
Note : configure ping target (210.103.11.18), 3 ping trials total,
1 second between each trial, timeout limit 15 seconds
+IPPING : “210.103.11.18”, time=562ms
+IPPING : “210.103.11.18”, time=662ms
+IPPING : “210.103.11.18”, time=762ms
OK
Execute ping action (no argument)
+IPPING: (0-2),(15),(1-10),(1-10),(1-60)
+IPPING: ”210.103.11.18”, 3, 1, 15
OK
Note display current status
Defined Values:
<mode>
0,1
reserved
2
configure ping address and parameters below
<target>
URL or IP address (dot-decimal notation xxx.xxx.xxx.xxx) of the target to be pinged.
<nb>
Numbers of ping trials for each ping action. E.g. if the value is 3 will ping the target for 3 times.
Default value is 3. Valid range is 1 to 10.
(When used with IPCONNECT check the ping is assumed fail if all ping trails fail.)
<delay>
Time in second between each ping trial.
Default value is 3. Valid range is 1 to 10.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
25
<timeout>
Timeout value in second for ping request. Recommended to be more than 10.
Default value is 15. Valid range is 1 to 60.
Note :
-
Ping target must be in dot-decimal notation format, URL format is not supported.
-
Before making command driven ping action (AT+IPPING w/o argument) make sure GPRS is connected
(+IPCONNECT: 1,1) and ping target and parameters are set properly.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
26
7. DYNAMIC DNS
Note:
To use this feature, we strongly suggest to get special GPRS service from your network
operator :
a. Network will assign a true public IP address to M100 2G upon GPRS activations, and
b. that GPRS connection allows incoming access from public Internet to Maestro
This feature lets Maestro 100 2G to login to certain Dynamic DNS service providers, to update the hostname with M100
2G current IP address. So user can access M100 2G with pre-registered hostname. User can use this function together
with “TCP Terminal” (see Chapter 8 ) and can use Telnet to access M100 2G and send AT command over Internet.
Maestro Wireless Solution Ltd does not have affinity with any Dynamic DNS service providers. Maestro Wireless
Solution Ltd does not guarantee any service provided by DDNS service providers and not liable to any loss or
damage caused by such service.
7.1. Description of the Operation
Dynamic DNS service
mymodem.ddns.com
Dynamic IP:
200.123.111.21
mymodem.ddns.com
<-> 200.123.111.21
1. User need to create an account on DDNS service providers and register a hostname. Following providers are tested
working correctly:
www.dyndns.com
www.no-ip.com
2. Use AT+IPDDNSSERV command to enter DDNS update server URL and port no. Use AT+IPDDNSACCT to enter
own account login, password and hostname.
3. When IPCONNECT is ready, use AT+IPDDNSUPD command to update the above hostname with modem’s current IP
address.
4. User can also use AT+IPDDNSUPD command to configure automatic DDNS update upon each time of IPCONNECT
established.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
27
7.2. AT command for configuring Dynamic DNS
7.2.1. AT+IPDDNSSERV command
Command Syntax
AT+IPDDNSSERV= <serv_url>,<serv_port>
Response syntax:
+IPDDNSSERV: <serv_url>,<serv_port>
OK
Command
Possible responses:
AT+IPDDNSSERV=”members.dyndns.org”,8 OK
Note : enter DDNS service provider’s update server
0
information
AT+ IPDDNSSERV?
+IPDDNSSERV: ”members.dyndns.org”,80
OK
Note display current status
AT+ IPDDNSSERV =?
+ IPDDNSSERV: (64),(0-65535)
OK
Note : possible argument
Defined Values:
<serv_url>
URL of the update server. For example it is “members.dyndns.org” for www.dyndns.com. Check with your DDNS service
provider for correct name.
<serv_port>
Port number of the update server. For example it is 80 or 8080 for www.dyndns.com. Check with your DDNS service
provider for correct port number.
List of parameters of verified DDNS service providers:
Provider
www.dyndns.com
www.no-ip.com
<serv_url>
members.dyndns.org
dynupdate.no-ip.com
<serv_port>
80
80
7.2.2. AT+IPDDNSACCT command
Command Syntax
AT+IPDDNSACCT=<hostname>,<login>,<psswd>
Response syntax:
OK
Command
AT+IPDDNSACCT=”12345678.dyndns.org”, ”
maestro”, ”maestro”
AT+ IPDDNSACCT?
AT+ IPDDNSACCT=?
Possible responses:
OK
Note : enter DDNS account and host name info
+IPDDNSACCT: ”12345678.dyndns.org”, ”maestro”, ”maestro
”
OK
Note display current status
+ IPDDNSACCT: (64),(32),(32)
OK
Note : possible argument
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
28
Defined Values:
<hostname>
Hostname to be associated with M100’s IP address. Should register the hostname in your account and verified it on your
DDNS service provider. Maximum length is 64 characters.
<login>
Login name of the DDNS service account. Maximum length is 32 characters.
<psswd>
Login password of the DDNS service account. Maximum length is 32 characters.
7.2.3. AT+IPDDNSUPD command
Command Syntax
AT+IPDDNSUPD
AT+IPDDNSUPD = <auto_upd>
Response syntax:
OK
+IPDDNSUPD: <result>, <ret_code>
Command
AT+IPDDNSUPD=1
AT+IPDDNSUPD=0
AT+IPDDNSUPD
AT+IPDDNSUPD
AT+IPDDNSUPD?
AT+ IPDDNSUPD=?
Possible responses:
OK
Note : enable automatic DDNS update
OK
Note : disable automatic DDNS update
+IPDDNSUPD: 1, “good 203.111.111.111”
OK
Note : perform DDNS update, successful
+IPDDNSUPD: 3, “badauth”
OK
Note : perform DDNS update, unsuccessful
+IPDDNSUPD: 0, 3, “badauth”
OK
Note : display current setting :
automatic DDNS update disabled
result of last DDNS update since power up
+ IPDDNSUPD: (0-1)
OK
Note : possible argument
Defined Values:
<auto_upd>
0
disable automatic DDNS update
1
enable automatic DDNS update (see notes for details)
<result>
result of DDNS update process. it is related to the return code of DDNS update server. If <result> is 1 or 2 the update
is assumed successful
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
29
<ret_code>
return code of DDNS update server.
Following table list the relationship between <result> and <ret_code>
Result
Ret_code
1
2
good
no_chg
3
4
badauth donator
5
6
7
8
9
10
11
notfqdgn
Nohost
numhost
abuse
badagent
dnserr
911
Visit Website of DDNS service providers for the explanation of return code.
Note :
-
If the DDNS update process fails because of failure to get server response the <result> maybe a negative value,
contact Maestro to get details.
-
Before making command driven ping action (AT+IPPING w/o argument) make sure GPRS is connected
(+IPCONNECT: 1,1) and ping target and parameters are set properly.
-
If automatic DDNS update enabled, Smart Pack will detect GPRS connection and start DDNS update once
connection is established. If update is fail it will retry for 3 times maximium. User can enter AT+IPDDNSUPD?
to check the result of last update result.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
30
8. TCP TERMINAL
Note:
To use this feature, we strongly suggest to get special GPRS service from your network
operator :
a. Network will assign a true public IP address to M100 upon GPRS activations, and
b. that GPRS connection allows incoming access from public Internet to Maestro
This feature lets Maestro 100 2G can be connected through TCP channel, and AT commands can be sent over this
channel. User can use Telnet type terminal service to “login” to M100 2G and control it by sending AT commands through
the telnet.
8.1. Description of the Operation
Telnet Terminal
1. Uses AT+TCPTERM command to configure password port for the TCP terminal, and enable TCP terminal function.
2. After about 20 seconds M100 will connect to the Internet automatically. And then it will check the TCP port.
3. User from outside Internet can use Telnet application to connect the port of M100 TCP terminal. User need to know the
IP address of the M100. Or with the aid of Dynamic DNS (Chapter 7) user can use the hostname associated the M100
2G for connection.
4. Once connected user need to enter password. If password is correct user can send AT command to the M100 2G on
Telnet program.
8.2. AT command for TCP Terminal
8.2.1. AT+TCPTERM command
Command Syntax
AT+TCPTERM =<mode>[,<psswd>,<port>,<timeout>]
Response syntax:
OK
+TCPTERM =<stat>,<psswd>,<port>,<timeout>
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
31
Command
AT+TCPTERM =2,”123456”,23,30
AT+TCPTERM=1
AT+TCPTERM=0
AT+TCPTERM ?
AT+TCPTERM =?
Possible responses:
OK
Note : configure TCP Terminal, password: 123456, port: 23,
timeout:30(secs)
OK
Note: enable TCP terminal
OK
Note: disable TCP terminal
+TCPTERM: 1,”123456”,23,30
OK
Note display current status
+TCPTERM: (0-1),(16),(1-65535),(1-65535)
OK
Note : possible argument
Defined Values:
<mode>
0
disable TCP Terminal.
1
enable TCP Terminal. (See Note)
2
configure TCP Terminal parameters
<psswd>
Login password for TCP Terminal. When user opens the M100 TCP Terminal port it will prompt “password”. User need to
enter the password set with this parameter. User has 3 times of chance to enter correct password. If password is correct
user can enter AT command otherwise TCP connection will be closed.
It can be consisting 1 to 16 alphanumeric characters. Default is “000000” (6 zeros).
<port>
Port number of TCP Terminal. Please do not set to the same value of port number in +IPTCP and +IPUDP command.
Default is 23. Valid value is 1 to 65535.
<timeout>
Maximum time in second TCP terminal will wait for an entry after TCP terminal opened. If no data received in this period
the connection will be closed. Default is 30. Valid value is 1 to 65535.
Note :
-
If TCP terminal is enabled the M100 2G will connect to GPRS (+IPCONNECT=1,1) about 15 seconds after
power up.
-
Only one TCP terminal connection can be made at a time. Any further connection requested will be refused.
-
Not all AT commands could be executed. If un-allowed command is entered “command not allowed” message
will be returned.
-
Command echo feature is always enabled (except entering password).
-
Unsolicited codes like “RING”, “+CMTI”, etc will not be displayed on TCP terminal.
-
Never send ‘interactive’ AT command by SMS, e.g. AT+CMGS=…. This feature cannot return the prompt to the
sender for second input.
-
Always think twice before you send AT command. For example if you send AT+CPOF it will turn off the modem, and
you need to go to access the modem to reset it.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
32
9. EMAIL SENDING (SMTP) SERVICE
To use this feature, make sure there is a SMTP server which can serve you. The network
service provider may have her own dedicated SMTP server. For using other SMTP server,
please check if the service connection is possible or not.
This enables M100 to send an email via a SMTP server. This feature can save parameters like of SMTP sever name,
address of sender and recipient, email subject and email body (content). Then with AT command this function will
construct and email using the above stored Information. The above information will also be used by Command String
email sending service (Chapter 20.6).
9.1. Description of the Operation
1.
Enter the following information by AT commands (see following sections)
- SMTP server Information (address, port, login Info)
- Email addresses of sender; recipient (s)
- Email subject
- Email body (content)
Valid “minimal” emails contain sender address and one recipient address with no subject and no content (empty
email).
2.
Make IP connection (see Chapter 3.2.2).
3.
Use AT+EMSEND command to send out email.
4.
An email can contain
- maximum up to 1024(pre-stored)+128(command line additional) characters,
- three (sets of) recipient: "To","cc" and "bcc". Each set have 64 characters of email address(es)
- .Subject (title) up to 128 characters, from a choice 10 pre-store subject record.
9.2. AT command for email sending
9.2.1. AT+IPSMTP command
This command is to set SMTP server parameters
Command Syntax:
AT+IPSMTP= <port>,<auth >,<server>,<id>,<pwd>
Response syntax:
+IPSMTP= <port>,<auth >,<server>,<id>,<pwd>
OK
Command
Possible responses:
AT+IPSMTP=25,1,”smtp.network OK
.com”,”login”,”pssd”
Note : setup SMTP parameter (using authentication
with no encryption)
AT+IPSMTP=25,0,”smtp.network OK
.com”
Note : setup SMTP parameter (no authentication)
AT+IPSMTP?
+IPSMTP: 25,0,”smtp.network.com”
OK
Note : display current setting
AT+IPSMTP=?
+IPSMTP: (0-65535),(0-2),(120),(64),(64)
oK
Note : Possible arguements
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
33
Defined Values:
<port>
Port number of the SMTP server. Default value is 25.
<auth>
Authentication type used for authentication:
0
no authentication required (default)
1
authentication with no encryption
2
authentication used with encrypted username/password in MIME64 during AUTH LOGIN phase
<server>
IP address of SMTP server (in xxx.xxx.xxx.xxx format) or an alpha numeric string format (e.g. smtp.server.com)
Maximum 120 characters
Note: if alpha numeric string format is used, make sure the GPRS network has proper DNS service available.
<id>
login name of the user. Maximum 64 characters.
<pwd>
Password for the user. Maximum 64 characters.
9.2.2. AT+IPSMTP command
This command is to save, read and delete email addresses of sender, recipient, cc recipient and bcc recipient.
Command Syntax:
AT+EMADDR= <oper>,<id>,<address>
Response syntax:
+EMADDR : <oper><id>,<addr>
OK
Command
AT+ EMADDR=0,0,”a@abc.com”
AT+ EMADDR=0,1,”b@abc.com”
AT+ EMADDR=1,1
AT+ EMADDR=2,1
AT+ EMADDR=?
Possible responses:
OK
Note: store email address id 0 (sender address)
OK
Note: store email address id1
+EMADDR: 1, "b@abc.com"
Note: read stored address id 1
OK
Note: erase email address id1
+EMADDR: (0-2),(0-50), (64)
Note: possible argument
Defined Values:
<oper>
Type of operation:
0 store email address to flash
1 read email address from flash
2 erase email address from flash
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
34
<id>
Identification number (id) of the email address. Valid value is 0 to 50
0
id of the sender address (mandatory)
1-50 id of recipient email address
<addr>
Email address to be stored
9.2.3. AT+EMSUBJ command
This command is to save, read and delete email subject (title).
Command Syntax:
AT+EMSUBJ= <oper>,<id>,<subj>
Response syntax:
+EMSUBJ : <oper><id>,<subj>
OK
Command
AT+ EMSUBJ=0,1,”This is subj #1”
AT+ EMSUBJ=1,1
AT+ EMSUBJ=2,1
AT+ EMSUBJ=?
Possible responses:
OK
Note: store email subject #1
+EMSUBJ: 1, "This is subj #1"
Note: read stored email subject with <id>=1
OK
Note: erase email subject with <id>=1
+EMSUBJ: (0-2),(1-10), (128)
Note: possible argument
Defined Values:
<oper>
Type of operation:
0 store email subject to flash
1 read email subject from flash
2 erase email subject from flash
<id>
Identification number (id) of the email subject. Valid value is 1 to 10
<subj>
Email subject to be stored. Maximum 128 characters for each subject.
Note:

It is recommend using only alpha-numeric characters (ASCII value 32 to 127) for email subject content.
9.2.4. AT+EMBODY command
This command is to save, read and delete pre-stored email body (content). Up to 3 email bodies with 1024 characters
max can be stored.
The <id> field is the id number of the email body to be stored. To save email body, first enter AT+EMBODY=0,<id> then
<ENTER> and wait for "> " prompt.
Then simply type email body content, <ctrl-Z> (ASCII 26) to finish.
This command can be aborted using the <ESC> (ASCII 27) character when entering text.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
35
Command Syntax:
AT+EMBODY= <oper>,<id>
text is entered <ctrl-z / ESC>
Response syntax:
+EMBODY : <id>,<len>
Email body entered
OK
Command
AT+ EMBODY=0,1
Possible responses:
>
This is email body #1<ctrl-Z>
Note: enter email body with <id>=1
+EMBODY: 1,21
OK
Note: successful stored 21 characters as email body with
<id>=1
AT+ EMBODY=0,1
>
This is email <ESC>
Note: press <ESC> to abort email
body entry
AT+ EMBODY=1,1
AT+ EMBODY=2,1
AT+ EMBODY=?
OK
Note: abort to store email body with <id>=1
+EMBODY: 1
This is email body #1
OK
Note: read stored email body with <id>=1
OK
Note: erase email body with <id>=1
+EMBODY: (0-2),(1-3)
Note: possible argument
Defined Values:
<oper>
Type of operation:
0 store email body to flash
1 read email body from flash
2 erase email body from flash
<id>
Identification number (id) of the email body. Valid value is 1 to3
<len>
Length (number of characters) of the email body stored.
Note:

As a standard smtp type email, the body should contain alpha-numeric characters only.

Each email body can contain up to 1024 characters. If data entered is more than 1024 it will stop getting and saved.

On saving email body to a same <id> old body will be over written.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
36
9.2.5. AT+EMSEND command
This command is send an email with pre-saved email subject(using AT+EMSUBJ command); pre-saved email body
(content) (using AT+EMBODY command), plus an additional email body to pre-saved email address(es) (using
AT+EMADDR command). Maximum three (group of) reipent(s) can be sent for a single email:
-
standard recipient,
-
carbon copy (cc) recipient,
-
blind carbon copy (cc) recipient.
Command Syntax:
AT+EMSEND= <to_id>,<cc_id>,<bcc_id>,<subj_id>,<body_id>,<add_body>
Response syntax:
+EMSEND : <result>
OK
+CME EORROR 3
Command
AT+ EMSEND=1
AT+ EMSEND=0,0,2
AT+ EMSEND =1,2,3,1,1,”extra”
AT+ EMSEND=1,2,3,1,1,”extra”
AT+ EMSEND=1,2,3,1,1,”extra”
Possible responses:
+EMSEND: 0
OK
Note: minimum email (no subject and body)successfully
sent email to email address stored <id>=1
+EMSEND: 0
OK
Note: minimum email (no subject and body)successfully
sent email to email address stored <id>=1 as “bcc”
recipient
+ EMSEND: 0
OK
Note: email with subject stored with <id>=1; body stored
with <id>=1 and additional body “extra” is sent to:
Address with <id>=1 as recipient,
Address with <id>=2 as cc recipient,
Address with <id>=3 as bcc recipient
+CME ERROR:3
Note: email sending fail (possible reason : IP not
connected)
+EMSEND: 550
OK
email sending fail (smtp reply code: No such user here)
Defined Values:
<to_id>
Identification number (id) of the email address(es) that as a normal email recipient. Valid value is 0 to 50.('0' or missing
parameter means no recipient for this email).
<cc_id>
Identification number (id) of the email address(es) that as a "carbon copy" (cc) email recipient. Valid value is 0 to 50. ('0'
or missing parameter means no cc recipient for this email).
<cc_id>
Identification number (id) of the email address(es) that as a "blind carbon copy" (cc) email recipient. Valid value is 0 to 50.
('0' or missing parameter means no recipient for this email)
<subj_id>
Identification number (id) of the email subject. Valid value is 0 to 10. ('0'or missing parameter means no subject for this
email).
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
37
<body_id>
Identification number (id) of the email body (content). Valid value is 0 to 3. '0'or missing parameter means no saved body
will be used for this email.
<add_body>
Additional email body (content) to be sent. Maximum 128 characters can be sent. <add_body> will be added just after
body indicated by <body_id>(if available).
<id>
Identification number (id) of the email body. Valid value is 1 to 3
<result>
Result code of the email sending process:
Result
code
0
-1
-2
-3
-4
-5
-99
4xx – 5xx
explanation
Email sending successful
Reserved
Reserved
Smtp setup fail
Cannot resolve smtp server/
server not found
Connect smtp server timeout
Other error
SMTP protocol reply code
Comments / countermeasure
Contact Maestro Wireless
Contact Maestro Wireless
Check +IPSMTP parameters
Check +IPSMTP parameters
Retry later
Contact Maestro Wireless
Check SMTP document (RFC 821) for
explanation
Note:

As a standard SMTP type email, the body should contain alpha-numeric characters only.

A "minimum" email contains at least sender's email address and one recipient address. Subject and body can be left
empty.

On save email body to a same <id> old body will be over written

When one email is being sent you cannot send another email. To put a queue of emails please use Command String
"EM" (email sending) service.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
38
10. SOCKET COMMUNICATION SERVICE
Similar to email sending service, this feature lets M100 to send raw TCP message, up to 256 bytes, to a TCP server. This
is useful for M2M communication client to send data to server without any kind of protocol overhead. It can be also used
with Command String for sending status of plug-in board.
The socket communication service is one way only. Data sent in the direction from server to modem during connection is
discarded.
10.1.
1.
Description of the Operation
Enter the following information by AT commands (see following sections)
-
TCP server Information (address, port, retry Info
-
TCP message content
2.
Make IP connection (see Chapter 3.1.b).
3.
Use AT+SCSEND command to send out message.
4.
An message can contain maximum up to 128(pre-stored)+128(command line additional) characters
10.2.
AT command for socket communication
10.2.1. AT+SCHOST command
This command is to set TCP server parameters
Command Syntax:
AT+SCHOST= <oper>,<id>[,<address>,<portt>,<retry>,<delay>,<type>]
Response syntax:
+SCHOST= <id>,<address>,<portt>,<retry>,<delay>
OK
Command
Possible responses:
AT+SCHOST=0,1,”myhost.co OK
m”,23,2,10,0
Note : setup host “ myhost.com” with< id>=1,
<port>=23,<retry>=2 ,<delay>=10,<type>=0
AT+SCHOST=1,1
+SCHOST: 1,”myhost.com”,23,2,10,0
OK
Note : display host setting with <id>=1
AT+SCHOST=2,1
OK
Note : erase host setting with <id>=1
AT+SCHOST=?
+SCHOST:
(0-2),(1-10),(128),(1-65535),(0-10),(1-60),(0-1)
OK
Note : Possible arguements
Defined Values:
<oper>
Type of operation:
0 enter host settings
1 read host settings
2 erase entered host settings
<id>
Identification number of the host setting to be accessed. Valid value is 1 to 10
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
39
<server>
IP address of host (in xxx.xxx.xxx.xxx format) or an alpha numeric string format (e.g. myhost.com)
Maximum 120 characters
Note: if alpha numeric string format is used, make sure the GPRS network has proper DNS service available.
<port>
Port number of the host server. Valid range is 1 to 65535..
<retry>
Number of retry after the first connection unsuccessful. Each retry will be delayed according to <delay> parameter.
Default value is 0 (no retry). Valid range is 0 to 10.
<delay>
Time of delay before the next connection retry. Unit is in minute. Default value is 1. Valid range is 1 to 60.
<type>
Type of server connection:
0
TCP
1
UDP
10.2.2. AT+SCMESS command
This command is to save, read and delete socket communication message (content). Up to 3 messages with 1024
characters max can be stored.
The <id> field is the id number of the message to be stored. To save message body, first enter AT+SCMESS=0,<id>
then <ENTER> and wait for "> " prompt.
Then simply type content, <ctrl-Z> (ASCII 26) to finish.
This command can be aborted using the <ESC> (ASCII 27) character when entering text.
Command Syntax:
AT+SCMESS= <oper>,<id>,<mess>
text is entered <ctrl-z / ESC>
Response syntax:
+SCMESS: <id>
message entered
OK
Command
Possible responses:
AT+ SCMESS=0,1
>
This is message #1<ctrl-Z>
Note: enter message body with <id>=1
+SCMESS: 1,18
OK
Note: successful stored 18 characters as message with
<id>=1
AT+ SCMESS=0,1
>
This is email <ESC>
Note: press <ESC> to abort entry body
entry
OK
Note: abort to store message body with <id>=1
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
40
AT+ SCMESS=1,1
AT+ SCMESS=2,1
AT+ SCMESS=?
+SCMESS: 1
This is message body #1
OK
Note: read stored message with <id>=1
OK
Note: erase message body with <id>=1
+SCMESS: (0-2),(1-3)
Note: possible argument
Defined Values:
<oper>
Type of operation:
0 enter message body
1 read saved message
2 erase saved message
<id>
Identification number (id) of the message. Valid value is 1 to 3
Note:

Each message can contain up to 128 characters. If data entered is more than 128 it will stop getting and saved
automatically,

On entering message to a same <id> old message will be over written.
10.2.3. AT+SCSEND command
This command is send an message to a saved TCP host with or without one pre-saved message content, , plus additional
message entered on command line. A minimum 1 byte of message has to be sent otherwise will get error.
GPRS connection (+IPCONNECT=1,1) must to be made and host parameters have to be entered properly before
sending otherwise will return +CME ERROR: 3 . When finishing a result code will be returned. Result code "0" means
message transferred success, otherwise there is error. See following for more explanation.
Command Syntax:
AT+SCSEND= <to_id>,<mess_id>,<add_mess>
Response syntax:
+SCSEND : <result>
OK
+CME EORR 3
Command
AT+ SCSEND=1,0,”A”
AT+ SCSEND =1,1,”extra”
AT+ SCSEND =1,1,”extra”
Possible responses:
+SCSEND: 0
OK
Note: minimum message(1 character))successfully sent to
hostl address stored <id>=1
+ SCSEND: 0
OK
Note: message content saved with <id>=1; and additional
message “extra” is sent to: host <id>=1
+CME ERROR:3
Note: message sending fail (possible reason : IP not
connected)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
41
AT+ SCSEND=1,1,”extra”
AT+SCSEND=?
+EMSEND: -4
OK
Message sending fail (cannot find host)
+SCSEND: (1-10),(1-3)[,{128}]
Note: possible argument
Defined Values:
<to_id>
Identification number (id) host entered using AT+SCHOST command. Valid value is 1 to 50.
<mess_id>
Identification number (id) of the saved message. Valid value is 1 to 3..
<add_mess>
Additional message (content) to be sent. Maximum 128 characters can be sent. <add_body> will be added just after
message indicated by <mess_id>(if available).
<result>
Result code of the email sending process:
Result
code
0
-1
-2
-3
-4
-5
-99
explanation
Message sending successful
Reserved
Reserved
Host setup fail
Cannot resolve host server/
host not found
Connect host server timeout
Other error
Comments / countermeasure
Contact Maestro Wireless
Contact Maestro Wireless
Check +SCHOST parameters
Check +SCHOST parameters
Retry later
Contact Maestro Wireless
Note:

A "minimum" message should contain at least one byte(character) either from saved or additional message.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
42
11. REMOTE AT COMMAND BY SMS
This feature is to control the modem to interpret AT command from incoming SMS, executing it, and return the result to
sender by SMS.
The user can enable the modem to receive AT command by incoming SMS. See following about AT+SMSAT command.
11.1.
Description of the Operation
Step 1 : send AT command to
modem by SMS
000000AT+CSQ
Step 2 : modem execute and
return response by SMS
+CSQ: 17,0 OK
5. When enabled, the modem will treat the incoming SMS as a source of AT command only if all of the following
conditions (a,b and c) are fulfilled :
a. The content of SMS sent to the modem is using standard 7-bit GSM data decoding scheme,
b. The first 6 characters of the SMS content matches the <key> parameter set by AT+SMSAT command, (default key
is “000000”)
th
th
c. The 7 and 8 characters of the SMS content is “AT” (in capital letters)
6. If SMSAT is enabled , the modem will read each incoming SMS, if the conditions mentioned in 1 are matched the
message will be executed, even it is an invalid AT command
7. When using SMSAT feature, only +CNMI:x,1,x,x,x setting could be used (i.e. incoming message will be stored in SIM
card).
8. The maximum length of the AT command is limited by length of SMS, i.e. 160-6 = 154 characters
9. When the SMS AT command is executed , all intermediate and final responses will be buffered recorded, then return to
the sender’s phone number in one single SMS.
10.
If response(s) of the AT command is(are) more than 160 characters, only the first 160 characters will be returned.
11.
In case the modem cannot get terminal response within 26 seconds, the modem will then abort the command, and
return intermediate responses (if present).
8. If the SMSAT feature is enabled, all incoming SMS, either with valid AT command or not, will be erased. This is to
prevent SIM card memory from fully filled, such the modem will not receive new SMS.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
43
11.2.
AT command for configuring AT command by SMS
11.2.1. AT+SMSAT command
Command Syntax
AT+SMSAT=<mode>(,<key>)
Response syntax:
+SMSAT: <mode>,<key>
Command
AT+SMSAT=0
AT+SMSAT =1
AT+SMSAT?
AT+SMSAT=2,123456
AT+SMSAT =?
Possible responses:
OK
Note : disable remote AT command by SMS
OK
Enable remote AT command by SMS
+SMSAT : 1,000000
OK
Note display current status
OK
Note: set the <key> value
+SMSAT : (0-2),(6)
OK
Note : possible argument
Defined Values:
<mode>
0
disable remote AT command by SMS
1
enable remote AT command by SMS
2
change the value of the <key>
<key>
A 6-digit numeric character key from 000000 to 999999. Only incoming SMS with the first 6 characters matching with this
key will be treated as a valid source of remote AT command.
11.3.
Limitation and caution to be taken when using remote AT command
This feature will not ‘judge’ the result of executing the command, so care has to be taken not to enter improper command
that make the modem becoming out of control:
1.
Never send ‘interactive’ AT command by SMS, e.g. AT+CMGS=…. This feature cannot return the prompt to the
sender for second input
2. Always wait for the return SMS with AT responses before you send another SMS AT command.
3. It could be in some case (e.g. network failure) the modem cannot return response SMS. The modem will try sending
response SMS for three times max. If still not successful it will abort.
4. Always think twice before you send AT command by SMS. For example if you send AT+CPOF it will turn off the
modem, and you need to go to access the modem to reset it.
5. Some MSP AT commands can be sent over SMS. See Chapter 22.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
44
12. I/O TRIGGERED AT COMMAND
This feature makes use of the Maestro 100 Input/Output port as a sensor. If the signal to the port match the pre-defined
condition a stored AT command will be executed.
User can use AT+IOAT command to set the condition and store AT command to be executed.
12.1.
Description of the Operation
Wiring Diagram :
I/O port
1. When the I/O port is connected to battery –ve side,
Switch closed : logic level low
Switch opened : logic level high
2. The switch can be placed as a triggering device, e.g. to detect door opening.
3. According to the setting of AT+IOAT command, the stored AT command will be executed either I/O signal from high to
low, or from low to high :
When set as low-to-high triggering:
Start counting time when a
when period of high signal
low to high signal
reach the Threshold value
I/O port voltage
time = T
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
45
When set as high-to-low triggering :
I/O port voltage
time = T
Start counting time when a
when period of low signal
high to low signal
reach Threshold value the
* See AT+IOAT command on setting Threshold value T.
12.2.
AT command for configuring I/O triggered AT command
12.2.1. AT+IOAT command
Command Syntax
AT+IOAT=<action>(,<dir>,<Threshold>,<cmd> )
Response syntax:
+IOAT: <action>,<dir>,<Threshold>,<cmd>
Command
AT+IOAT=0
AT+IOAT =1
AT+ IOAT?
AT+IOAT=2,1,10,”AT+IPR=115200”
AT+ IOAT =?
Possible responses:
OK
Note : disable I/O triggered AT command execution
OK
Note: enable I/O triggered AT command execution
+IOAT : 1,1, 10,”AT+CMSS=5”
OK
Note display current status
OK
Note: set the parameters < dir>, <Threshold>, <cmd>
low-to-high triggering, Threshold=1000 ms
command is “AT+IPR=115200”
+IOAT : (0-2),(0-1),(1-50),(128)
OK
Note : possible argument
Defined Values:
<action>
0
disable I/O triggered AT command execution
1
enable I/O triggered AT command execution
2
configure I/O triggered AT command parameters
<dir>
1
configure as low-to-high triggering
0
configure as high-to-low triggering
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
46
<Threshold>
Time required for the detected state to trigger the AT command exestuation. Unit is in millisecond.
Valid value from 1 to 50 (0.1 sec to 5 sec). Refer to the above timing diagram in section 12.1
<cmd>
AT command to be executed when the I/O port is triggered successfully. The length of the command is limited to 128
characters. See section 11.3 for more details.
12.3.
Notes and cautions to be taken when using I/O triggered AT command
1. The I/O port is limited to drain current 10mA max. Never give too high input voltage to the I/O port or the modem will be
damaged.
2. Use only cable/metal contact designed for Molex MicroFit™ connector. Using incompatible connector will damage the
modem. Contact your dealer or Maestro Wireless Solutions if you need wire for the I/O port connection.
3. The modem will NOT check the command you entered to the <cmd> field. It will be executed even it is not a valid AT
command (or even not an AT command). Check by yourself when you enter the command.
4. When triggered, the command will be executed in ‘quiet’ mode, i.e. without any response like “OK” or “ERROR” will be
sent to external application.
5. Do not enter “interactive” AT command (e.g. AT+CMGS=…), otherwise when the command is executed, the modem
will in a state of waiting further input, not to do other jobs.
6. With this feature enabled user cannot control the I/O port by other AT commands anymore.
7. Due to product limitation the modem cannot detect switching action with period less than 100ms. If the switch’s
open/close action is done in less than 100ms this feature will not be able to detect accurately.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
47
13. AI TRIGGERED AT COMMAND
This feature makes use of the Maestro 100 2G analogue input (AI) port as a sensor. If the signal to the port match the
pre-defined condition a stored AT command will be executed.
User can use AT+ADCAT command to set the condition and store AT command to be executed, and using
AT+ADCATLMT command to set the upper and lower limit of the sensing value.
13.1.
Description of the Operation
AI port
1.
And external DC voltage can be connected to the AI port. The maximum voltage is 5V
2.
When ADCAT is enabled, the AI port will be checked every 0.1 second. Depending on setting, a saved AT command
will be executed if condition is fulfilled for the defined period.
3.
Two trigger directions can be chosen:
-
1: Low-to-High (exceed High Limit to trigger)
-
0: High-to-Low (below Low Limit to trigger)
AI value
T=TH  Trigger to execute
AT command if direction is
0
Time = T
Start to count threshold
time when crossing
High/Low Limit
T=TH  Trigger to execute
AT command if direction is
1
Time = T
* See AT+ADCAT command on setting Threshold value T.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
48
13.2.
AT commands for configuring AI triggered AT command
13.2.1. AT+ADCAT command
This command is to enable/disable and configure AI triggered AT command function.
Command Syntax
AT+ADCAT=<action>(,<dir>,<Threshold>,<cmd> )
Response syntax:
+ADCAT: <action>,<dir>,<Threshold>,<cmd>
Command
AT+ADCAT=0
AT+ADCAT =1
AT+ ADCAT?
AT+ADCAT=2,1,10,”AT+IPR=115200”
AT+ ADCAT =?
Possible responses:
OK
Note : disable AI triggered AT command execution
OK
Note: enable I/O triggered AT command execution
+IOAT : 1,1, 10,”AT+CMSS=5”
OK
Note display current status
OK
Note: set the parameters < dir>, <Threshold>, <cmd>
low-to-high triggering, Threshold=1000 ms
command is “AT+IPR=115200”
+IOAT : (0-2),(0-1),(1-50),(128)
OK
Note : possible argument
Defined Values:
<action>
0
disable AI triggered AT command execution
1
enable AI triggered AT command execution
2
configure AI triggered AT command parameters
<dir>
1
configure as low-to-high triggering
0
configure as high-to-low triggering
<Threshold>
Time required for the detected state to trigger the AT command execution. Unit is in millisecond.
Valid value from 1 to 50 (0.1 sec to 5 sec). Refer to the above timing diagram in section 12.1
<cmd>
AT command to be executed when the AI port is triggered successfully. The length of the command is limited to 128
characters.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
49
13.2.2. AT+ADCATLMT command
This command is to set high and low limit of AI triggered AT command. Please note these two values will be
“synchronized” with the HL and LL or the AI Command String service (see Chapter 12.7). So changing the values by this
command will also change the corresponding Command String values at the same time.
Command Syntax
AT+IOAT= (<LLimit>,<HLimit>)
Response syntax:
+SMSAT: <action>,<dir>,<Threshold>,<cmd>
Command
AT+ADCATLMT=0,1000
AT+ ADCATLMT?
AT+ ADCATLMT=?
Possible responses:
OK
Note : AI low limit to 0, high limit to 1000
+ADCAT:0,1000
OK
Note display current status
+ADCATLMT : (0-5000),(0-5000)
OK
Note : possible argument
Defined Values:
<LLimit>
Low limit of AI voltage, unit is mV
Valid range is 0 to 5000, default value is 1000.
<HLimit>
High limit of AI voltage, unit is mV
Valid range is 0 to 5000, default value is 2500.
13.3.
Notes and cautions to be taken when using AI triggered AT command
1
Never connect AI with voltage over the limit (5V). Input over voltage may damage the modem permanently.
2
Use only cable/metal contact designed for Molex MicroFit™ connector. Using incompatible connector will damage
the modem. Contact your dealer or Maestro Wireless Solutions if you need wire for the AI port connection.
3
The modem will NOT check the command you entered to the <cmd> field. It will be executed even it is not a valid AT
command (or even not an AT command). Check by yourself when you enter the command.
4
When triggered, the command will be executed in ‘quiet’ mode, i.e. without any response like “OK” or “ERROR” will
be sent to external application.
5
Do not enter “interactive” AT command (e.g. AT+CMGS=…), otherwise when the command is executed, the modem
will in a state of waiting further input, not to do other job.
6
Due to product limitation the modem cannot detect voltage change within period less than 100ms. If the voltage
change crossing high/low limit is done in less than 100ms this feature will not be able to detect accurately.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
50
14
CALL SCREENING
This feature enable Maestro 100 2G to reject incoming call if the phone number does not match one of the entries of
authorized phone number list. Unauthorized incoming call will be hanged up within one ring.
Up to 10 authorized phone numbers can be stored. Each number can be as long as characters
Waiting call can also be rejected.
14.1 AT command for configuring call screening
14.1.1
AT+CSRN command
This command is to enable or disable call screening feature.
Command Syntax:
AT+CSRN=<mode>
Response syntax:
+CSRN: <mode>
Command
AT+CSRN=0
Possible responses:
OK
Note : disable call screening
OK
Enable call screening
+CSRN : 1
Note display current status
+CSRN: (0-1)
Note : possible argument
AT+CSRN=1
AT+CSRN?
AT+CSRN=?
Defined Values :
<mode>
0
disable call screening
1
enable call screening
Note :
-
To use call screening make sure Caller ID service is enabled otherwise all incoming call will be rejected.
-
To apply call screening to waiting call please first enable Call waiting indication by command AT=CCWA=1,1
-
Rejected incoming will not be diverted to voice mail.
14.1.2
AT+CSNW command
This command is to enter authorized phone number.
Command Syntax:
AT+CSNW=<id>,<num>
Response syntax:
OK
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
51
Command
AT+CSNW=1,”12345678”
AT+CSNW=11,”12345678”
AT+CSNW=3,”1qaaa”
AT+CSNW=?
Possible responses:
OK
Note : enter authorized number to location 1
+CME ERROR: 3
Note : location out of range
+CME ERROR: 3
Note : non-numeric characters not allowed
+CSNW: (1-10),(20)
Note : possible argument
Defined Values :
<id>
Location of the authorized phone number to be stored. Valid range is from 1 to 10
<num>
Authorized phone number. First digit can be “+”, others must be numeric digits. Maximum length is 20
Note :
-
Enter phone number exactly same as the incoming one, especially if entering International phone number. Use
AT+CLIP command to check incoming call number first.
-
Enter empty phone number in the <num> field will erase the record of that location.
14.1.3
AT+CSNR command
This command is to read authorized phone number entered.
Command Syntax:
AT+CSNR=<id1>(,<id2>)
Response syntax:
+CSNR: <id>,<num>….
Command
AT+CSNR=1
AT+CSNR=1,8
Possible responses:
+CSNR: 1, “12345678”
OK
Note : display authorized number in location 1
+CSNR: 1, “12345678”
+CSNR: 3, “123456”
+CSNR: 6, “12345678”
+CSNR: 8, “12345678”
OK
Note : display authorized number in from location 1 to 8
+CSNR=(1-10),(1-10)
OK
Note: possible argument
AT+CSNR=?
Defined Values :
<id1>
Beginning location of the authorized phone number to be read. Valid range is from 1 to 10.
<id2>
Ending location of the authorized phone number to be read. Valid range is from 1 to 10.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
52
14.1.4
AT+CSND command
This command is to erase authorized phone number entered.
Command Syntax:
AT+CSND=<id1>(,<id2>)
Response syntax:
+CSNR: <id>,<num>….
Command
AT+CSND=1
AT+CSNR=1,8
AT+CSND=?
Possible responses:
OK
Note : erase authorized number in location 1
OK
Note : erase authorized number in from location 1 to 8
+CSND=(1-10),(1-10)
OK
Note: possible argument
Defined Values :
<id1>
Beginning location of the authorized phone number to be erased. Valid range is from 1 to 10.
<id2>
Ending location of the authorized phone number to be erased. Valid range is from 1 to 10.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
53
15
MODEM STATUS CHECK AND MONITORING
The Modem Status Check and Monitoring feature makes the modem can check the status of the modem in either “one
shot” or periodic (per minute) mode. Modem will also report check result by SMS if result is beyond preset limit, and reset
automatically if losing network connection.
Following items will be checked:
-
network registration (periodic mode only, triggering reset)
-
rom test
-
signal strength (can trigger reporting)
-
IP address of modem (only when GPRS connection activated)
-
module battery voltage (can trigger reporting)
15.1 AT command for Modem Status Check and Monitoring
15.1.1
AT+TMODE command
This command is to perform and setup modem status check and monitoring feature
Command Syntax:
AT+TMODE (=<mode>(,<para>))
Response syntax:
+TMODE: <test1>,<test2>….
Command
AT+TMODE
AT+TMODE=?
AT+TMODE?
AT+TMODE=0
AT+TMODE=1
AT+TMODE=2,”1234567”
AT+TMODE=3,10
AT+TMODE=4,3450
Possible responses:
+TMODE: 1, 15, “10.111.222.33”, 3814
OK
Note : execute status check (“one shot” mode)
+TMODE: (0-4), (15)
Note : possible argument
+TMODE: 1, 1234567, 10, 3500
OK
Note: display current setting
OK
Note: disable periodic mode check
OK
Note: enable periodic mode check
OK
Note: set telephone number for periodic mode reporting
OK
Note: set network signal trigger level for remote reporting
OK
Note: set input voltage trigger level for remote reporting
Defined Values :
<mode>
0
disable periodic mode check
1
enable periodic mode check
2
to set the number in <para> field as telephone number for periodic mode check reporting. See section 15.1.2for
details
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
54
3
to set the number in <para> field as network signal trigger level for periodic mode check reporting. See section
9.1.2 for details
4
to set the number in <para> field as input voltage trigger level for periodic mode check reporting. See section 9.1.2
for details
15.1.2
Operation of Modem Status Check and Monitoring
“One Shot” mode:
When user enter AT+TMODE command the modem will perform a single check and will send back the result like
this:
+TMODE: 1, 15, “10.111.222.33”, 3814
OK
Meaning of parameters
Check item
Rom data checksum
Result
field #
1
Result
network signal
strength
modem IP address
2
0 fail
1 pass
range from 1-32 (or 99)
3
In xxx.xxx.xxx.xxx format
Input voltage
4
Voltage to the modem’s internal
module (times 1000)
Remark
same as AT+CSQ
Only shown when GPRS
session is activated
See * below
* Note. For Maestro modem user :
This is NOT the input voltage of the external power supply for the mode, it is an internal input voltage inside
modem circuit. Since there is voltage regulation inside, modem user should not change this trigger value
“Periodic” mode:
When user enter AT+TMODE=1 command the modem will perform periodic check every one minute :
-
firstly it will check if the modem is registered to the network; if the modem is not registered to the network it will
increase a counter by one. If the counter reach 5 (i.e. not registered for consecutive 5 minutes) the modem will reset
-
if the modem is registered to the network the counter will be reset to 0 and perform check same as “one shot” mode
-
if the result of the network signal strength is lower than the setting of AT+TMODE=3,x the test result will be sent over
SMS to the telephone number set by AT+TMODE=2,xxxxxxx (max number of digit is 20)
-
if the result of the input voltage is lower than the setting of AT+TMODE=4,x the test result will be sent over SMS to
the telephone number set by AT+TMODE=2,xxxxxxx
-
if 3 consecutive check fails (i.e. 3 SMS sent) then the periodic mode check will be disabled automatically.
-
network signal trigger level range is from 1-31
-
input voltage trigger level is from 3500 to 4100
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
55
16
AUTOMATIC PIN ENTRY
The Automatic Pin entry feature lets user to save a PIN code into M100 2G. When M100 2G detects a PIN (PIN1) enabled
SIM on starting it will use this saved PIN code to unlock the SIM. To prevent further PIN blocking user can set minimum
PIN Remaining Attempt Number as a prerequisite for the automatic PIN entry operation.
16.1 AT command for Automatic PIN Entry
16.1.1
AT+AUTOPIN command
This command is to configure and enable/disable Automatic PIN Entry feature.
Command Syntax:
AT+AUTOPIN=<mode> [,<pin>,<remain>,<unso>))
Response syntax:
OK
Command
AT+AUTOPIN=1
AT+AUTOPIN=0
AT+AUTOPIN?
AT+AUTOPIN=?
AT+AUTOPIN=2,”8888”,3,0
AT+AUTOPIN=1
AT+AUTOPIN=2,,2,1
AT+CFUN=1
+AUTOPINE: 1
Possible responses:
OK
Note : enable Automatic PIN Entry
OK
Note : disable Automatic PIN Entry
+AUTOPIN: 1, “1234”, 3, 0
OK
Note: display current setting
+AUTOPIN: (0-2),(4),(1-3),(0-1)
Note: possible arguments
OK
Note: set saved PIN as “8888”, PIN Remaining
Attempt Number as 3, disable unsolicited message
OK
OK
Note: enable Automatic PIN Entry and unsolicited
message and set PIN Remaining Attempt Number
to 2
OK
Note: after reset PIN Remaining Attempt Number is
1, Automatic PIN Entry aborted and display
unsolicted message
Defined Values :
<mode>
0
disable Automatic PIN Entry (default value)
1
enable Automatic PIN Entry
2
configure parameters
<pin>
Four digit PIN code for Automatic PIN Entry, default value is "0000"
<remain>
Minimum value of PIN Remaining Attempt Number. If PIN Remaining Attempt Number is less than the value of <remain>,
Automatic PIN Entry will not operate.
Valid value is 1 to 3. Default value is 3.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
56
<unso>
0
no unsolicited message (default)
1
unsolicited message +AUTOPINE: <pin_remain> will be displayed if <remain> is larger
than PIN Remaining
Attempt Number.
Note:

Be VERY careful on using this feature as normally a SIM card have 3 times of PIN entry attempts. Further Incorrect
attempt will lead to the card become SIM blocked and need PUK to unblock the cad.

This feature is only for SIM card that is PIN1 enabled. It will not work for PIN2 or PUK locked SIM card.

The Automatic PIN Entry operation will be performed only after power up or restart. Enabling AUTOPIN after power
up will not make it operate immediately.

The AT+AUTOPIN command cannot be entered remotely (SMS, TCP Terminal). I can only be entered via local
physical port.

The AT+AUTOPIN command is not password protected. Be cautious of saved PIN entry read by other people.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
57
17
REMOTE PROGRAM UPDATE
By using this feature, user can download the new version of Maestro Power Pack program from a FTP server and
upgrade the program. By combining Remote AT command by SMS feature user can control the Maestro to complete the
program downloading and updating process remotely.
GPRS
download file
from FTP server
AT commands to start download and update
FTP server
AT+IPFTP=21,”A’,”I”,”123.456.789”,”id”,”pwd”
AT+FTPDOTA=”new_prog.dwl”,1
To perform the whole program update process, several AT commands (steps) have to be sent:
1.
AT+IPGPRS to set network parameters (APN)
2.
AT+IPFTP to set FTP server parameters (name, user id, password)
3.
AT+FTPDOTA to set filename and FTP path and start downloading (*)
4.
AT+ADINSTALL to install the downloaded new program
(*)
(*) Note: by adding one extra parameter after step 3 complete, step 4 will be executed automatically. See following
sections for details
17.1 AT command for Remote program update
17.1.1
AT+IPFTP command
This command is to set FTP server parameters
Command Syntax:
AT+IPFTP =<port>,<type>,<mode>,<server>,<id>,<pwd>
Response syntax:
OK
Command
AT+IPFTP= 21,”I”,”A”,”201.123.222.222”,
”userid”,”pssd”
AT+IPFTP=?
AT+IPFTP?
Possible responses:
OK
Note : setup FTP parameter
+IPFTP: (0-65535), (“A”,”I”,”E”),(“P”,”A”),(120),(64),(64)
Note : possible argument
+IPFTP: 21,”I”,”A”,”201.222.222.222”,”userid”,”pssd”
OK
Note: display current setting
Defined Values :
<port>
Port number of the FTP server. Default value is 21
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
58
<type>
Translation of carriage return, valid values are:
I
image (no translation, default),
A
ASCII
E
EBCDIC
<mode>
Passive or Active mode valid values are:
P
passive (default),
A
active
<server>
IP address of FTP server (in xxx.xxx.xxx.xxx format) or an alpha numeric string format (e.g. ftp.server.com)
Maximum 120 characters.
Note : if alpha numeric string format is used, make sure the GPRS network has proper DNS service available.
<id>
login name of the user. Maximum 64 characters,
<pwd>
password for the user. Maximum 64 characters,
17.1.2
AT+FTPDOTA command
This command is to inform the modem the filename and FTP path. The modem will login to the FTP server; download the
update file, and optionally execute the update process.
Command Syntax:
AT+FTPDOTA =<filename>[,<path>],[,<update>]
Response syntax:
+FTPDOTA : 0, <filename>, <filesize>
+FTPDOTA : <result>
+ADINSTALL : <adinstall result>
Command
AT+FTPDOTA=”update.dwl”
AT+FTPDOTA=”update1.dwl,”sub”
AT+FTPDOTA=”update1.dwl,”sub”,1
AT+FTPDOTA?
AT+FTPDOTA?
Possible responses:
+FTPDOTA: 0, update.dwl, 17000
OK
Note : download “update.dwl” file from FTP root
directory, file size is 17000 bytes
+FTPDOTA: 0, update.dwl, 17001
OK
Note : download “update1.dwl” file from FTP “sub”
directory, file size is 17001 bytes
+ADINSTALL: 2
M100_VAF_094d_OAT316_32 Nov 11 200718:01:42
Note : download “update1.dwl” file from FTP “sub”
directory, and perform program update successfully
+FTPDOTA: update.dwl, 17001
OK
Note : check downloaded file ready for update
+FTPDOTA:
OK
Note : no downloaded file
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
59
AT+FTPDOTA=”update1.dwl”
AT+FTPDOTA=?
+FTPDOTA: -3
OK
Note : error on downloading file (FTP open fail)
+FTPDOTA: (128)[,(128)]
Note : possible argument
Defined Values :
<filename>
File name of the file to be downloaded. Maximum 128 characters.
<path>
Path (directory) name where the file is placed. Maximum 128 characters. If <path> is omitted, program will try to
download from FTP’s root (entry) directory. Maximum 128 characters.
<update>
If a third parameter ‘1’ is entered, the program will execute the AT+ADINSTALL command if the download process is
successful. This is useful for sending update commands over SMS, so that one SMS is saved in this case. See next
section for the details of AT+ADINSTALL command.
<result>
Result code of the downloading process
Result code
0
-1
-2
-3
-4
-5
-6
-7
-8
4xx – 5xx
explanation
Download successful
SIM card problem
Internal memory problem
FTP connection fail
Comments / countermeasure
A&D Format error
Download file size not same as FTP reported
Not enough space for downloading
File format incorrect
Error writing flash
FTP protocol return code
17.1.3
Check SIM card and PIN
Try reset modem
Check network signal, check FTP status, check
FTP address
Contact Maestro Wireless
Retry downloading
Contact Maestro Wireless
Check file for downloading
Contact Maestro Wireless
Check FTP document (RFC 959) for explanation
AT+ADINSTALL command
This command is perform the program update process. File downloaded by AT+FTPDOTA command will replace the
existing Maestro Smart Pack program. Modem will restart and then restart result and version will be displayed.
Command Syntax:
AT+ADINSTALL
Response syntax:
+ADINSTALL: <result>, <ver>
Command
AT+ADINSTALL
AT+ADINSTALL
AT+ADINSTALL
Possible responses:
+ADINSTALL: 2
M100_VAF_094d_OAT316_32 Nov 11 200718:01:42
Note : update successful, show existing version of
Maestro Smart Pack
+ADINSTALL: 3
M100_VAF_094b_OAT314_32 Jun 11 200718:01:42
Note : update unsuccessful, show existing version of
Maestro Smart Pack
+CEE ERROR: 3
Note : update unsuccessful, no update file available
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
60
Defined Values:
<result>
2
update process successful
3
update process unsuccessful (original program will be loaded)
Note: for other result code please contact Maestro Wireless Solutions
<ver>
Version number of existing running Maestro Smart Pack program.
17.2 Notes and cautions to be taken on using remote program update
1. This feature is ONLY for updating new Maestro Smart Pack program. Do not use it for downloading other
things. Always contact Maestro Wireless or distributor for correct update file and information.
2. If you want to perform update for modem at remote site by AT command over SMS, make sure the feature is
enabled by command AT+SMSAT=1 is entered.
3. Make sure you have setup GPRS settings by AT+IPGPRS command. When entering AT+FTPDOTA command the
program will make GPRS connection automatically if not connected before.
4. It is recommended to stop other Maestro Smart Pack’s features such as AutoTCP/UDP connection during program
downloading and updating.
5. Depending on the file size and network condition the download time could be a few minutes up to 3o minutes. Be
patient to wait for response after entering AT+FTPDOTA command.
6. Do not use “~” character on filepath because it cannot be transferred correctly over SMS.
7. No resume function on FTP downloading. The whole file has to be downloaded at one time otherwise the
downloaded data will be discarded
8. If you perform update by entering AT+FTPDOTA command over TCP Terminal (see Chapter 9), make usre you
have set <timeout> value of +TCPTERM command to a large value e.g. >50000, to avoid TCP Terminal closed
during downloading process.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
61
18
COMMAND STRING - INTRODUCTION
“Command String” is a set of programmable scripts originally for Maestro Heritage modem. And now it is incorporated to
M100 2G. User can input sets of Command Strings to control various kinds of “Service”. Unlike AT command, Command
strings can be stored inside M100 2G and can be executed upon output of certain services.
18.1 Command String and “Service” Concept
Command String
Input port
Command String
Alarm
Command String
Counter
Command String
“Trigger capable”
Services
Stored in flash
SMS
Email sending
Power Ctrl
Non “Trigger
capable” Services
“Command String” and “Service” operation mechanism
1. Use AT command to enter preset Command Strings
2. Command strings can be executed upon power up or directly by AT
commands
3. Executed Command Strings will drive some Services to be done (e.g.
sending SMS or setting output pins)
4. Executed Command Strings can also configure and control some
Services that have “trigger” capability.
5. These Services, when a certain pre-defined condition is matched (e.g.
timer reach zero) can “trigger” a stored Command String.
6. Execute stored Command String to control Services again
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
62
19
COMMAND STRING – WRITING AND USING
19.1 Structure of Command String
A single Command String is a text string composed with four fields, for example:
TM 1 ST 100
Operation argument
Service type
Service id
Operation type
19.1.1
Service type
This field has two capital characters indicates the type of Service to be chosen:
Field
entry
AL
CT
Service
alarm
Counter
See
Chapter
20.1
20.2
19.1.2
TM
IP (*)
Countdown
input ports
timer
20.3
20.4
SM
SMS
20.5
EM
AI(*)
SC
Email
Analogue
input
20.7
Socket
Comm
20.8
20.6
Service Id
Each type of Service there has more than one unit; e.g. there are 5 counters available so the id range is 1 to 5.
19.1.3
Operation type and Operation argument
For each type of Service there are few kinds of operations; e.g. “TM 1 ST 100” means to set the value or countdown timer
#1 to 100 seconds. See further chapters for the explanation of each service.
19.2 Concatenating Command String
You can concatenate Command Strings update 128 bytes long totally (including space). They will be executed
sequentially. However, if one Command String is incorrect or invalid execution will be stopped and successive Command
Stings will not be executed.
For example:
TM 1 ST 100 TM 1 TR 99 TM 1 SW 1
•
First String “TM 1 ST 100” will be executed
•
Second String “TM 1 TR 99” will not be executed because “99” is out of range
•
Third String “TM 1 SW 1” is correct but will not be executed because execution is stopped on 2nd String
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
63
19.3 Entering and executing Command String
You can use the following AT commands to store and execute Command String
19.3.1
AT+CSTR command
Description:
This command is used to execute a Command String directly.
Command Syntax:
AT+CSTR= <string>
Response Syntax:
OK
+CME ERROR : 3
Command
AT+ CSTR=”TM 1 ST 3”
AT+ CSTR=”TM 1 ST 3 TM 30 ST 4”
Possible responses:
OK
Note: entire Command String
executed successfully
+CME ERROR: 3
Note: one Command String cannot be
executed
Defined Values:
<string>
Command String
Note: When there is error in between concatenated Command String +CME ERROR: 3 will be returned. See 19.2
19.3.2
AT+CSTRSET command
Description:
This command is used to store, read and delete Command String. It can also used to execute stored Command String.
Command Syntax:
AT+CSTRSET= <oper>,<id>[,<string>]
Response Syntax:
OK
+CME ERROR: 3
Command
AT+ CSTRSET=0,1,”TM 1 ST 3”
AT+ CSTRSET=0,99,”TM 1 ST 3”
AT+CSTRSET=1,1
AT+CSTRSET=3,1
AT+CSTRSET=2,1
AT+CSTRSET=3,1
Possible responses:
OK
Note: store Command String with String id = 1
+CME ERROR: 3
Note: id out of range
+CSTRSET : 1, “TM1 ST 3”
Note: read stored Command String id 1
OK
Note: execute stored Command String id 1
OK
Note: erase Command String id 1 from flash
memory
+CME ERROR: 3
Note: id 1 is empty
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
64
Defined Values:
<oper>
Define type of operation:
0 store Command String to flash
1 read Command String from flash
2 erase Command String from flash
3 execute Command String stored in flash
<id>
Identification number (id) of the Command String. Valid value is 1 to 50, and 80; i.e.

up to 51 Command Strings can be stored.

Command String with id = 80 will be executed when modem power up
<string>
Command String
Note:

Each Command String is limited to 128 bytes.

The program will NOT check if the input Command String is valid or not.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
65
20
COMMAND STRING – SERVICES
“Service” is a kind function or tool that can be made use by Command String. There are two kinds of Services:

Trigger capable
When a certain pre-defined condition is matched (e.g. timer reach zero) “trigger” a stored Command String.
These Services include: Alarm, Counter, Input Port, and Countdown Timer

Non-Trigger capable
Can only perform job when called by Command String.
These Services include: SMS
20.1 Alarm Service
Alarm is used to execute a Command String when the real-time clock of the M100 2G meets the set time of the Alarm.
To use Alarm it is required to set the real-time clock of the modem properly, see AT+CCLK in AT command manual.
There are total of 5 Alarms can be used.
20.1.1
st
1 field
Service
type
AL
nd
Alarm Service Command String Syntax and explanation
2 field
Service
id
(1 to 5)
rd
th
3 field
Operation
type
ST
4 field
Operation argument
Explanation
09/10/10,12:00:00
ST
TR
0
(1 to 50)
0
Set alarm date/time
yy/mm/dd,hh:mm:ss format
Cancel preset
Set Command String to be run,
0 to cancel setting
Example: Set alarm #1 to execute Command String #20 at 01OCT2008, 01:00:00
AL 1 TR 1 AL 1 ST 08/10/01,01:00:00
Example: Cancel #1 Alarm setting
AL 1 ST 0
Example: Cancel #1 Alarm executing Command String
AL 1 TR 0
Note:

The Alarm date time input MUST to fulfill the following requirements:
1. In yy/mm/dd,hh:mm:ss format, program will also check if input date/time is valid or not
2. At least 4 minutes later than current modem’s real-time clock time (check by AT+CCLK command)

Do not concatenate after ST operation; set time operation should be at the last part of Command String

After alarm time, the ST setting of that Alarm will be lost

This service will make use of M100 2G internal alarm command (AT+CALA) so please avoid using AT+CALA
command by yourself when Alarm Service is used.

If the modem is restarted, date time setting of each Alarm will be checked against real-time clock time. If time is
passed the setting will be cancelled.

Alarm Service is “one-shot” type. There is no periodic alarm like “daily” or “weekly”
20.1.2
Reading Alarm Service Status
See Chapter 21for details.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
66
20.2 Counter Service
Counter is used to execute a Command String when the Counter value equals a preset value. There are total of 5
Counters.
20.2.1
st
1 field
Service
type
CT
Counter Service Command String Syntax and explanation
nd
2 field
Service id
(1 to 5)
rd
th
3 field
Operation
type
DE
4 field
Operation
argument
1 TO 255
IN
1 TO 255
RS
ST
0
-32768 to
32767
TR
(1 to 50)
0
Explanation
Decrement the value of Counter with
argument value
Increment the value of Counter with
argument value
Reset the Counter value to zero
Set the “trigger” value
If Counter value equal this value, will
execute Command String
Set Command String to be run, 0 to
cancel setting
Example: Set Counter #1 to execute Command String #10 if Counter value equal 100
CT 1 ST 100 CT 1 TR 10
Example: Increase Counter #1 value by 20
CT 1 IN 20
Example: Reset Counter #1 value to 0
CT 1 RS 0
Note:

Initial Counter and trigger values are zero.

The Counter is recorded by a signed 16 bit register, if the Counter value is 32767 and you increase it by 1, the value
will change to -32768

There is no limit on no. of times of triggering. E.g. If you first set trigger value to 2 and reset Counter to 0, then you
increment counter by 2, then decrement by 2 and increment by 2 again. Then the associated Command String will be
executed twice.
20.2.2
Reading Counter Service Status
See Chapter for details.
20.3 Countdown Timer Service
Countdown Timer is used execute a Command String when the Timer value reach zero. Counting period is 1 second.
There are total of 10 Countdown Timers.
20.3.1
st
1 field
Service
type
TM
Countdown Timer Service Command String Syntax and explanation
nd
2 field
Service id
(1 to 10)
rd
3 field
Operation
type
ST
SW
TR
th
4 field
Operation
argument
1 TO
2147483647
0 TO 1
(1 to 50)
0
Explanation
Initial value of Countdown Timer (in
seconds)
Start (1) or Stop (0) Timer
Set Command String to be run, 0 to
cancel setting
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
67
Example: Set Countdown Timer #1 to execute Command String #10 and start 600 seconds countdown
TM 1 ST 600 TM 1 SW 1 TM 1 TR 10
Example: Stop Countdown Timer #1
TM 1 SW 0
Example: Cancel Countdown Timer #1 to trigger Command String
TM 1 TR 0
Note:


When the Countdown Timer expires (reach 0) it will stop automatically (SW 0).
If two or more Timers expire at the same timer, Timer with smaller id has higher priority, i.e. Command String related
to that Timer will be executed first.

These are not precision Timers, if the Modem is busy (e.g. with network communication). The execution time may
be delayed.
20.3.2
Reading Countdown Timer status
See Chapter 20 for details.
20.4 Input Port Service
Input Port Service can use the signal of Input port to control the execution of Command String. Please refer Chapter 13.1
for locating and connecting input port.
20.4.1
st
1 field
Service
type
IP
Input Port Service Command String Syntax and explanation
nd
2 field
Service id
1
rd
th
3 field
Operatio
n type
DR
4 field
Operation
argument
0 to 1
TH
1 to 255
TR
(1 to 50)
0
Explanation
Direction of I/P signal change to
trigger
Duration of the I/P state to trigger,
unit in 0.1s
Set Command String to be run, 0 to
cancel setting
Example: Configure Input Port #1 with detection “high to low” and threshold value 0.1s, and trigger Command String #5 if
signal condition match:
IP 1 DR 1 IP 1 TH 1 IP 1 TR 5
Example: cancel Input Port#1 to trigger Command String
IP 1 TR 0
20.4.2
Input Port operation mechanism
The Input Port will give out a high or low signal depending on the input connection to the port (see 13.1)
The Command String can check the change of Input port Signal (operation “DR”):
IP 1 DR 0  detect a low-to-high input voltage change
IP 1 DR 1  detect a high-to-low input voltage change
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
68
To prevent transient noise signal, a threshold value can be set (operation “TH”). This is the time period required for the
detected state to trigger Command String execution. Unit is in 1 millisecond. Valid value from 1 to 50 (0.1 sec to 5 sec) .
E.g. TH 10  Threshold value is 1 sec.
E.g. When set as low-to-high triggering and threshold 1 second: IP 1 DR 0 IP 1 TH 10 IP 1 TR 5
When period of high signal
reach the Threshold value,
the command string will be
executed
Start counting time when a low
to high signal (closed to open)
change is detected
Input port voltage
Time = T
When T=1second the Command String #5 will be executed
E.g. when set as high-to-low triggering and threshold 1 sec IP 1 DR 1 IP 1 TH 10 IP 1 TR 5
Input port voltage
Time = T
When period of low signal reach
Threshold value, the command
string will be executed
Start counting time when a
high to low signal (open to
close) change is detected
When T=1second the Command String #5 will be executed
Note:

Due to product limitation the modem cannot detect switching action with period less than 100ms. If the input signal
change is less than 100ms this feature will not be able to detect accurately.
20.4.3
Reading Input Port status
See Chapter 21 for details.
20.5 SMS Service
This service is used to send out a SMS to phone number recorded in the first 10 phonebook records in SIM card.
20.5.1
st
1 field
Service
type
SM
SMS Service Command String Syntax and explanation
nd
2 field
Service id
(1 to 10)
rd
3 field
Operation
type
SN
th
4 field
Operation
argument
(SMS content)
%CTn
%IP
%TMn
%AI
Explanation
Send out the SMS to phone
number inside SIM card
“%” to indicate “variable” options in
SMS content
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
69
Example: Send a message “ALERT” to phone number store in SIM phonebook #1:
SM 1 SN ALERT
Example: Send a message “Counter#2_value_is_20" to phone number store in SIM phonebook #1:
SM 1 SN Counter#2_value_is_%CT2
20.5.2
Using “variable” options within SMS content
In the SMS content field you can use “%” and Service type to insert the current value of Service into the SMS content:
Variable
Description
%CTn
Current
value of
counter
Id#n
1 to 5
Range of ‘n’
%TMn
Current
value of
Timer Id#n
%IP
Current I/P
Ports’
summing
value
0 to 1
1 to 10
%AI
Current AI
Ports
values
in mV
Invalid Service name or Id will be ignored.
Note:
1. Due to modem/SIM initialization it is recommended to send SMS 30 seconds after power up.
2. Only send SMS with “normal” characters. If SMS content has character with ASCII value outside the range between
11 and 127, the SMS may not be sent properly.
3. In case of sending SMS failure (e.g. network problem) the program will delay 0.5 second and try to resend the SMS.
If the second time retry (i.e. 3 times total) fails this SMS delivery will be aborted.
4. The maximum length of the SMS content is limited by the maximum length of Command String (128 bytes). The more
of Command Strings, the less of SMS length.
20.6 Email Sending Service
This service is used to send out an Email to one or more email saved address, with saved email subject and saved plus
variable email content. Please read Chapter 10 for entering email address, subject and body. Up to 10 set of groups
(service type EM, id 1 to 10) can be set with different combinations of "elements" : recipient(to,cc,bcc), subject and body.
20.6.1
st
1 field
Service
type
EM
Email Sending Service Command String Syntax and explanation
nd
2 field
Service id
(1 to 10)
rd
th
3 field
Operation
type
TO
4 field
Operation
argument
(0-50)
CC
(0-50)
BC
(0-50)
SU
(0-10)
BD
(0-3)
Explanation
Id of recipient email address (see
Chapter 10.2.2)
0 : no receipient
Id of “cc” recipient email address
(see Chapter 10.2.2)
0 : no cc receipient
Id of “bcc” ecipient email address
(see Chapter 10.2.2)
0 : no bcc receipient
Id of email subject (see Chapter
10.2.3)
0 : no subject
Id of email body (see Chapter
10.2.4)
0 : no body
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
70
SN
(additional
content)
%CTn
%IP,
%TMn
%AI
Send out the email with above
setting plus additional content
“%” to indicate “variable” options in
additional content
Example: Setting up EM set #1 with elements: recipient #1, cc #3, bcc #4, subject #1, content #2:
EM 1 TO 1 EM 1 CC 3 EM 1 BC 4 EM 1 SU 1 EM 1 BD 1
Example: Sending email EM set#1 with additional content "HELLO_WORLD":
EM 1 SN HELLO_WORLD
Example: Setting up EM set #2 with elements: recipient bcc #3, no subject and content only "0", and send out
immediately:
EM 2 BC 3 EM 2 SN 0
Example: Send an email EM set #1 with content “Counter#2_value_is_20"
EM 1 SN Counter#2_value_is_%CT2
20.6.2
Using “variable” options within additional email content
In the SMS content field you can use “%” and Service type to insert the current value of Service into the SMS content:
Variable
Description
Range of ‘n’
%CTn
Current
value of
counter
Id#n
1 to 5
%TMn
Current
value of
Timer Id#n
1 to 10
%IP
Current I/P
Ports’
summing
value
0 to 1
%AI
Current AI
Ports
values
in mV
Invalid Service name or Id will be ignored.
Note:
1.
To use Email Sending Service make sure all parameters has been setup properly first:
-
APN (+IPGPRS)
-
SMTP server (+IPSMTP)
-
Sender and recipient address (+EMADDR)
-
Subject (+EMSUBJ)
-
Body (+EMBODY)
It is strongly suggested you have tested the email sending function by using AT+EMSEND command to send test
emails first before using EM Command Sting.
2.
If Operation argument of TO,CC,BC,SU and BD is set to 0(default), the associated Email set will not contain that
element
3.
A minimum email contains one recipient (either TO, CC or BC) and one character of additional email content.
4.
Unlike AT+EMSEND command, sending email use EM service will automatically making GPRS connection
(+IPCONNECT=1,1)
5.
In case email sending is unsuccessful due to any reason, the same email will be resent for max 2 more times. If all
retries are fail that Email will be aborted
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
71
6.
When using EM service maximum 10 emails can be put on sending queue, further Email sending requests will be
aborted. Buffered email queue is volatile and will be lost If modem Is power off or reset. Also when there is EM
service in queue AT+EMSEND command will not be allowed.
20.6.3
Reading Email Sending Service status
See Chapter 21 for details.
20.7 Analogue Input Service
Analogue Input Service can use the signal of Analogue Input to control the execution of Command String. Please read
M100 2G user guide for the connection of Analogue Input port.
20.7.1 Analogue Input Service Command String Syntax and explanation
nd
rd
th
1 field
2 field
3 field
4 field
Explanation
Service Service id Operation
Operation
type
type
argument
AI
1
TP
1 to 3
Trigger Type of AI value change
(1 AI only)
to trigger
TH
1 to 255
Duration of the AI state to trigger,
unit in 1s
HL
0 to 5000
High Limit of AI to trigger
(units mA or mV)
LL
0 to 5000
Low Limit of AI to trigger
(unit: mA or mV)
TR
(1 to 50)
Set Command String to be run, 0
0
to cancel setting
st
Example: Configure AI#1 trigger condition that value is either higher than the high limit (3000)or lower than low limit
(1000)and threshold value 1s, and trigger Command String #5 if signal condition match:
AI 1 TP 3 AI 1 TH 1 AI 1 HL 3000 AI 1 LL 1000 AI 1 TR 5
Example: Configure AI#3 trigger condition that value is higher than the high limit (1000) threshold value 2s, and trigger
Command String #1 if signal condition match:
AI 3 TP 1 AI 3 TH 2 AI 3 HL 1000 AI 3 TR 2
Example: cancel AI#1 to trigger Command String
AI 1 TR 0
20.7.2
Analogue Input operation mechanism
The Analogue Input Service will keep checking the AI once every one second. Depending on Trigger Type (TP) set, the
service will trigger executing Command String if condition fulfilled:
Trigger Type TP
1
2
3
AI value change from lower than
to higher than HL value
Trigger
Trigger
AI value change from higher
than to lower than LL value
Trigger
Trigger
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
72
AI value
T=TH  Trigger to execute
Command String if TP=1 or
TP=3
Time = T
Start to count threshold
time when crossing H/L
Limit
Time = T
T=TH Trigger to execute
Command String if TP=2 or
TP=3
Note:


Please read M100 2G manual carefully before setup.
The Service cannot detect AI value change period less than 1s. If the AI value change is less than 1 second this
feature will not be able to detect accurately
20.7.3
Reading Analogue Input Service status
See Chapter 21 for details.
20.8 Socket Communication Service
This service is used to send out a message Email to one saved TCP host, with saved message content plus variable
message. Please read Chapter 11 for entering host address and parameters, Up to 10 set of groups (service type SC, id
1 to 10) can be set with different combinations of "elements" : host , message content.
20.8.1
st
1 field
Service
type
SC
Socket Communication Service Command String Syntax and explanation
nd
2 field
Service id
(1 to 10)
rd
th
3 field
Operation
type
TO
4 field
Operation
argument
(1-10)
BD
(0-3)
SN
(additional
content)
%CTn
%IP ,
%TMn,
%AI
Explanation
Id of host address (see Chapter
11.2a)
Id of email body (see Chapter
10.2b)
0 : no body
Send out the message with above
setting plus additional content
“%” to indicate “variable” options in
additional content
Example: Setting up SC set #1 with elements: host #1, content #2:
SC 1 TO 1 SC 1 BD 1
Example: Sending socket communication message SC set#1 with additional content "HELLO_WORLD":
SC 1 SN HELLO_WORLD
Example: Setting up SC set #2 with message "0", and send out immediately:
SC 2 BD 0 SC 2 SN 0
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
73
Example: Send a message SC #1 “Counter#2_value_is_20" (report counter # value):
SC 1 SN Counter#2_value_is_%CT2
20.8.2
Using “variable” options within additional email content
In the SC message additional content field you can use “%” and Service type to insert the current value of Service into the
additional content:
Variable
Description
%CTn
Current
value of
counter
Id#n
1 to 5
Range of ‘n’
%TMn
Current
value of
Timer Id#n
1 to 10
%IP
Current I/P
Ports’
summing
value
0 to 1
%AI
Current AI
Ports
values
in mV
Invalid Service name or Id will be ignored.
Note:
1.
To use Socket Communication Service make sure all parameters has been setup properly first:
-
APN (+IPGPRS)
-
host server (+SCHOST)
-
pre-saved message (+SCMESS) (if needed)
It is strongly suggested you have tested the socket communication function by using AT+SCSEND command to
send test message first before using SC Command Sting.
2.
When using SC service maximum 10 messages can be put on sending queue, further message sending requests
will be aborted. Buffered message queue is volatile and will be lost If modem Is powered off or reset. Also when
there is SC service in queue AT+SCSEND command will not be allowed.
20.8.3
Reading Input Port status
See Chapter 21 for details.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
74
21
COMMAND STRING - READING STATUS OF
SERVICES
21.1 Command for reading current information of Services
You can use AT command to read the info of trigger capable Services.
21.1.1
AT+CSTRSTAT Command
Description:
This command is to read current parameter or status of a particular service.
Command Syntax:
AT+CSTRSTAT=”<type> <id>”
Response Syntax:
OK
+CME ERROR: 3
Command
AT+ CSTSTAT=”AL 1”
AT+ CSTRSTAT=”TM 10”
AT+CSTRSTAT=”IP 9”
Possible responses:
AL 1 : ST 01/01/01,12:00:00 TR 2
OK
Note: read current setting of Alarm #1
TM 10: CV 66 SW 1 TR 20
OK
Note: read current info of countdown timer #10
+CME ERROR: 3
Note: id out of range
Defined Values:
<type>
Define type of Service:
AL
alarm
CT
counter
IP
Input Port
CT
Countdown timer
EM email
AI
Analogue input
SC Socket Communication
<id>
Service id
21.1.2
Reading Alarm Service
Enter AT+CSTRSTAT = “AL 1” will get Alarm #1 info:
AL 1 : ST 01/01/01,12:00:00 TR
a
b
3
c
a. Service id
b. datetime set (space if not set)
c. Command String id to be executed if
trigger (0 if not to trigger)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
75
21.1.3
Reading Counter Service
Enter AT+CSTRSTAT = “CT 1” will get Counter #1 info:
CT 1 : ST 300 CV 20
a
b
c
21.1.4
a. Service id
b. trigger value of the counter
c. current value of the counter
d. Command String id to be executed if trigger (0 if
not to trigger)
TR 3
d
Reading Countdown Timer Service
Enter AT+CSTRSTAT = “TM 1” will get Countdown Timer #1 info:
TM 1 : CV 90 SW 0
a
b
c
21.1.5
a. Service id
b. current value of the timer
c. timer is running (1) or stop (0)
d. Command String id to be executed if trigger (0 if
not to trigger)
TR 3
d
Reading Input Pin Service
Enter AT+CSTRSTAT = “IP 1” will get Input Pin #1 info:
IP 1 :
MS 1
a
DR 0
b
21.1.6
a. Service id
b. Mask value (valid for multiple I/P trigger)
c. direction of detection
d. threshold value of the detection
e. Command String id to be executed if trigger (0 if
not to trigger)
TH 5 TR 3
c
d
e
Reading Email Sending Service
Reading Enter AT+CSTRSTAT = “EM 1” will get Email set #1 info:
EM 1 : TO 1
a
b
21.1.7
CC 0
BC 5
c
d
a. Service id
b. id of TO recipient
c. id of CC recipient
d. id of BC recipient
e. id of email subject
f. id of email body
SU 3 BD 1
e
f
Reading Analogue Input Service
Reading Enter AT+CSTRSTAT = “AI 1” will get AI #1 info:
AI 1 :
a
TP 1 HL 100
b
21.1.8
c
LL 10
d
TH 5
e
TR 1 CV 30
f
g
a. Service id
b. Trigger Type (1-3)
c. High Limit (mV)
d. Low Limit (mV )
e. Threshold value (second)
f. Command String id to be executed if
trigger (0 if not to trigger)
g. current value (mV)
Reading Socket Communication Service
Reading Enter AT+CSTRSTAT = “SC 1” will get Socket Communication set #1 info:
a. Service id
SC 1 : TO 1
BD 1
b. id of TO recipient
f. id of message body
a
b
c
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
76
22
KNOWN ISSUES
The Maestro 100 2G Smart Pack will affect certain other AT commands operation. Please note.
22.1 Mutually exclusive TCP/UDP functions.
Following functions are exclusive to each other, i.e. if either is enabled others could not be then:
AT+AUTOTCP=1
AT+AUTOUDP=1
AT+OTCP
AT+OUDP
22.2 Sending Maestro Smart Pack AT commands over SMS and TCP
You can use the remote AT command by SMS feature to send Maestro Smart Pack AT commands mentioned in this
document except the followings:
AT+OTCP
AT+OUDP
AT+IPCONNECT
AT+AUTOPIN
AT+SCMESS
AT+EMBODY
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
77
23
QUESTIONS AND ANSWERS
23.1 Installation
Q.
If I changed my Maestro 100 2G with the MSP installed, can it be changed back to have TCP/IP feature?
A.
It depends. Contact Distributor or Maestro Wireless Solutions.
Q.
I have downloaded the dwl file, and entered AT+WOPEN=1, but I still cannot use MSP, why?
A.
It could be installation problem. You can issue command AT+WOPEN=0, then AT+WOPEN=4, then repeat the
download procedure. If this still not help you may need to re-flash the main firmware first.
Q.
Can I disable the MSP ?
A.
Yes, you can enter AT+WOPEN=0 to disable.
Q.
I get “Invalid modem” message after downloading dwl file and issuing AT+WOPEN=1. Why?
A.
Maybe you have downloaded file into incorrect or damaged modem. Please contact Maestro Wireless Solutions.
Q.
I had download incorrect dwl file, and the modem is not responding after issuing AT+WOPEN=1. What should I do?
A.
You may need to re-flash the main firmware. Please contact Maestro Wireless Solutions or your distributor.
23.2 AutoTCP/UDP
Q.
Can I specify <server> by URL (e.g. xxxx.com) rather than IP address?
A.
Yes, but only if your GPRS network have proper DNS service. You cannot specify your own DNS server
Q.
If I enabled AutoTCP or AutoUDP, how can I stop it ?
A. you need to enter the command AT+AUTOTCP=0 or AUTOUDP=0 by either 1: within 20 seconds after power up, or
2: during reconnection (serial port back to command mode), or 3: by SMS (see Chapter 11).
23.3 AT command driven TCP/UDP connection
Q.
After the TCP/UDP connection is stopped I wan to enter AT+OTCP or AT+OUDP to reconnect but I get message
“+CME ERROR: 3”. Why ?
A.
After TCP/UDP socket connection the GPRS connection session will also be disconnected. So please enter
AT+IPCONNECT=1,1 to reconnect GPRS first.
23.4 Remote AT command by SMS
Q.
Can I send any AT command by SMS to control other features described in this document?
A.
Yes. Please refer to Chapter 11.
23.5 I/O triggered AT command
Q.
Can I put any AT command to control other features described in this document?
A.
No. MSP AT commands described in this document can be executed by this feature.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
78
23.6 TCP Terminal
Q.
I have entered AT+TCPTERM=1 to enable TCP Terminal, but I cannot access Maestro by using Telnet, why?
A.
After power up or entering AT+TCPTERM=1, Maestro 100 2G will wait for 15 seconds before starting TCP
Terminal. So please try later.
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
79
24
Examples of MSP setup and operation
24.1 To setup an Automatic TCP connection
To setup Auto connect to TCP server with IP 61.167.60.1 port 23 (client mode)
Commands to be entered
Modem response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPTCP = 23,”C”,”61.167.60.1”,1
(target TCP is 61.167.60.1, port 23, client
mode, TxDelay is enabled)
AT+AUTOTCP=1
(open TCP socket connection)
(TCP connection will start after 20 secs)
OK
OK
OK
To setup Auto connect to TCP server with IP 61.167.60.1 port 23 (client mode), with 2 minutes idle
disconnection setting
Commands to be entered
Modem response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPTCP = 23,”C”,”61.167.60.1”,1
(target TCP is 61.167.60.1, port 23, client
mode, TxDelay is enabled)
AT+AUOPT=1,2
(socket idle periood 2 minutes)
AT+AUTOTCP=1
(open TCP socket connection)
(UART go to data mode in 20 seconds)
OK
OK
OK
OK
To setup Auto connect to remote TCP client request with any IP address, port 23(server mode)
Commands to be entered
Modem response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPTCP = 23,”S”,”255.255.255.255”, 1
(to accept TCP connection from any IP
address, port 23, client mode, TxDelay is
enabled )
AT+AUTOTCP=1
(open TCP socket connection)
(Modem will start to monitor TCP port 23
after 20 secs)
OK
OK
OK
24.2 To make a AT command driven TCP connection
To connect to TCP server with IP 61.167.60.1 port 23
Commands to be entered
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPTCP = 23,”C”,”61.167.60.1”,1
(target TCP is 61.167.60.1, port 23, TxDelay is enabled )
AT+DLEMODE=1
AT+CGATT=1
AT+IPCONNECT=1,1
(GPRS connection)
AT+OTCP
(open TCP socket connection)
Modem
response
OK
OK
OK
OK
OK
CONNECT
115200
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
80
24.3 To setup periodic ping
To setup to pin an IP address every 30 minutes, disconnect GPRS if fail
Commands to be entered
Modem response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPPING = 2,”61.167.60.1”, 3,2,15
(ping is 61.167.60.1,no. of trial is 3, delay between pin is 2 secs,
timeout is 15 secs)
AT+IPOPT=4,1800,1
(enable Ping every 1800secs, if ping fail then disconnect
GPRS )
OK
OK
OK
24.4 To setup TCP Terminal and Dynamic DNS automatic update
Open TCP Terminal with port 1024, and enable DDNS update with hostname
“mymodem.dyndns.org”
Commands to be entered
Modem response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPDDNSSERV=”members.dyndns.org”,80
(set DDNS server settings)
AT+IPDDNSACCT=”mymodem.dyndns.org”,”mylogin”,”mypss
wd” (set DDNS account settings)
AT+IPDDNSUPD=1
(enable automatic DDNS update)
AT+TCPTERM=2,”mypsswd”,1024,30
(set TCP Terminal password to “mypsswd”,port 1024 and
timeout 30 secs )
AT+TCPTERM=1
(enable TCP Terminal)
OK
OK
OK
OK
OK
OK
24.5 Setup periodic Ping
To setup to pin an IP address every 30 minutes, disconnect GPRS if fail
Commands to be entered
Modem
response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPPING = 2,”61.167.60.1”, 3,2,15
(ping is 61.167.60.1,no. of trial is 3, delay between pin is 2 secs,
timeout is 15 secs)
AT+IPPING=4,1800,1
(enable Ping every 1800secs, if ping fail then disconnect
GPRS )
OK
OK
OK
24.6 Setup TCP Terminal and Dynamic DNS automatic update
Open TCP Terminal with port 1024, and enable DDNS update with hostname
“mymodem.dyndns.org”
Commands to be entered
Modem
response
AT+IPGPRS=1,”INTERNET”
(APN is INTERNET)
AT+IPDDNSSERV=”members.dyndns.org”,80
(set DDNS server settings)
AT+IPDDNSACCT=”mymodem.dyndns.org”,”mylogin”,”mypss
wd” (set DDNS account settigns)
OK
OK
OK
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
81
AT+IPDDNSUPD=1
(enable automatic DDNS update)
AT+TCPTERM=2,”mypsswd”,1024,30
(set TCP Terminal password to “mypsswd”,port 1024 and
timeout 30 secs )
AT+TCPTERM=1
(enable TCP Terminal)
OK
OK
OK
24.7 Perform Remote program update by sending Command over SMS
To download update file from ftp.maestro.com, directory “update”, filename “MSP.dwl”, login
id : USER, password : PASSWORD
(Remember to enter AT+SMSAT=1 to enable AT command over SMS first, default key = “000000”)
000000AT+IPGPRS=1,”sgprs”
OK
000000AT+IPFTP=21,”I”,”A”,”202.100.222.22
2”,”USER”,”PASSWORD”
OK
000000AT+FTPDOTA=”MSP.dwl”,”update”,1
+ADINSTALL: 2
M 100_VAF_094d_OAT316_32 NOV 11
18:01:42
24.8 Command String programming example 1
Input Port signal SMS triggering
To set if Input Port #1 has a low-to-high signal and last for 0.5 seconds, send a SMS to
phone book number 1 to tell Input Pins status
Services used: IP #1
Command String to be entered
AT+CSTRSET=0,2,”SM 1 SN
PIN_1_HIGH_IP_STATUS:_%IP”
AT+CSTR=”IP 1 DR 0 IP 1 TH 5 IP 1 TR 2”
Explanation
CS2 : send SMS to phone #1 with
content “PIN_1….”
Input#1 low-to-high, 50mS
threshold, trigger CS2,
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
82
24.9 Command String programming example 2
Input Port signal email triggering
To set if Input Port #1 has a low-to-high signal and last for 0.5 seconds, send an email with
config set with EM#1
Services used: EM #1, IP #1
AT Cmd/Cmd String to be entered
AT+IPGPRS=1,”INTERNET”
AT+IPSMTP=25,0,”smtp.netowk.com”
AT+EMADDR=0,0,”me@netowrk.com”
AT+EMADDR=0,1,to_1@netowrk.com ,
to_2@network.com”
AT+EMADDR=0,2,”cc_1@netowrk.com ,
cc_2@network.com”
AT+EMADDR=0,3,”bcc_1@netowrk.com ,
bcc_2@network.com”
AT+EMSUBJ=0,1,”Email subj #1”
AT+CSTR=”EM 1 TO 1 EM 1 CC 2 EM 1 BC 3 EM 1 SU 1”
AT+CSTRSET=0,3,”EM 1 SN
PIN_1_HIGH_IP_STATUS:_%IP”
AT+CSTR=”IP 1 DR 0 IP 1 TH 5 IP 1 TR 3”
24.10
Explanation
Setup GPRS
Setup SMTP server
Setup sender address
Setup recipient address
Setup cc recipient address
Setup bcc recipient address
Setup email subject
Set EM#1 using TO#1, CC#2, BCC #3,
Subj #1
CS3: send out email with setting using
EM#1with add’l content “PIN_1…”
Set Input#1 low-to-high, 50mS threshold,
trigger CS3
Command String programming example 3
Analogue Input signal counting and triggering
T o set if AI #1 value exceed 1V and last for 2 seconds, send an email with config set with
EM#1
Services used: SM #1, AI #1
AT Cmd/Cmd String to be entered
AT+CSTRSET=0,2,”SM 1 SN AI_1_over_1000mV
AT+CSTR=”AI 1 TP 1 AI 1 HL 1000 AI 1 TH 2 AI 1 TR 2”
Explanation
CS2 : send SMS to phone #1 with content
“AI_1_over_1000mV”
Set AI#1 exceed HL trigger, HL=1000mV,
50mS threshold, trigger CS2
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
83
25
COMMAND STRING QUICK REFERENCE
Service Id
1 to 5
ALARM “AL”
Argument and Explanation
yy/mm/dd,hh:mm:ss(Date time, 0 to cancel)
0 to 50 (CS to trigger, 0 to cancel)
Operation Type
ST
TR
COUNTER “CT”
Argument and Explanation
1 to 255 (Decrement)
1 to 255 (Increment)
0 (Reset)
-32768 to 32768 (value to trigger
0 to 50 (CS to trigger, 0 to cancel)
Service Id
1 to 5
Operation Type
DE
IN
RS
ST
TR
Service Id
1 to 10
Operation Type
ST
SW
TR
Argument and Explanation
1 to 2147483647 (Timer initial value)
0 to 1 (stop or start timer)
0 to 50 (CS to trigger, 0 to cancel)
Service Id
1
Operation Type
DR
MS
TH
TR
INPUT PORT “IP”
Argument and Explanation
0 to 1
1 to 63 (Mask value for multiple I/P, Id 101-106 only)
1 to 255 (Duration state to trigger unit in 0.1s)
0 to 50 (CS to trigger, 0 to cancel)
COUNTDOWN TIMER “TM”
Service Id
1 to 10
Service Id
1 to 10
SMS “SM”
Operation Type
SN
EMAIL “EM”
Operation Type
TO
CC
BCC
SU
BD
SN
Argument and Explanation
(SMS CONTENT)
(variable : %CTn counter value
%IP input port value
%TMn countdown timer value
%AI Analogue input values)
Argument and Explanation
0-50 (recipient id, 0 to cancel)
0-50 (cc recipient id, 0 to cancel)
0-50 (bcc recipient id, 0 to cancel)
0-10 (subject id, 0 to cancel)
0-3 (body/content id, 0 to cancel)
(additional email content)
(variable : %CTn counter value
%IP input port value
%TMn countdown timer value
%AI Analogue input values)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
84
Service Id
1 to 1
Service Id
1 to 10
Operation Type
TP
TH
HL
LL
TR
Operation Type
TO
BD
SN
ANALOGUE INPUT “AI”
Argument and Explanation
1 to 3 (Trigger type: higher than HL, lower than LL, or both)
1 to 255 (threshold tp trigger unit in 0.1 second)
0 to 5000 (High Limit unit mV)
0 to 5000 (Low Limit unit mV )
0 to 50 (CS to trigger, 0 to cancel)
SOCKET COMMUNICATION “SC”
Argument and Explanation
1 to10 (Host ID)
0-3 (body/content id, 0 to cancel)
(additional email content)
(variable : %CTn counter value
%IP input port value
%TMn countdown timer value
%AI Analogue input values)
Confidential, the whole present document is the sole property of Maestro Wireless Solution Ltd.
85