mPack command list
- Version, Reboot, Factory reset:
- Hardware:
- Cellular:
- IP sockets:
- Remote:
- DOTA:
- D2sphere:
- I/O triggered messaging commands:
Version, Reboot, Factory reset
AT#INFO
Returns device information
ALLOWED: exec-state-info
Note:
- (notes as dashed points)
exec:
AT#INFO
#HW_version: M110Series-01V
#Cellular_Module:u-blox-SARA-U201-23.60
#Bootcode_version: mPack_boot_1.0_rc1_b2017112301
#SW_build: mpack_m110_2.1_rc0_2018022601ALPHA01
#FLASH ID: 0xef,0x4015
OK
state:
AT#INFO?
#HW_version: M110Series-01V
#Cellular_Module:u-blox-SARA-U201-23.60
#Bootcode_version: mPack_boot_1.0_rc1_b2017112301
#SW_build: mpack_m110_2.1_rc0_2018022601ALPHA01
#FLASH ID: 0xef,0x4015
OK
info:
AT#INFO=?
OK
AT#HWVER
Sets the hardware version of the device (e.g. for identification)
ALLOWED: exec-state-info
AT#HWVER=(name)
- name:
- hardware version string in quotes, up to 50 characters
exec:
AT#HWVER=01-M110-DV-JAN2018
OK
state:
AT#HWVER?
#HWVER: 01-M110-DV-JAN2018
OK
info:
AT#HWVER=?
#HWVER: (50)
OK
AT#CONFIGDEL
Factory reset device configuration
ALLOWED: exec
Note:
- Device restarts after this command is executed
exec:
AT#CONFIGDEL
OK
AT#RESET
Software reset the M11X device
ALLOWED: exec
exec:
AT#RESET
OK
AT#NWRST
- This command is used to enable disable device reset when network registeration fails.
ALLOWED: exec-info
AT#NWRST=(option)
- option: only 1 or 0 is allowed
exec:
AT#NWRST=1
OK
state:
AT#NWRST?
#NWRST: 0
OK
info:
AT#NWRST=?
#NWRST: (0-1)
OK
Hardware Commands
AT#SERIAL
Configure the user-side UART baudrate, character-framing and flow control
ALLOWED: exec-state-info
Note:
- Bauds 300, 600 are not supported
- The character-framing of 7 data-bytes does work with current configuration, but unreliably, therefore they are not listed in 'info'
AT#SERIAL=(baud),(char_framing),(flow_ctrl)
- baud: one of (1200,2400,4800,9600,19200,38400,57600,115200)
- char_framing: one of ("8N1","8N2","9O1","9E1"). See also note above.
- flow_ctrl:
- 1 = disable
- 2 = enable
exec:
AT#SERIAL=115200,"8N1",0
OK
state:
AT#SERIAL?
#SERIAL: 115200,"8N1",0
OK
info:
AT#SERIAL=?
#SERIAL: (1200,2400,4800,9600,19200,38400,57600,115200),("8N1","8N2","9O1","9E1"),(0-1)
OK
AT#HFLW
Enable or disable hardware flow control
ALLOWED: exec-state
AT#HFLW=(n)
- option:
- 0 = disable
- 1 = enable
exec:
AT#HFLW=1
OK
state:
AT#HFLW?
#HFLW: 1
OK
info:
AT#HFLW=?
ERROR
AT#SETRTC
Set (or stop) the real time clock
ALLOWED: exec-info
AT#SETRTC=(op),(value1),(value2),(value3),
- op:
- 0 = enter time, (value1,value2,value3) = (hh:mm:ss)
- 1 = enter date, (value1,value2,value3) = (YY:MM:DD)
- 2 = stop the RTC clock
exec:
AT#SETRTC=1,18,03,05
OK
state:
AT#SETRTC?
ERROR
info:
AT#SETRTC=?
#SETRTC: (0-2),((0-23)/(0-99)),((0-59)/(1-12)),((0-59)/(1-31))
OK
AT#GETRTC
Get the real time clock
ALLOWED: exec
exec:
AT#GETRTC
#GETRTC: 2018/03/05,16:50:48
OK
state:
AT#GETRTC?
ERROR
info:
AT#GETRTC=?
ERROR
AT#LED
Execute:
AT#LED=1,0
OK
Read state:
AT#LED?
#LED: 1,0
OK
Read info:
AT#LED=?
#LED: (1,2),(0-2)
OK
AT#VIO
Command to configure Versatile I/O:
ALLOWED: exec-state-info
AT#VIO=(channel),(mode)
- channel: 1 or 2
- mode:
- "DI": digital input
- "DO": digital output
- "AN": analogue input
exec:
AT#VIO=2,"DO"
OK
state:
AT#VIO?
#VIO: 1,"AN"
#VIO: 2,"DO"
OK
info:
AT#VIO=?
#VIO: (1,2),("DI","AN","DO")
OK
AT#VAMODE
Command to set current or voltage mode
ALLOWED: exec-state-info
AT#VAMODE=(channel),(AN_mode)
- channel: 1 or 2
- AN_mode: mode within Analogue mode
- 0 => voltage mode
- 1 => current mode
exec:
AT#VAMODE=1,1 // Set channel 1 to current mode
OK
state:
AT#VAMODE?
#VAMODE: 1,0
#VAMODE: 2,0
OK
info:
AT#VAMODE=?
#VAMODE: (1-2),(0-1)
OK
AT#RDIO
Command to read versatile I/O status
ALLOWED: exec-info
Note:
- (notes as dashed points)
AT#RDIO=(channel) #RDIO: (channel),(mode),(status)
- channel: 1 or 2
- mode:
- "DI": digital input
- "DO": digital output
- "AN": analogue input
- status:
- for mode = "DI" or "DO" : 0 or 1
- for mode = "AN" : voltage in mV or current in mA (which one depends on AT#VAMODE)
exec:
AT#RDIO=1
#RDIO: 1,"AN",35
OK
state:
AT#RDIO?
ERROR
info:
AT#RDIO=?
#RDIO: (1-2)
OK
AT#OPSET
To control versatile I/O in output mode
ALLOWED: exec-info
Note:
- On Power up the device output state will be reset. User will have to resend the OPSET command to set the output.
- Before setting the output value, the channel need to be configured as digital output first using the the AT#VIO command (See the description of the VIO command)
AT#OPSET=(channel),(status)
- channel: (1 or 2)
- status: (0 or 1)
exec:
AT#OPSET=1,1
OK
state:
AT#OPSET?
ERROR
info:
AT#OPSET=?
#OPSET: (1-2),(0-1)
OK
AT#LGPARA
Last gasp SMS config
ALLOWED: exec-state-info
AT#LGPARA=(mobile_no)
- mobile_no: 10-25 characters in quotes, including country code preceded by +. No space or dash in phone number string. Example: +919876543210
exec:
AT#LGPARA="+919876543210"
OK
state:
AT#LGPARA?
#LGPARA: "+919876543210"
OK
info:
AT#LGPARA=?
#LGPARA: (10-29)
OK
Cellular data commands
AT#IPCELLULAR
Configure cellular parameters for both the SIM slots: APN, username and password.
ALLOWED: exec-state-info
AT#IPCELLULAR=(SIM),(APN),(username),(password)
- SIM
- first slot
- second slot (only available on selected models) On models without the second slot, specify 2 will result in ERROR
- APN: max 64 char, in quotes
- username: max 25 char, in quotes. If unspecified, "a" is assumed
- password: max 25 char, in quotes. If unspecified, "a" is assumed
exec:
AT#IPCELLULAR=1,"CMHK"
OK
state:
AT#IPCELLULAR?
SIM1: "CMHK","a","a"
OK
info:
AT#IPCELLULAR=?
#IPCELLULAR: (1-2),(64),(25),(25)
OK
AT#IPCONNECT
Command to connect or disconnect cellular data
ALLOWED: exec-state-info
Note:
- The 1st parameter in this command is only for format correspondence with the older SmartPack version. It doesn't affect any functionality.
AT#IPCONNECT=(1),(mode)
- mode:
- 0 = disconnect cellular data
- 1 = connect cellular data
exec:
AT#IPCONNECT=1,1
OK
state:
AT#IPCONNECT?
#IPCONNECT: 1,0
OK
info:
AT#IPCONNECT=?
#IPCONNECT: (1),(0-1)
OK
AT#IPPING
IP ping configuration
ALLOWED: exec-state-info
AT#IPPING=(option),(address),(num),(interval),(timeout)
- option:
- 0,1 = (reserved)
- 2 = configure ping address and parameters
- address: IP address of the target to be pinged. Can be set as an IPv4 format (xxx.xxx.xxx.xxx) or as a dom URL (i.e. domain.com)
- num: numbers of ping trials for each ping action. Default value is 3. Valid range is 1 to 10.
- interval: time in second between each ping trial. Default value is 3. Valid range is 1 to 10.
- timeout: time in ms before ping is timed out. Default value is 10. Valid range is 5000 to 60000.
exec:
(destination can be reached)
AT#IPPING=2,"8.8.8.8",4,10,5000
OK
AT#IPPING
(to be specified)
(destination cannot be reached)
AT#IPPING=2,"non-existing-ip",4,10,5000
OK
AT#IPPING
(to be specified)
state:
AT#IPPING?
#IPPING: "8.8.8.8",4,10,5000
OK
info:
AT#IPPING=?
#PING: (0-2),(120),(1-10),(1-10),(5000-60000)
OK
IP Socket Commands
AT#IPTCP
Command to set TCP socket parameters.
ALLOWED: exec-state-info
Note:
- Mode & IP address should be entered in quotes
- Currently only the "client" mode has been implemented.
- The "delay" parameter is deprecated and has no effect (suggested not to use).
AT#IPTCP=(idx),(port),(mode),(ip)[,(delay)]
- idx:
- 1 = UART port of modem
- 2 = USB port of modem
- port: number from 0 to 65535
- mode:
- "C": Modem as client to remote server
- "S": Modem as server for remote client to connect
- ip: IP address of remote partner (IPv4 dotted notation)
- delay: (deprecated, no need to enter)
exec:
AT#IPTCP=1,50002,"C","162.242.170.48"
OK
state:
AT#IPTCP?
#IPTCP: 1,50002,'C',"162.242.170.48",1
#IPTCP: 2,0,'C',"",1
OK
info:
AT#IPTCP=?
#IPTCP: (1-2),(0-65535),("C","S"),(120),(0,1)
OK
AT#IPUDP
Command to set UDP socket parameters.
ALLOWED: exec-state-info
Note:
- Mode & IP address should be entered in quotes
- Currently only the "client" mode has been implemented.
- The "delay" parameter is deprecated and has no effect (suggested not to use).
AT#IPUDP=(idx),(port),(mode),(ip)[,(delay)]
- idx:
- 1 = UART port of modem
- 2 = USB port of modem
- port: number from 0 to 65535
- mode:
- "C": Modem as client to remote server
- "S": Modem as server for remote client to connect
- ip: IP address of remote partner (IPv4 dotted notation)
- delay: (deprecated, no need to enter)
exec:
AT#IPUDP=1,50002,"C","162.242.170.48"
OK
state:
AT#IPUDP?
#IPUDP: 1,50002,'C',"162.242.170.48",1
#IPUDP: 2,0,'C',"",1
OK
info:
AT#IPUDP=?
#IPUDP: (1-2),(0-65535),("C","S"),(120),(0,1)
OK
AT#AUTOTCP
Command to Start Auto TCP functionality
ALLOWED: exec-state-info
AT#AUTOTCP=(mode)
- mode:
- 0 = AUTOTCP connection OFF
- 1 = AUTOTCP connection ON
exec:
AT#AUTOTCP=0
OK
state:
AT#AUTOTCP?
#AUTOTCP: 0
OK
info:
AT#AUTOTCP=?
#AUTOTCP: (0,1)
OK
AT#AUTOUDP
Command to Start Auto UDP functionality
ALLOWED: exec-state-info
AT#AUTOUDP=(mode)
- mode:
- 0 = AUTOUDP connection OFF
- 1 = AUTOUDP connection ON
exec:
AT#AUTOUDP=0
OK
state:
AT#AUTOUDP?
#AUTOUDP: 0
OK
info:
AT#AUTOUDP=?
#AUTOUDP: (0,1)
OK
AT#OTCP
On-demand TCP socket connection.
ALLOWED: exec-state-info
AT#OTCP=(mode)
- mode:
- 0 = TCP connection OFF
- 1 = TCP connection ON
exec:
AT#OTCP=0
OK
state:
AT#OTCP?
#OTCP: 0
OK
info:
AT#OTCP=?
#OTCP: (0,1)
OK
AT#OUDP
On-demand UDP socket connection.
ALLOWED: exec-state-info
AT#OUDP=(mode)
- mode:
- 0 = UDP connection OFF
- 1 = UDP connection ON
exec:
AT#OUDP=0
OK
state:
AT#OUDP?
#OUDP: 0
OK
info:
AT#OUDP=?
#OUDP: (0,1)
OK
AT#SCHOST
Configure, erase & read remote TCP server parameter
ALLOWED: exec-state-info
AT#SCHOST=(oper),(id)[,(server),(port),[(retry),(delay),(type)]]
- oper:
- 0 = enter host setting
- 1 = read host setting
- 2 = erase host setting
- id: only 1 for now
- server: IP address of host (IPv4 or text notation)
- port: port number on host
- retry: DEPRECATED - number of retries after first connection fails. range 0-10, default 1
- delay: DEPRECATED - time of delay before the next connection retry in minutes. range 1-60, default 1
- type: DEPRECATED
- 0 = TCP (default)
- 1 = UDP
exec:
AT#SCHOST=0,1,"162.242.170.59",8888
OK
state:
AT#SCHOST=1,1
#SCHOST: 1,"162.242.170.59",8888,1,1,0
OK
info:
AT#SCHOST=?
(0-2),(1),(120),(0-65535),(0-10),(1-60),(0-1)
OK
AT#IPOPT
Optional IP socket parameters
ALLOWED: exec-state-info
AT#IPOPT=(option),(value),(filename)
- option:
- 1 = Keep alive packet
- 2 = Packet size
- 5 = Data on first connection
- value
- for option 1 : 0-43200. Duration to send keep alive packet, in seconds; 0 disables the feature
- for option 2 : 0-1472. TCP Packet size; if 0, default size is used
- for option 5 : 0 to disable; 1 to enable data on first connection; 2 to edit the string to be sent.
- string:
- for option 5 : maximum 120 hex characters and only even length.
exec:
AT#IPOPT=1,1000
OK
AT#IPOPT=5,2,"414243444546474849"
OK
state:
AT#IPOPT?
#IPOPT:
#IPOPT: 1,0
#IPOPT: 2,0
#IPOPT: 3,
#IPOPT: 4,0,0
#IPOPT: 5,0,""
OK
info:
AT#IPOPT=?
ERROR
AT#AUOPT
Optional parameters for AUTOTCP/AUTOUDP connection
ALLOWED: exec-state-info
Note:
- Option 2 depends upon the availability of the server mode
- If both Connection prefix and Serial prefix are defined, the Serial prefix precedes the Connection prefix in the first packet
AT#AUOPT=(option),(value),(string)
- option:
- 1 = Connection idle period
- 2 = Server idle
- 3 = Connection period
- 4 = Connection prefix (only sent upon first connection)
- 5 = Heartbeat packet
- 6 = Serial prefix
- value
- for option 1 : 0-43200. Duration of connection without data transfer, in seconds; 0 disables the feature
- for option 2 : 0-43200. Duration of SERVER without a connected remote client, in seconds; 0 disables the feature
- for option 3 : 0-43200. Duration of connection, in seconds; 0 disables the feature.
- for option 4 : 0 to disable; 1 to enable connection prefix; 2 to edit the string to be sent.
- for option 5 : 0-180. Period of inactivity after which the heartbeat packet is sent, in seconds; 0 disables the feature. The content of the heartbeat packet is fixed to "HELLO".
- for option 6 : 0 to disable; 1 to enable serial prefix; 2 to edit the string to be sent.
- string:
- for option 4 : maximum 20 hex characters and only even length.
- for option 6 : 2 hex characters.
exec:
AT#AUOPT=1,3600
OK
AT#AUOPT=4,2,"4149"
OK
state:
#AUOPT: 1,3600
#AUOPT: 2,0
#AUOPT: 3,0
#AUOPT: 4,0,"4149"
#AUOPT: 5,0
#AUOPT: 6,0,"01"
OK
info:
AT#AUOPT=?
OK
Remote control commands
AT#SMSAT
Configure, enable and disable remote AT command by SMS
ALLOWED: exec-state-info
AT#SMSAT=(mode)[,(param)]
- mode:
- 0 = Disable SMSAT
- 1 = Enable SMSAT
- 2 = Change the password for SMSAT
- 3 = Change the SMS response trigger.
- param:
- for mode=2 : password, 6 characters in quotes (quotes optional if password is purely numeric)
- for mode=3 : 0 to disable SMS response; 1 to enable SMS response
exec:
AT#SMSAT=2,123456
OK
state:
AT#SMSAT?
#SMSAT: 0,"123456",0
OK
info:
AT#SMSAT=?
#SMSAT: #SMSAT: (0-2),((6)/(0-2))
OK
AT#TCPTERM
Parameter configuration for enabling configuration over cellular data network; and start/stop TCP Terminal for remote commands over TCP.
ALLOWED: exec-state-info
Note:
- Network watchdog ping is used by application when the device enters data mode during TCP client/Server mode when enabled.
AT#TCPTERM=(mode)[,(password),(port),(timeout)]
- mode:
- 0 = Disable TCP Terminal
- 1 = Enable TCP Terminal
- 2 = Configure password, port, timeout
- password: max 16 characters. Default "000000"
- port: port used on the modem for incoming TCP connection. Default 23
- timeout: specified in seconds. Default 30
exec:
AT#TCPTERM=2,"000000",23,30
OK
state:
AT#TCPTERM?
#TCPTERM: 0,"000000",23,30
OK
info:
AT#TCPTERM=?
#TCPTERM: (0-2),(16),(1-65535),(1-43200)
OK
DOTA commands
AT#WEBUPDATE
Command to congfigure DOTA parameter & initiate HTTP DOTA for firmware update
ALLOWED: exec-state-info
Note:
- If only the
filename
is given, default IP and port are "updates.d2sphere.com", 80- If the filename is correct, the download starts immediately.
AT#WEBUPDATE=(filename)[,(port),(ip)]
- filename: up to 120 characters, in quotes.
filename
parameter should be typed along with the URL starting with '/'. - port: port of update server
- ip: IP address (dotted IPv4 or text) of update server, in quotes
exec:
AT#WEBUPDATE="/mpack/mpack_R0100.bin",80,"3.252.19.23"
OK
state:
AT#WEBUPDATE?
#WEBUPDATE: "/mpack/mpack_R0100.bin",80,"3.252.19.23"
OK
info:
AT#WEBUPDATE=?
#WEBUPDATE: (120),(0-65535),(120)
OK
AT#UPDATE
Control the update process.
ALLOWED: exec-state
AT#UPDATE=(value)
- option:
- 0 = Stop update process
- 1 = Start update process
exec:
AT#UPDATE=0
OK
state:
AT#UPDATE?
#UPDATE: 0
OK
info:
AT#UPDATE=?
ERROR
D2sphere Commands
AT#IPD2S
D2Sphere configuration command
ALLOWED: exec-state-info
Note:
- Device restarts after this exec command is accepted.
AT#IPD2S=(port),(IP-address),(delay)
- port: port on the D2sphere server
- IP-address: IP address of D2sphere server, in IPv4 dotted-notation
- delay: delay to start in seconds. Range 0-43200
exec:
AT#IPD2S=4444,"5.35.253.3",1000
OK
state:
AT#IPD2S?
#IPD2S: 4444,"5.35.253.3",1000
OK
info:
AT#IPD2S=?
#IPD2S: (0-65535),(120),(0-43200)
OK
AT#D2S
Enable or disable D2Sphere function
ALLOWED: exec-state-info
AT#D2S=(mode)
- mode
- 0 = disable
- 1 = enable
exec:
AT#D2S=1
OK
state:
AT#D2S?
#D2S: 1
OK
info:
AT#D2S=?
#D2S: (0-1)
OK
AT#DVNAME
Configure device name for D2Sphere
ALLOWED: exec-state-info
AT#DVNAME=(name)
- name:
- name of the device, in quotes
exec:
at#dvname="M11x_001"
OK
state:
AT#DVNAME?
#DVNAME: "M11x_001"
OK
info:
AT#DVNAME=?
#DVNAME: (23)
OK
I/O triggered messaging commands
AT#DITRIG
Configure DI high low threshold parameter
(Addition descripions)
ALLOWED: exec-state-info
Note:
- (notes as dashed points)
AT#DITRIG=(pin_number),(min_val),(max_val),(debounce)
- pin_number: 1-2
- min_val: 0-32000, in mV
- max_val: 0-32000, in mV (must be >= min_val)
- debounce: 0-10 (in seconds)
exec:
AT#DITRIG=1,3000,11250,10
OK
state:
AT#DITRIG?
#DITRIG: 1,3000,11250,10
#DITRIG: 2,0,3200,0
OK
info:
AT#DITRIG=?
#DITRIG: (1,2)(0-32000),(0-32000),(0-10)
OK
AT#DITRIGENB
(one line command synopsis)
(Addition descripions)
ALLOWED: exec-state-info
Note:
- (notes as dashed points)
**AT#DITRIGENB=(pin_number),(enb),(trigger_type)
- pin_number: 1-2
- enb:
- 0 = disable trigger
- 1 = specify timeout
- trigger_type:
- 0 = unused
- 1 = high-to-low transition trigger
- 2 = low-to-high transition trigger
- 3 = unused
exec:
AT#DITRIGENB=1,0,1
OK
state:
AT#DITRIGENB?
#DITRIGENB:1,0,1
#DITRIGENB:2,1,3
OK
info:
AT#DITRIGENB=?
#DITRIGENB:(1-2),(0-1),(0-3)
OK
AT#MSGPER
Configuring Message generation period & total no of message to be generated
ALLOWED: exec-state-info
AT#MSGPER=(pin_number),(interval),(count)
- pin_number: 1-2
- interval: how often messages are generated, in sec. Value 0-60000
- count: number of messages generated. Value 0-100
exec:
AT#MSGPER=2,10,3
OK
state:
AT#MSGPER?
#MSGPER: 1,0,0
#MSGPER: 2,10,3
OK
info:
AT#MSGPER=?
#MSGPER: (1-2),(0-60000),(0-100)
OK
AT#MSGSTR
Configure Message ID and message strings associated with the 2 pins
ALLOWED: exec-state-info
Note:
- (notes as dashed points)
AT#MSGSTR=(op),(msg_ID),(msg1),(msg1)
- op:
- 0 = disable message string (not yet implemented)
- 1 = enable message string (not yet implemented)
- 2 = configure message string
- msg_ID: message ID
- msg1: concatenated with msg_ID for DI1
- msg2: concatenated with msg_ID for DI2
exec:
AT#MSGSTR=2,"Maestro","001","234"
OK
state:
AT#MSGSTR?
#MSGSTR: 2,"Maestro","001","234"
OK
info:
AT#MSGSTR=?
#MSGSTR: (0-2),(120),(5),(5)
OK
TEST FOR GRAPH of connection
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;