Neoway N706 AT Commands Manual V1.0
Neoway N706 AT Commands Manual V1.0
AT Commands Manual
Issue 1.0 Date 2022-07-01
N706 AT Commands Manual
Copyright
Notice
This document provides guide for users to use N706.
This document is intended for system engineers (SEs), development engineers, and test engineers.
Neoway provides customers complete technical support. If you have any question, please contact your
account manager or email to the following email addresses:
[email protected]
[email protected]
Website: http://www.neoway.com
Contents
Scope
This document is applicable to N706.
Audience
This document is intended for system engineers (SEs), development engineers, and test engineers.
Change History
Issue Date Change Changed by
1.0 2022-06 Initial draft Tao Wenhong
Conventions
Symbol Indication
This warning symbol means danger. You are in a situation that could cause fatal
device damage or even bodily damage.
Means reader be careful. In this situation, you might perform an action that could
result in module or product damages.
Related Documents
Neoway_N706_Datasheet
Neoway_N706_Product_Specifications
Neoway_N706_HW_User_Guide
Neoway_N706_EVK_User_Guide
2 AT Syntax
2.1 Symbols
⚫ <CR>: carriage return character
⚫ <LF>: linefeed character
⚫ <..>: parameter name, the angle brackets do not appear in the command line.
⚫ [..]: optional parameter, the square brackets do not appear in the command line.
⚫ : space
2.2 Description
Prefix
AT or at
Command Line
Standard commands, in compliance with 3GPP 27007, 27005and ITU-T Recommendation V.250.
Joint Mark
Termination Character
Response Syntax
<CR><LF>response<CR><LF>
Result Syntax
[<CR><LF>response]
<CR><LF>OK<CR><LF> Invoke a function of
Execute AT+CMD[=<VALUE>]<CR>
Or the module.
<CR><LF>ERROR<CR><LF>
Symbols are not displayed in AT commands. All commands comply with the rules in this
Remarks
chapter.
process the given command and return the response varies, depending on the command type.
Commands that do not interact with the SIM or the network, and only involve internal setups or
readings, have an immediate response, and the maximum response timeout is default to 300 ms.
Commands that interact with the SIM/USIM, the network, or the peripherals could take many seconds
to send a response, depending on SIM configuration (e.g., number of contacts stored in the
phonebook, number of stored SMS), on the network the command may interact with (e.g., network
quality, network congestion, and so on), or on the peripheral type.
In the table below are listed only the commands whose interaction with the SIM, the network, or the
peripheral could lead to long response timings. For other commands not listed in the table below, the
maximum response time is 300 ms.
2 AT+CLCK 15
3 ATD*99# 30
4 AT+CMGR 30
5 AT+CMGL 30
6 AT+CMGS 30
7 AT+XIIC 60
8 AT+TCPSETUP 60
9 AT+TCPSEND 30
10 AT+TCPCLOSE 5
11 AT+UDPSETUP 30
12 AT+UDPSEND 30
13 AT+TCPSENDS 30
15 AT+FTPLOGIN 30
16 AT+FTPLOGOUT 30
17 AT+FTPGET 30
18 AT+FTPPUT 30
19 AT+FTPSIZE 30
20 AT+HTTPSETUP 60
21 AT+HTTPACTION 60
22 AT+HTTPCLOSE 60
23 AT+HTTPGET 60
24 AT+HTTPSSETUP 60
25 AT+HTTPSACTION 60
26 AT+HTTPSCLOSE 60
27 AT+HTTPSGET 60
28 AT+FILEHTTPACTION 60
29 AT+FILEHTTPSACTION 60
30 ATD 60
31 AT+WIFIAPSCAN 30
32 AT+WIFIGSMLOC 30
33 AT+CLOUDSUB 30
34 AT+CLOUDPUB 30
35 AT+CLOUDUNSUB 30
36 AT+CLOUDDISCONN 30s+100ms
37 AT+MQTTWILLMSG 30
38 AT+MQTTSUB 10
39 AT+MQTTUNSUB 10
40 AT+MQTTPUB 30
41 AT+MQTTPUBS 30
42 AT+MQTTDISCONN 10
43 AT+AWSCONN 20
44 AT+NWBTBLEPWR 10
45 AT+NWBLESCAN Custom
46 AT+CIPGSMLOC 10
47 AT+UPDATETIME 60
49 AT+MYCELLINFO 300
3 General Commands
Format
Parameter
<manufacturer> Module manufacturer, module name, software version.
<module_version> Module model
<soft_version> software version
Example
ATI
NEOWAY Manufacturer
N706 Module model
V001 Version
OK
Format
Parameter
<reversion> Firmware version of the module.
Example
AT+GMR Query the firmware version
+GMR: N706-R004-STD-BZ-003
OK
Format
Parameter
<signal> The following table shows the relationship between the signal (CSQ) and the
RSSI.
signal rssi
0 <4 or 99 <-107 dBm or unknown
Example
AT+CSQ Query the signal quality.
+CSQ: 19,2
OK
Format
<CR><LF>+CREG: <n>,<stat>
Query AT+CREG?
<CR><LF>OK<CR><LF>
Parameter
<n> 0: Disable network registration unsolicited result code (default setting).
1: Enable network registration unsolicited result code +CREG: <stat>.
2: Enable network registration and location information (Cell ID, Local ID)
unsolicited result code +CREG: <stat>[,[<lac>],[<ci>],[<AcT>]]
<stat> 0: Not registered, the module is not currently searching an operator to register to
1: Registered the home network
2: Not registered, but the module is currently trying to attach or searching an
operator to register to
3: Registration denied
4. Unknown code
5: Registered, roaming
6: ltesms only home
7: ltesms only roaming
8: EMER SVCE ONLY
9: CSFB NOT PREFER HOME
10: CSFB NOT PREFER ROAMING
<lac> Two-byte location area code in hexadecimal format, string type.
<ci> Four-byte cell ID in hexadecimal format, string type.
<Act> 0: GSM
1: GSM compact
2: UTRAN
3: GSM w/EGPRS
4: UTRAN w/HSDPA
5: UTRAN w/HSUPA
6: UTRAN w/HSDPA AND w/HSUPA
7: E-UTRAN
8: UTRAN w/HSPA+
Example
AT+CREG=1 Enable network registration unsolicited codes.
OK
AT+CREG? Query the network registration status of the module.
+CREG: 0,1
OK
AT+CREG=? Query the value range of the network registration status parameter.
+CREG: (0-2)
OK
Format
<CR><LF>+CEREG:
<stat>[,[<tac>],[<ci>],[<AcT>][,,[,[<Active-Time>],[<Peri
Query AT+CEREG?<CR>
odic-TAU>]]]]
<CR><LF>OK<CR><LF>
Parameter
<n> 0: Disable network registration unsolicited result code (default setting).
1: Enable network registration unsolicited result code +CREG: <stat>.
2: Enable network registration and location information (Cell ID, Local ID)
unsolicited result code +CREG: <stat>[,[<lac>],[<ci>],[<AcT>]]
4: Enable network registration unsolicited result codes containing Active-Time and
Periodic-TAU
<stat> 0: Not registered, the module is not currently searching an operator to register to
1: Registered the home network
2: Not registered, but the module is currently trying to attach or searching an
operator to register to
3: Registration denied
4. Unknown code
5: Registered, roaming
<tac> Two-byte location area code in hexadecimal format, string type.
<ci> Two-byte cell ID in hexadecimal format, string type.
<Act> 0: GSM
1: GSM compact
2: UTRAN
3: GSM w/EGPRS
4: UTRAN w/HSDPA
5: UTRAN w/HSUPA
6: UTRAN w/HSDPA and HSUPA
7: E-UTRAN
Example
AT+CEREG? Query the network registration status of the module.
+CEREG: 0,1 Registered the home network.
OK
AT+CEREG=1 Enable unsolicited codes of network registration.
OK
AT+CEREG=? Query the value range of the network registration status parameter.
+CEREG: (0-2,4)
OK
Format
<CR><LF>+COPS:<mode>[,<format>,<oper>[,
Query AT+COPS?<CR>
<AcT>]]
Parameter
<mode> To set automatic network selection or manual selection.
0: Automatic selection (ignore the parameter <oper>)
1: Manual selection
2: Deregister from the network
3: Set <format> only
4: Manual/automatic selection (if the manual selection fails, automatic mode starts)
<format> 0: Long alphanumeric <oper> (default).
1: Short format alphanumeric <oper>
2: Numeric <oper>
<oper> It is given in <format>. This field may be in 16-character long alphanumeric format,
8-characters short alphanumeric format, or 5-character numeric format
(MCC/MNC).
<AcT> indicates the radio access technology and its value can be 0, 1, and 2.
0: GSM
1: GSM compact
3: GSM w/EGPRS
7: E-UTRAN
Example
AT+COPS=0,0 Automatic network selection is enabled. Long alphanumeric mode.
OK
AT+COPS=0,2 Set to digital mode
OK
AT+COPS? China Mobile
+COPS: 0,0,"CHINAMOBILE",7
OK
AT+COPS? If it is set to digital mode, get the number 46000.
+COPS: 0,2,"46000",7
OK
AT+COPS? China Unicom
+COPS: 0,0,"CHINA UNICOM",7
OK
AT+COPS? If it is set to digital mode, then get the number 46001.
+COPS: 0,2,"46001",7
OK
AT+COPS? China Telecom
+COPS: 0,0,"CHINA TELECOM",7
OK
AT+COPS? If it is set to digital mode, get the number 46011.
+COPS: 0,2,46011,7
OK
AT+COPS=2 Deregister the network.
OK
Format
Parameter
<IMSI> International Mobile Subscriber Identity.
IMSI is a character string of 15 digits and starts with 3-bits of MCC and 2-bits of
MNC. It is used to authenticate the SIM card.
Example
AT+CIMI Query the IMSI.
+CIMI: 460020188385503 IMSI: 460022201575463
OK
AT+CIMI Query the IMSI.
ERROR No SIM card is installed.
Format
Parameter
<IMEI> Product serial number identification of the module.
Example
AT+CGSN Read command
+CGSN: 355897043139120
OK
Format
Parameter
<IMEI> Product serial number identification of the module, a character string of 15 digitals.
Example
AT+GSN Query the IMEI number.
+GSN: 355897043139120
OK
Format
Parameter
<ICCID> SIM card ID
The ICCID number is a string of 20 digits.
Example
AT+CCID Read command
+CCID: 89860002190810001367
OK
AT+CCID The SIM card is not inserted.
ERROR
Format
Parameter
<model> Module model
Example
AT+CGMM Request model identification of the module.
+CGMM: N706
OK
Format
Parameter
<model> Module model
Example
AT+GMM Request model identification which consists of a
+GMM: N706 single line containing the name of the module.
OK
If 0 is returned after querying, the baud rate of the module is self-adaptive. The UART communication
is baud rate self-adaptive by default.
Format
Parameter
<baud rate> Baud rate
(0, 2400, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 57600, 115200,
230400, 460800, 921600, 2166666)
Example
AT+IPR=115200 Set the baud rate to 115200 bps.
OK
AT+IPR? Query the current baud rate.
+IPR: 115200
OK
AT+IPR=? Query the available baud rate range.
+IPR:0,2400,4800,9600,14400,19200,28800,3360
0,38400,57600,115200,2166666
OK
AT+IPR=100 Set the baud rate to 100. The value is not allowed.
ERROR
Format
<CR><LF>+CFUN:<fun>
Query AT+CFUN?<CR>
<CR><LF>OK<CR><LF>
Parameter
<fun> 0: turn off radio and SIM power.
1: full functionality (default)
4: turn off the TX and RX RF circuits (Flight mode)
<rst> 0: do not reset the MT before setting it to <fun> power level
1: reset the MT before setting it to <fun> power level
Example
AT+CFUN=1 Set full functionality.
OK
AT+CFUN? Query current function level. Full functionality,
+CFUN: 1
OK
AT+CFUN=? Query available parameter value ranges.
+CFUN: (0,1,4),(0-1)
OK
The multiplexing protocol allows two or more virtual ports to be created on a physical port. Generally,
three virtual ports are created: one is used for dialing network and the rest are used for AT command
sending and receiving.
Format
Parameter
<mode> The mode of MUX that is enabled, integer type.
0: Basic option (default value)
1: Advanced option (not supported)
<subset> Subset of frame format, integer type
0: UIH frames used only (default value).
1: UI frames used only (not supported currently)
<port_speed> UART port rate, integer type
1: 9600 bit/s
2: 19200 bit/s
3: 38400 bit/s
4: 57600 bit/s
5: 115200 bit/s (default)
6: 230400 bit/s
<N1> Maximum frame size. Integer type, ranging from 1 to 2048.
The default value is 31.
For Advanced option, the default value is 64.
<T1> Acknowledgment timer in unite of ten milliseconds, integer type, ranging from 1 to
255, where 10 is default (equal to 100 ms).
<N2> Maximum number of re-transmissions, integer type, ranging from 0 to 5. The
default value is 3.
<T2> Response timer for the multiplexer control channel in units of ten milliseconds,
integer type. Ranging from 2 to 255. The default value is 30 (300 ms).
<T3> Wake up response timer in seconds, integer type. Ranging from 1 to 255. 1
indicates 1 second. The default value is 10s.
(Not supported)
Example
AT+CMUX=0
Basic option
OK
AT+CMUX=2 ERROR is returned because the set value exceeds
ERROR the parameter range.
AT+CMUX=0,0,,512,254,5,255
Basic option.
OK
AT+CMUX=1,0,,512,254,5,255
Advanced option.
OK
AT+CMUX=?
+CMUX:
(0,1),(0),(1-6),(1-2048),(1-255),(0-100),(2-255), Query the available range of parameters.
(1-255),(1-7)
OK
AT+CMUX?
The command format is incorrect.
ERROR
3.16 AT+CCLK–Clock
To set and query the real-time clock.
The settings are not saved after the module is powered off. The default clock is GMT+0.
Format
<CR><LF>+CCLK: <time>
Query AT+CCLK?<CR>
<CR><LF>OK<CR><LF>
Parameter
<time> Character string in format of yy/MM/dd,hh:mm:ss[TZ].
TZ A 2-digit number indicates the time difference between local time and GMT.
This value is displayed only when the network is supported.
Example
AT+CCLK="18/07/01,14:54:01"
Set the real-time clock.
OK
AT+CCLK?
+CCLK: "18/07/01,14:54:10+32" Query the current clock.
OK
AT+CCLK=14/07/02,10:48:50
The parameter format of <time> is incorrect.
ERROR
To enter PIN code, lock current SIM card (running AT+CLCK="SC",1,"1234") and then restart the
module. If PIN code is input incorrectly for three times, PUK is required to unlock.
Format
<CR><LF>+CPIN: <code>
Query AT+CPIN?<CR>
<CR><LF>OK<CR><LF>
Parameter
<pin>, <newpin> String type
<code> READY: ME is not pending for any password.
SIM PIN: ME is waiting SIM PIN to be given.
SIM PUK: ME is waiting SIM PUK to be given.
SIM PIN2: ME is waiting SIM PIN2 to be given.
SIM PUK2: ME is waiting SIM PUK2 to be given
Example
AT+CPIN?
Query whether PIN code is required.
+CPIN: READY
You don't need to enter any password.
OK
AT+CPIN? Query whether PIN code is required.
+CPIN: SIM PIN PIN code is required.
OK
AT+CPIN="1234"
OK Correct PIN code is entered.
Format
Parameter
<fac> Value with double quotes.
Example
AT+CLCK="SC",2
+CLCK: 0
OK
AT+CLCK=?
+CLCK:(“SC","FD","AO","OX","OI") Query the network information related to the module.
OK
AT+CLCK="SC",1,"1234"
Lock the current SIM card. "1234" is PIN code of current SIM card.
OK
AT+CLCK="SC",0,"1234"
Unlock the current SIM card. "1234" is PIN code of current SIM card.
OK
AT+CLCK="SC",1,"2222"
Incorrect PIN code is inputted.
ERROR
Before changing PIN code, lock the SIM card (running AT+CLCK="SC",1,"1234").
Format
<CR><LF>+CPWD:(list of supported
Test AT+CPWD=?<CR> (<fac>,<pwdlength>)s)
<CR><LF>OK<CR><LF>
Parameter
<fac> Value with double quotes.
"P2": SIM PIN2
"SC": SIM card
<oldpwd> string with double quotes; the old password or operation code.
<newpwd> string with double quotes; the new password or operation code.
Example
AT+CPWD=?
+CPWD: ("SC",8),("P2",8) Query the parameters range.
OK
AT+CPWD="SC","1234","0000" Modify the PIN code of the current SIM card. "1234" is the old PIN
OK code and "0000" is the new PIN code.
AT+CPWD=SC,1234,0000 The command format is incorrect; a pair of quotation marks is a
ERROR must for the value.
Format
<CR><LF>+CGDCONT:<cid>,<PDP_t
Query AT+CGDCONT?<CR> ype>,<APN>,<PDP_addr>,<d_comp>,
<h_comp><CR><LF>
<CR><LF>OK<CR><LF>
<CR><LF>+CGDCONT: [list of
supported
Test AT+CGDCONT=?<CR> (<cid>,<PDP_type>,<APN>,<PDP_ad
dr>,<d_comp>,<h_comp>)]
<CR><LF>OK<CR><LF>
Parameter
<cid> integer type; specifies a particular PDP context definition. The parameter is
local to the TE-MT interface and is used in other PDP context-related
commands. (The minimum value is 1).
<PDP_type> string type; specifies the type of packet data protocol.
“IP” Internet Protocol (IETFSTD 5)
<APN> Access Point Name, string type; a logical name that is used to select the GGSN
or the external packet data network.
<PDP_address> String type, identifies the MT in the address space applicable to the PDP.
TE will provide a value for this parameter after PDP starts if it is null or omitted.
If TE fails to provide, a dynamic address is requested, and even if the address
is assigned during the PDP startup process, it is returned empty when queried
with this command.
<d_comp> Integer type, controls PDP data compression (applicable for SNDCP only)
0 - off (if omitted, this parameter is the default value).
<h_comp> integer type; controls PDP header compression 0 - off (default value)
<pd1>, … <pdN> String type, their definitions are corresponding to <PDP_type>
Example
AT+CGDCONT=1,"IP","CMNET" Set the PDP type to IP and set the APN name to
OK CMNET.
AT+CGDCONT?
+CGDCONT: 1,"IP","CMNET"," IPV4:0.0.0.0",0,0 Query the current PDP format.
OK
AT+CGDCONT=?
+CGDCONT: Query the value range of the PDP format, the number
(1-7),(IP,IPV6,IPV4V6,PPP,Non-IP),(0-3),(0-4) of parameters.
OK
Execute this command after AT+CGDCONT. Add this command execution operation into your code
when using the internal protocol stack since the PDP authentication is required for the application that
The default user name and password of the China Unicom SIM card is “card” and “card”.
This <cid> parameter corresponds to the <cid> parameter of the +CGDCONT command.
Format
Parameter
<cid> (PDP Context Identifier) a numeric parameter that specifies a particular PDP
context definition.
This <cid> parameter corresponds to the <cid> parameter of the +CGDCONT
command.
<auth> Authentication type
0: NONE
1: PAP (default)
2: CHAP
When the PDP authentication typeb is NONE, the command contains the <name>
and <pwd> parameters.
<name> User name
<pwd> Password
Example
AT+XGAUTH=1,1,”gsm”,”1234”
Set the first PDP authentication.
OK
AT+XGAUTH=?
+XGAUTH: (1-7),(0-2),32,32 Query the value range of the parameters.
OK
If the initial PDP context is supported, the context with <cid>=0 is automatically defined at startup.
Ensure that the GPRS attach is set before the PPP connection is set up.
⚫ It is recommended to add the AT+CGATT? command to the process to query the GPRS status.
⚫ If the module returns 1, set up PPP connection directly; otherwise, set GPRS attach manually by
executing the command AT+CGATT=1.
Format
<CR><LF>+CGATT: <state>
Query AT+CGATT?<CR>
<CR><LF>OK<CR><LF>
Parameter
<state> 0: detached
1: attached
Example
AT+CGATT=1
OK GPRS is attached successfully.
AT+CGATT=0
OK GPRS is detached successfully.
AT+CGATT=0
GPRS DISCONNECTION Send the return value of this command after AT+XIIC=1
is executed to establish a PPP connection.
OK
AT+CGATT=0
The SERROR is returned because no SIM card is inserted.
ERROR
AT+CGATT? Query the current GPRS status.
+CGATT: 0
OK
AT+CGATT=? Query the valid parameter values for the command.
+CGATT: (0-1)
OK
The setting by this command is not saved after the module is powered off.
Format
Parameter
<value> Whether to enable the terminal display function of AT commands
0: disabled (default)
1: enable
ATE = ATE0
Example
Turn on the terminal display function.
ATE1
OK Send “AT”
AT
OK Serial tool displays “AT” and “OK”
3.24 ATD*99#–GPRS
To establish a GPRS connection using external protocol stacks.
Ensure that the module has registered the network (through CREG) and set APN before dialing any
number.
Format
Parameter
N/A.
Example
ATD*99# Start a dial-up connection.
CONNECT Successful
After this command is sent and low (or high) level is input at DTR, the module can enter sleep mode
unless circuit of each part inside the module allows.
Format
<CR><LF>+ENPWRSAVE: <n><usb>
Query AT+ENPWRSAVE?<CR>
<CR><LF>OK<CR><LF>
Parameter
<n> 0: Forbid sleep mode (default).
1: Allow sleep mode (Low level at DTR triggers sleep mode)
2: Allow sleep mode (High level at DTR triggers sleep mode)
<usb> 0: Forbid USB remote wake-up (default)
1: allow USB remote wakeup (the module enters sleep mode only after the USB
host suspends the USB. After the USB host resumes the USB bus or there are
network DL events (data, SMS, call), the module wakes up the USB host through the
USB bus.)
Example
AT+ENPWRSAVE=1,1
Set the module to allow sleep mode. Allow USB remote wakeup.
OK
AT+ENPWRSAVE?
+ENPWRSAVE: 1,0 Query current sleep mode status.
OK
⚫ If the current serving cell is not a GERAN cell, <rxlev> and <ber> are set to value 99.
If the current serving cell is not a UTRA FDD or UTRA TDD cell, <rscp> and <ecno> are set to 255.
If the current serving cell is not an E-UTRA cell, <rsrq> and <rsrp> are set to 255.
⚫ If the current serving cell is not an NR cell, <ss_rsrq>, <ss_rsrp> and <ss_sinr> are not displayed.
Format
Parameter
<rxlev> integer type, received signal strength level
<ber> Bit Error Rate
<rscp> received signal strength indicator
<ecno> downlink carrier interference ratio
<rsrq> reference signal quality
<rsrp> reference signal received power
<ss_rsrq> reference signal command (based on synchronization signal)
<ss_rsrp> reference signal received power (based on synchronization signal)
<ss_sinr> signal-to-noise and interference ratio (based on synchronization signal)
Example
AT+CESQ Query the signal quality.
+CESQ: 99,99,255,255,16,47
OK
AT+CESQ=? Signal display range
+CESQ:
(0-62,99),(0-7,99),(255),(255),(0-34,255),(0-97,255)
OK
Before executing this command, ensure that the dial-up connection is established through the
AT+XIIC command successfully.
Ensure that the entered content is correct since its correctness is not verified.
Format
<CR><LF>+NWDNS: <Sign>,<IP><CR><LF>
Query AT+NWDNS?<CR> <CR><LF>+NWDNS: <Sign>,<IP><CR><LF>
<CR><LF>OK<CR><LF>
Parameter
<hostname> Hostname, character type, 128 bytes in length at most; double quotation marks are
required.
<IP> IP address, string type
<Sign> IPv4 or IPv4, string type
Example
AT+NWDNS=”WWW.BAIDU.COM” An empty string is returned because there is no IPv6 address.
+NWDNS: IPV4,”220.181.112.244”
+NWDNS: IPV6,””
OK
AT+NWDNS=”www.google.com”
Querying of the google domain name times out.
ERROR
AT+NWDNS=”www.google.com”
No dialing; the returned value indicates that PDP is not activated.
ERROR
AT+NWDNS?
+NWDNS: IPV4,”220.181.112.244”
OK
4 SMS Commands
Format
<CR><LF>+CSMS:
Query AT+CSMS?<CR> <service>,<mt>,<mo>,<bm><CR><LF>
<CR><LF>OK<CR><LF>
Parameter
<service> 0: GSM 03.40 and 03.41 (the syntax of SMS AT commands is compatible with
GSM 07.05
Phase 2
1: GSM 03.40 and 03.41 (the syntax of SMS AT commands is compatible with
GSM 07.05
Phase 2+
<mt>,<mo>,<bm> 0: Not support
1: support
Example
AT+CSMS=1
+CSMS: 1,1,1 Set SMS service to 1.
OK
AT+CSMS?
+CSMS: 1,1,1,1 Query the current parameter values.
OK
AT+CSMS=?
+CSMS: (0-1) Query the value range of SMS service.
OK
Format
<CR><LF>+CPMS:
<mem1>,<used1>,<total1>,<mem2>,<used2>,<total2>,<
Query AT+CPMS?<CR>
mem3>,<used3>,<total3><CR><LF>
<CR><LF>OK<CR><LF>
Parameter
<mem1> Memory from which SMS messages are read and deleted, string type
<mem2> Memory to which writing and sending operations are made, string type
<mem3> memory to which received SMS are preferred to be stored (unless forwarded
"SM": directly to TE; refer command New Message Indications +CNMI)
"ME": SIM message storage
"MT": ME message storage
any of the storages associated with ME
<mem1> String type, for example, “SM”, “ME”
Example
AT+CPMS="SM"
Set the SMS storage to "SM", that
+CPMS: 0,50,0,50,0,50
is, store SMS messages in SIM card.
OK
AT+CPMS?
Query the capacity of current SMS
+CPMS: "SM", 0, 50, "SM", 0, 50,"SM", 0, 50
storage.
OK
AT+CPMS=?
+CPMS: ("ME","SM","MT"),("ME","SM","MT"),("ME","SM","MT") Query the memory that can be set.
OK
Format
<CR><LF>+CMGF: <mode><CR><LF>
Query AT+CMGF?<CR>
<CR><LF>OK<CR><LF>
Parameter
<mode> 0: PDU mode (default)
1: text mode
Example
AT+CMGF=1
Set SMS to text mode.
OK
AT+CMGF?
+CMGF: 1 Query the current mode of SMS message input.
OK
AT+CMGF=?
+CMGF: (0-1) Query the value range of <mode>.
OK
Format
<CR><LF>+CSCS: <chset>
Query AT+CSCS?<CR>
<CR><LF>OK<CR><LF>
Parameter
<chset> "GSM": default GSM alphabet (GSM03.38.6.2.1).
"IRA": international reference alphabet)(ITU-T T.50).
"UCS2":16-bit universal multiple-octet coded character set (USO/IEC10646). UCS2
character strings are
converted to hexadecimal numbers from 0x0000 to 0xFFFF. UCS2 encoding is used only
in some character string of the statement; the rest of the commands and responses are
still in the IRA alphabet format.
"PCCP936": the same as the GBK encoding format.
"IRA": international reference alphabet) (ITU-T T.50).
Example
AT+CSCS="GSM"
Set “TRA” character.
OK
AT+CSCS?
+CSCS: "PCCP936" Query the format of current character set.
OK
AT+CSCS=?
Query the character set formats that the module supports.
+CSCS: ("GSM","HEX","PCCP936","UCS2")
A list of character set formats are returned.
OK
Format
<CR><LF>+CNMI:
Query AT+CNMI?<CR> [<mode>[,<mt>[,<bm>[,<ds>[,<bfr>]]]]]<CR><LF>
<CR><LF>OK<CR><LF>
Parameter
<mode> Set the instruction mode after receiving SMS messages.
0: SMS instruction codes can be saved in the buffer of the module. If the TA is full, the
old codes can be saved in other place or replaced with new codes.
1: when the module is online, it will discard saved SMS instruction codes and reject new
codes. In other situations, the codes are displayed on the end device.
2: when the module is online, the SMS instruction codes are saved in the buffer of the
module. After the connection is released, the SMS instruction codes are output through
UART. In other situations, codes are directly displayed on the end device.
3: when the module is online, SMS indicator code and other data are transmitted
together and the code will be displayed on the device.
<mt> Set the format of the new SMS instruction codes. The default value is 0.
⚫ The recommended setting is +CNMI: 2,1,0,0,0 (new messages are stored on SIM card rather than
displayed directly) or +CNMI: 2,2,0,0,0 (new messages are displayed rather than stored on SIM card).
⚫ Class 1: Stored in ME
Class 3: Sent to TE
Example
AT+CNMI=1,1,0,0,0
Set the SMS message indication mode.
OK
AT+CNMI=?
Query the range of command parameters that can be set.
+CNMI: (0-3),(0-3),(0,2),(0-1),(0-1)
OK
AT+CNMI?
+CNMI: 1,1,0,0,0 Query the current setting of the parameters.
OK
If the received message is unread, its status in the storage changes to received read after executing
this command.
Format
Parameter
<index> location value <index> from preferred message storage <mem1> to the TE. The
SMS message CMGR reads is from <mem1>.
<stat> ⚫ TEXT mode
“REC UNREAD": received unread
"REC UNREAD": received read
"STO UNSENT": stored unsent
"STO SENT": stored sent
⚫ PDU mode
0: received unread
1: received read
2: stored unsent
3: stored sent
<alpha> String type alphanumeric representation of <da> or <oa> corresponding to the
entry found in MT phonebook.
<length> The number of octets of the given TP-level data unit (octets that do not contain
the service center address)
<pdu> PDU data
Example
Read the message indexed
AT+CMGR=1
as 1.
+CMGR: "REC READ","66421",,"11/09/13,16: 37: 59+32"
050003140401E27778592EA7E7EBE9373C3C279BCF68F59AADC7FED62779BA596D7EBA
EB5B91EBD16A5D46C35F98406A744E311A95C32594DA75688B50EADACA6D689150EADF
1B2BC5E579AD575E5B5582D5EABD5624C36A3D56C375C0E1693CD6835DB0D9783A15C9
1D2E06BDAA558AC1F60C52B937CADCD2B747AA9021BDEC627E8E9441BD42655DEF446
OK
+CMTI: "SM",39
AT+CMGR=39 Incoming SMS.
+CMGR: 0,,23 Read the SMS message.
0891683110501905F0240BA18177377949F50000413062312503230468341A0D
OK
AT+CMGF=1 Set the text mode.
OK
AT+CSCS="GSM"
OK
Incoming SMS.
+CMTI: "SM",40 Read the SMS message.
AT+CMGR=40
+CMGR: "REC UNREAD","18777397945",,"14/03/26,13: 57: 58+32"
hello world
OK
Format
F><data>[...]]
When PDU mode (+CMGF=0) and the command is
executed successfully:
<CR><LF>+CMGL:
<index>,<stat>,[<alpha>],<length><CR><LF><pdu>[<
CR><LF>+CMGL:
<index>,<stat>,[<alpha>],<length><CR><LF><pdu>[..
.]]
Failed to execute the command:
<CR><LF>ERROR<CR><LF>
Parameter
<stat> String type or numeric type.
When AT+CMGF=1:
"REC UNREAD": received unread
"REC UNREAD": received read
"STO UNSENT": stored unsent
"STO SENT": stored sent
"ALL": all SMS messages
When AT+CMGF=0:
0: received unread
1: received read
2: Stored unsent SMS messages
3: Stored sent SMS messages
4: All SMS messages
Example
AT+CMGL="ALL"
+CMGL: 1,"REC READ","66421","","2011/09/13 16: 37: 59+32"
050003140401E27778592EA7E7EBE9373C3C279BCF68F59AADC78FED62779BA596D7EBAEB5B91EBD16A5D46C35F98406A7
44E311A95C32594DA75688B50EADACA6D689150EADF1B2BC5E579AD575E5B5582D5EABD5624C36A3D56C375C0E1693CD68
35DB0D9783A15C91D2E06BDAA558AC1F60C52B937CADCD2B747AA9021BDEC627E8E9441BD42655DEF446
+CMGL: 14,"STO SENT","66045","",
050003010401E27778592EA7E7EBE9373C3C279BCF68F59AADC78FED62779BA596D7EBAEB5B91EBD16A5D46C35F98406A7
44E311A95C32594DA75688B50EADACA6D689150EADF1B2BC5E579AD575E5B5582D5EABD5624C36A3D56C375C0E1693CD68
35DB0D9783A15C91D2E06BDAA558AC1F60C52B937CADCD2B747AA9021BDEC627E8E9441BD42655DEF446
+CMGL: 44,"REC UNREAD","8615719556937","","2011/09/30 03: 00: 55+32"
5E7F4E1C79FB52A863D0919260A8003A4E2D536B75286237003100350037003100390035003500360039003300377ED960
A86765753500326B21002C6700540E4E006B21572800320039002F00300039002000320030003A00340038002C60A853EF
6309901A8BDD952E621690099879952E76F463A556DE62E8
OK
AT+CMGL=? Query in text format (AT+CMGF=1).
+CMGL: ("REC UNREAD", "REC READ", "STO UNSENT", "STO SENT",
"ALL")
OK
AT+CMGL=?
Query in PDU format (AT+CMGF=0).
+CMGL: (0-4)
OK
AT+CMGL=ALL A pair of quotation marks ("") is required
ERROR for the parameter.
AT+CMGF=1
OK
AT+CMGL=4
The parameter should be set to 0.
ERROR
AT+CMGF=0
OK
AT+CMGL="ALL"
The parameter should be set to 1.
ERROR
Format
Parameter
<da> The destination number of the SMS messages.
<text> SMS message content in text mode.
<length> the byte length of the SMS message content in PDU mode.
<mr> Message reference number
<CR> end character.
<Ctrl+Z> indicates the end of the input message,
in the example.
<ESC> indicates giving up the input message.
<scts> Service center time stamp
Example
Text mode(+CMGF=1)
AT+CMGS="66358"
“ ” is the symbol after pressing
> This is the text
Ctrl+Z.
+CMGS: 171
OK
AT+CMGS="15889758493"
AT+CMGF=1 might not be executed.
> This is the text
ERROR
AT+CMGS=33 PDU mode(+CMGF=0)
>0891683108705505F001000B815118784271F20008146DF157335E025
B9D5B89533A59276D6A80545EFA
+CMGS: 119
OK
Format
Parameter
<da> The destination number of the SMS messages.
<text> SMS message content in text mode.
<length> the byte length of the SMS message content in PDU mode.
<index> Location information
<CR> end character.
<Ctrl+Z> indicates the end of the input message,
in the example.
<ESC> indicates giving up the input message.
If you use the serial-port commissioning tool to send PDU SMS, please press the carriage return character
manually after the AT+CMGS command, or send <CR> in hexadecimal.
Example
AT+CMGW="091137880" TEXT mode (+CMGF=1).
>This is the text<Ctrl+Z>
+CMGW: 15
OK
the number in text mode must be
AT+CMGW=091137880 enclosed with double quotation
ERROR marks.
AT+CMGW=31
PDU mode (+CMGF=0)
>
0891683108705505F001000B813124248536F300081200400026002A535A53
D153A653C1532052C7<Ctrl+Z>
+CMGW: 1
OK
Format
Parameter
<index> Indicates message location
<da> The destination number of the SMS messages.
Example
AT+CMSS=2
+CMSS: <mr> Send the SMS messages stored in memory 2.
OK
AT+CMSS=2
No SMS message is stored in memory 2 or the SMS message number in memory 2 is incorrect.
ERROR
Format
Parameter
<index> The recording number of the stored SMS messages.
<delflag> Integer type
0: delete the SMS messages with the specified recording numbers.
1: delete all read SMS messages.
2: delete all read and sent SMS messages.
3: delete all read, sent, and unsent SMS messages.
4: delete all messages.
If the <delflag> parameter has been set, the <index> parameter will be ignored.
Example
AT+CMGD=0,3 Delete all read, sent, and unsent SMS messages.
OK Deleted successfully.
AT+CMGD=?
Query the value ranges of parameters.
+CMGD:(1-40),(0-4)
OK
AT+CMGD=5
The 5th message does not exist.
ERROR
Format
<CR><LF>+CSCA: <sca>,<tosca><CR><LF>
Query AT+CSCA?<CR>
<CR><LF>OK<CR><LF>
Parameter
<sca> SC address, string with double quotes.
<tosca> The format of the SMS center number. 129 indicates national number.
145 indicates international number.
Example
AT+CSCA="+8613800755500",145
Set an international SMSC address.
OK
AT+CSCA?
+CSCA: "+8613800755500",145 Query the SMSC address.
OK
Format
<CR><LF>+CSMP:
Query AT+CSMP?<CR> <fo>,<vp>,<pid>,<dcs><CR><LF>
<CR><LF>OK<CR><LF>
Parameter
<fo> depending on the command or result code: first octet of GSM 03.40 SMS-DELIVER
SMSSUBMIT (default 17), SMS-STATUS-REPORT, or SMS-COMMAND (default 2) in
integer format.
<vp> value validity period
0-143 (vp+1)*5mins, 12 hours at most
168-196 (vp–166)*1day
197-255 (vp-192)*1week
<pid> TP-Protocol-Identifier in integer format (default 0)
<dcs> Cell Broadcast Data Coding Scheme in integer format (default 0).
Example
Set the text mode parameters to 17,167,0,0.
AT+CSMP=17,167,0,0
No status report; the validity period of the information is 24 hours;
OK
Only messages in text format can be sent.
AT+CSMP?
+CSMP: 17,167,0,0 Query the current settings of the text mode.
OK
Format
<CR><LF>+CSDH: <show><CR><LF>
Query AT+CSDH?<CR>
<CR><LF>OK<CR><LF>
Parameter
<show> 0: not display (default)
1: display
Example
AT+CSDH=0
OK
AT+CMGR=0
Set the header information to not display.
+CMGR: "RECREAD","13510895077",,"15/07/23,20: 58: 28
Read the 0th message.
+32"
abc
OK
AT+CSDH=1
OK Set the detailed header information to
AT+CMGR=0 display.
+CMGR: "RECREAD","13510895077",,"15/07/23,20: 58: 28 Read the 0th message.
+32",161,36,0,0,"+8613010888500",145,3
abc
OK
AT+CSDH?
Query the current parameter setting of the
+CSDH: 0
command.
OK
AT+CSDH=?
Query the value range of parameter in the
+CSDH: (0-1)
command.
OK
Format
<CR><LF>+NETAPN: "APN","username","password"
Query AT+NETAPN?<CR>
<CR><LF>OK<CR><LF>
Parameter
APN GPRS network access point
username GPRS user name
password GPRS password
Example
AT+NETAPN="CMNET","",""
Set GPRS APN to CMNET and leave user account and password blank.
OK
AT+NETAPN=CMNET,,
A pair of quotation marks is required for each parameter.
ERROR
AT+NETAPN?
+NETAPN:"","","" Query the current settings of APN parameter.
OK
Format
<CR><LF>+XIIC: <state>,<ip>
Query AT+XIIC? <CR>
<CR><LF>OK<CR><LF>
Parameter
<n> 0: Disconnect the PPP link
1: Activate the PPP link.
<state> 0: PPP connection is closed.
1: PPP connection is activated.
<ip> IP address
Example
AT+XIIC=1
Set up the first PPP link.
OK
AT+XIIC? The PPP link is set up successfully and the IP address
+XIIC:1,10.107.216.162 is 10.107.216.162.
OK There are four spaces before 1.
AT+XIIC?
The PPP link is not set up successfully.
+XIIC:0,0.0.0.0
There are four spaces before 0.
OK
⚫ Before executing this command, use the AT+CGDCONT command to set the parameters including <APN>.
⚫ Ensure that the module registers the network before using the AT+XIIC=1 command to set up PPP link. Use
AT+GREG? to check whether the module registers the network or not. If +CREG: 0,1 or +CREG: 0,5 is
returned, the module did not register to the network.
Format
Parameter
<n> Socket ID, ranging from 0 to 5.
<ip> destination IP address, in form of xx.xx.xx.xx or www.xxxxxx.com (domain name
with or without quotation marks).
<port> Destination port ID in decimal ASCII code.
<result> Result code
OK
FAIL
Example
AT+TCPSETUP=0,220.199.66.56,6800
OK Set up a connection to 220.199.66.56,6800 on socket 0.
Successful
+TCPSETUP: 0,OK
AT+TCPSETUP=0,neowayjsr.oicp.net,60010 Set up a connection to neowayjsr.oicp.net,60010 on socket
OK 0.
Set up a connection to neowayjsr.oicp.net, 60010 on socket
+TCPSETUP: 0,OK 0.
+TCPCLOSE: 0,Link Closed The socket is closed.
AT+TCPSETUP=1,192.168.20.6,7000 Failed to set up a connection to 192.168.20.6,7000 on socket
OK 1. The server may be not started; the IP address or the
port number may be incorrect; the SIM card fee may be
+TCPSETUP: 1,FAIL overdue.
AT+TCPSETUP=0,neowayjsr.oicp.net,60010
A TCP/UDP connection has been set up on socket 0.
+TCPSETUP: 0, ERROR1
AT+TCPSETUP=6,192.168.20.6,7000
Parameters are set incorrectly.
+TCPSETUP: ERROR
AT+TCPSETUP=0.58.60.184.213.10012
Parameters are set incorrectly.
+TCPSETUP: ERROR
AT+TCPSET=0,58.60.184.213,10012
The AT command is not complete.
ERROR
This command support data sending in command mode and buffer mode as well as in ASCII and HEX
format. The module will return > after this command is sent. Send UDP data 50 ms to 100 ms later.
⚫ When ASCII data in command mode is required to be sent, length of the <content> parameter must be less
than or equal to 1024 bytes.
Format
Parameter
<n> Socket ID, ranging from 0 to 5. A TCP connection is established on the socket.
<length> Length of the data to be sent, unit: byte. 1 to 4096 for ASCII data sent in buffer
mode.
1 to 2018 for HEX data sent in buffer mode.
1 to 512 for data sent in command mode (HEX).
1 to 512 for data sent in command mode (ASCII).
<content> data sent in command mode with a length ranging from 0 to 1024.
<mode> data format
0: ASCII (default)
1: HEX
Example
AT+TCPSEND=0,1
>
Send 1-byte data on socket 0.
OK
Successful
+TCPSEND: 0,1
AT+TCPSEND=0,1024,,1
Send 1024-byte data in hexadecimal format in buffer mode.
>
OK
Successful
+TCPSEND: 0,1024
AT+TCPSEND=0,6,"123459"
OK
Command mode (Only plain text can be sent, not special symbols.)
+TCPSEND: 0,6
AT+TCPSEND=0,3,”313233”,1
Send data in hexadecimal format in command mode.
OK
Successfully
+TCPSEND: 0,3
AT+TCPSEND=0,10
> No data is input within 30 seconds after > is displayed.
+TCPSEND: 0,OPERATION EXPIRED
AT+TCPSEND=0,1 One-byte data fails to be sent on socket 0 because the socket
+TCPSEND: SOCKET ID OPEN FAILED is not opened.
AT+TCPSEND=0,4097 4097-byte data fails to be sent on socket 0 because data length
+TCPSEND: DATA LENGTH ERROR exceeds the limit.
Do not send this command during communication because it will clear the buffer. This command also
works for UDP data.
Format
<CR><LF>+RECVMODE: <n>,<mode>
Query AT+RECVMODE?<CR>
<CR><LF>OK<CR><LF>
Parameter
<n> receive mode
0: buffer the TCP or UDP data received and sending command to read the data by
MCU is required.
1: print the TCP or UDP data received to UART directly (default).
<mode> report format
0: ASCII report (default).
1: Hexadecimal
Example
AT+RECVMODE=0 Set the receive mode to 0.
OK
AT+RECVMODE=1,1 Print data and report data in HEX format.
OK
AT+RECVMODE=? Query the value range can be set.
+RECVMODE: (0-1),(0-1)
OK
Format
Type Command
URC +TCPRECV: <n>,<length>,<data><CR>
Parameter
<n> Socket ID, ranging from 0 to 5.
<length> Length of the data received.
<data> data received, end with 0x0d 0x0a; users can determine the end according to the
<message_len>.
Example
+TCPRECV: 0,10,1234567890 10-byte data is successfully received on socket 0.
The data is 1234567890.
Format
Parameter
<n> Socket ID, ranging from 0 to 5.
<length> maximum length of data allowed to read, ranging from 1 to 2048 bytes.
Example
+TCPRECV: 0 RECVMODE=0
AT+TCPREAD=0,100 Data received on socket 0.
+TCPREAD: 0,10,1234567890 Read data.
OK The data read is 1234567890.
Format
Parameter
<n> socket ID, ranging from 0 to 5.
Example
AT+TCPCLOSE=1 Close the TCP connection on socket 1.
+TCPCLOSE: 1,OK Successfully.
AT+TCPCLOSE=2 Socket number error
+TCPCLOSE: ERROR
+TCPCLOSE: 0,Link Closed The TCP connection is closed.
The server sends closing command or the network encounters
abnormality or weak signals.
Use the AT+XIIC=1 command to set up a PPP link before running this command.
Format
Type Command Response
<CR><LF>OK<CR><LF>
<CR><LF>+UDPSETUP:
<n>,<result><CR><LF>
Or
Execute AT+UDPSETUP=<n>,<ip>,<port><CR>
<CR><LF>ERROR<CR><LF>
Or
<CR><LF>+UDPSETUP:
ERROR<CR><LF>
Parameter
<n> Socket ID, ranging from 0 to 5.
<ip> destination IP address, in form of xx.xx.xx.xx or www.xxxxxx.com (domain name)
<port> Destination port ID in decimal ASCII code.
<result> Result codes
OK
FAIL
ERROR1: a connection is already set up on the socket.
Example
AT+UDPSETUP=1,220.199.66.56,7000
OK Set up a connection to 220.199.66.56,7000
Successfully
+UDPSETUP: 1,OK
AT+UDPSETUP=0,neowayjsr.oicp.net,60010
Set up a connection to neowayjsr.oicp.net,60010 on socket
OK
0
Successfully
+UDPSETUP: 0,OK
AT+UDPSETUP=0,58.60.184.213,11008
A TCP/UDP connection is set up on socket 0.
+UDPSETUP: 0, ERROR1
AT+UDPSETUP=1,192.168.20.6,7000
OK
Failed to set up a connection to 192.168.20.6,7000
+UDPSETUP: 1,FAIL
AT+UDPSETUP=6,192.168.20.6,6800
Socket number error
+UDPSETUP: ERROR
AT+UDPSETUP=0.58.60.184.213.10012
The punctuations in the command are incorrect.
+UDPSETUP: ERROR
AT+UDPSET=0,58.60.184.213,10012
The AT command is not complete.
ERROR
Ensure that the UDP link is set up before sending UDP data. Set it when sending data. In Buffer mode,
the module will return > after this command is sent. Send UDP data 50 ms to 100 ms later.
⚫ In buffer mode, at most 2048 bytes can be sent in HEX format and at most 4096 bytes can be sent in ASCII
format.
⚫ To decrease the packet loss rate, do not send data more than 1472 bytes each time.
⚫ For how to send quotation marks and backslash in command mode, see the Example.
⚫ The mode parameter can be omitted. Data in ASCII format supports escape mode by default.
⚫ When ASCII data in command mode is required to be sent, length of the <content> parameter must be less
than or equal to 102 bytes.
Format
Type Command Response
<CR><LF>>
<CR><LF>OK<CR><LF>
<CR><LF>+UDPSEND: <n>,<length>
Or
AT+UDPSEND=<n>,<length>[[,<content>]
Execute <CR><LF>+UDPSEND: <n>, OPERATION
[,mode]]<CR>
EXPIRED<CR><LF>
Or
<CR><LF>+UDPSEND: DATA LENGTH
ERROR<CR><LF>
Parameter
<n> Socket ID, ranging from 0 to 5. A UDP connection is established on the socket.
<length> Length of the data to be sent, unit: byte.
1 to 2018 for HEX data sent in buffer mode.
1 to 4096 for ASCII data sent in buffer mode.
1 to 512 for data sent in command mode (HEX).
1 to 512 for data sent in command mode (ASCII).
Example
AT+UDPSEND =0,1024,,1
>
Send 1024-byte data in hexadecimal format in buffer mode.
OK
Successfully
+UDPSEND: 0,1024
AT+UDPSEND=0,10,"DEGHHRFRRD",0
In command mode, send data in ASCII mode.
OK
Successfully
+UDPSEND: 0,10
AT+UDPSEND=0,4097 4097-byte data fails to be sent on socket 0 because data
+UDPSEND: DATA LENGTH ERROR length exceeds the limit.
AT+UDPSEND=1,6,”313233343536”,1
OK Send data in hexadecimal format in command mode.
Format
Type Command
URC +UDPRECV: <n>,<length>[,<data>]<CR>
Parameter
<n> Socket ID, ranging from 0 to 5.
<length> Length of the data received.
<data> data received. Add 0x0d 0x0a to the end of the data. You can identify the end
based on <length>.
Example
+UDPRECV: 0,10,1234567890 10-byte of data is received on socket 0. The data is 1234567890.
Format
Type Command Response
<CR><LF>+UDPREAD: <n>,<length>,<data>
<CR><LF>OK<CR><LF>
Or
Execute AT+UDPREAD=<n>[,<length>]<CR> <CR><LF>+UDPREAD:SOCKET ID OPEN
FAILED<CR><LF>
Or
<CR><LF>+UDPREAD: ERROR<CR><LF>
Parameter
<n> Socket ID, ranging from 0 to 5.
<length> maximum length of data allowed to read, ranging from 1 to 1024.
<data> UDP data read
Example
+UDPRECV: 0
Data received on socket 0.
AT+UDPREAD=0,100
Read data.
+UDPREAD: 0,10,1234567890
The data read is 1234567890.
OK
AT+UDPREAD=1,100
No connection is set up on socket 1.
+UDPREAD: SOCKET ID OPEN FAILED
AT+UDPREAD=0,0
Parameters are set incorrectly.
+UDPREAD: ERROR
Format
Type Command Response
<CR><LF>+UDPCLOSE: <n>,OK<CR><LF>
Execute AT+UDPCLOSE=<n><CR> Or
<CR><LF>+UDPCLOSE: ERROR<CR><LF>
Parameter
<n> Socket ID, ranging from 0 to 5.
Example
AT+UDPCLOSE=1
The TCP link on socket 1 is closed successfully.
+UDPCLOSE: 1,OK
AT+UDPCLOSE=6
Socket number error
+UDPCLOSE: ERROR
Due to the characteristic of UDP, this command only queries whether a link has been established by
the command, and does not represent the true status of the link.
Format
Parameter
<STATUS> Socket type, value: CONNECT or DISCONNECT.
Example
AT+IPSTATUS=0 A TCP connection is set up on socket 0 and the buffer size is
+IPSTATUS: 0,CONNECT,TCP,4096 4096 bytes.
AT+IPSTATUS=0
Currently the UDP connection is only established on socket 0.
+IPSTATUS: 0,CONNECT,UDP,0
AT+IPSTATUS=1
No TCP or UDP connection is set up on socket 1.
+IPSTATUS: 1,DISCONNECT
AT+IPSTATU
The AT command is not complete.
ERROR
AT+IPSTATUS=6
The socket number in the command is incorrect.
ERROR
Format
Parameter
<n> Socket ID, ranging from 0 to 5.
<data_sent> Size of data successfully sent through this socket, unsigned 64-bit integer in
decimal ASCII. Unit: byte
<acked_recv> Size of data acknowledged by the receiver, unsigned 64-bit integer in decimal
ASCII. Unit: byte
Example
AT+TCPACK=0 20-byte data is transmitted from socket 0 and the receiver
+TCPACK: 0,20,20 acknowledges 20-byte data.
AT+TCPACK=0 128-byte data is transmitted from socket 0 and the
+TCPACK: 0,128,120 receiver acknowledges 120-byte data.
AT+TCPACK=1
No connection is set up on socket 1.
+TCPACK: 1,DISCONNECT
AT+TCPACK=2
A UDP connection is set up on socket 2.
+TCPACK: NO TCP LINK
AT+TCPACK=6
The socket number in the command is incorrect.
ERROR
In general, you do not have to set DNS server, which will be issued by base station during PPP
negotiation.
Format
<CR><LF>+DNSSERVER:
Query AT+DNSSERVER?<CR> dns1:<dns-ip1>;dns2:
<dns-ip2><CR><LF>
Parameter
<n> DNS server number
1: primary DNS server
2: secondary DNS server
Example
AT+DNSSERVER=1,114.114.114.114 Set the DNS.
OK
AT+DNSSERVER?
Query the DNS.
+DNSSERVER: dns1:114.114.114.114;dns2:0.0.0.0
Format
<CR><LF>+CMEE: <n>
Query AT+PDPKEEPALIVE?<CR>
<CR><LF>OK<CR><LF>
Parameter
<onoff> Heartbeat switch
0: disable (default)
1: enable
<inerval> Heartbeat interval, unit:s, ranging from 1 to 65535.
Example
AT+PDPKEEPALIVE? Query the heartbeat setting.
+PDPKEEPALIVE: 1,5
OK
AT+PDPKEEPALIVE=1,60 Enable the heartbeat function; set its interval to 60s.
OK
If PDP keepalive heartbeat is disabled, the status is returned after a delay (200 ms to 10000 ms,
depending on network conditions).
Format
Parameter
<status> CONNET
DISCONNECT
PSEUDO_CONNECT
Example
AT+PDPSTATUS PDP connected
+PDPSTATUS: CONNECT
AT+PDPSTATUS PDP disconnected
+PDPSTATUS: DISCONNECT
AT+PDPSTATUS PDP activated, but in pseudo_connect state
+PDPSTATUS: PSEUDO_CONNECT
The settings by this command are not saved after the module is powered off. Execute this command
before setting up a TCP connection. It is valid for all connections. DO NOT send it after establishing a
TCP connection.
Format
<CR><LF>+TCPKEEPALIVE:
Query AT+TCPKEEPALIVE? <CR> <mode>,<time>,<interval>,<keepcount>
<CR><LF>OK<CR><LF>
<CR><LF>+TCPKEEPALIVE: (range of
supported <mode>),(range of supported
Test AT+TCPKEEPALIVE=?<CR> <time>),(range of supported <interval>),(range of
supported <keepcount>)
<CR><LF>OK<CR><LF>
Parameter
<mode> 0: disable
1: enabled
<time> Interval for which the TCP is idle before the module sends the KEEPALIVE packet
to the remote server.
A value between 30 seconds to 7200 seconds is recommended and the default
value is 120 seconds.
<interval> Interval for the module to resend the KEEPALIVE packet since it sends last time
and
does not receive response. The value ranges from 1s to 1800s, and the default
value is 75s.
<keepcount> Count of retransmissions, ranging from 1 to 15, and the default value is 9.
⚫ The <time> for sending heartbeat packets varies with the network environment. Set <time> according to the
network environment. If the value of < time> is too large, the terminal may have a false connection, and the
<interval> time exceeds <time> will not be resent; if the values of <time> and <interval> are too short, the
terminal may disconnect due to the hibernation mechanism of the module air port. If the interval is too short
and multiple heartbeat packets are sent during the hibernation period, the heartbeat packets will be sent out
together after waking up. The receiving side thinks that the sticky packet data is invalid and does not reply
to the acknowledgement message, and if the terminal does not receive the acknowledgement message
several times, it thinks that the connection is invalid and disconnects actively.
⚫ Recommended ranges:
Example
AT+TCPKEEPALIVE=1 Enable the KEEPALIVE function.
OK
⚫ The UART does not display the data transmitted to the server after the transparent TCP connection is set up
successfully.
⚫ Use +++ to switch the server to the command mode and ATO to switch it to the data mode.
⚫ Do not establish non-transparent data services when using the transparent command, since the transparent
command conflicts with other non-transparent data services.
⚫ The module exits from the transparent connection if a call or message is incoming.
⚫ At most 2048-byte data can be sent or received per packet in transparent mode.
⚫ To make the settings take effect, <cfgt> and <cfgp> are required to be set simultaneously.
⚫ TCP data can be transparently transmitted after the TCP connection is set up successfully and
+TCPTRANS:OK is returned.
Format
Parameter
<ip> destination IP address, in form of xx.xx.xx.xx or www.xxxxxx.com (domain name
with or without quotation marks).
<port> Destination port ID in decimal ASCII code.
<cfgt> Time to wait per packet sent, ranging from 1 to 65535, 100 by default, unit:ms.
<cfgp> Threshold value of data packet to be transmitted, ranging from 1 to 2048.
Example
AT+TCPTRANS=neowayjsr.oicp.net,60010
OK Set up a connection to neowayjsr.oicp.net, 60010.
Successfully.
+TCPTRANS:OK
AT+TCPTRANS=220.199.66.56,6800
OK Set up a connection to neowayjsr.oicp.net, 6800.
Failed, because the port number 6800 is out of range.
+TCPTRANS:FAIL
ERROR is returned after the command is executed because
AT+TCPTRANS=220.199.66.56,6800
a transparent (TCP, UDP, TCP server) connection is
ERROR
already set up.
AT+TCPTRANS=220.199.66.56,
The command format is incorrect.
+TCPTRANS:ERROR
+TCPTRANS: Link Closed The connection is closed passively.
⚫ The UART does not display the data transmitted to the server after the transparent UDP connection is set
up successfully.
⚫ Use +++ to switch the server to the command mode and ATO to switch it to the data mode.
⚫ Do not establish non-transparent data services when using the transparent command, since the transparent
command conflicts with other non-transparent data services.
⚫ The module exits from the transparent connection if a call or message is incoming.
⚫ At most 2048-byte data can be sent or received per packet in transparent mode.
⚫ To make the settings take effect, <cfgt> and <cfgp> are required to be set simultaneously.
⚫ UDP data can be transparently transmitted after the UDP connection is set up successfully and
+UDPTRANS:OK is returned.
Format
Parameter
<ip> destination IP address, in form of xx.xx.xx.xx or www.xxxxxx.com (domain name
with or without quotation marks).
<port> Destination port ID in decimal ASCII code.
<cfgt> Time to wait per packet sent, ranging from 1 to 65535, 100 by default, unit:ms.
<cfgp> Threshold value of data packet to be transmitted, ranging from 1 to 2048.
The default value is 2048.
<ip> destination IP address, in form of xx.xx.xx.xx or www.xxxxxx.com (domain name
with or without quotation marks).
<result> Result codes
OK
FAIL
Example
AT+UDPTRANS=220.199.66.56,6800
Set up a transparent UDP connection.
OK
Successfully.
+UDPTRANS: OK
AT+UDPTRANS=neowayjsr.oicp.net,60010
OK Set up a transparent UDP connection by using domain name
Successfully.
+UDPTRANS:OK
AT+UDPTRANS=220.199.66.56,
The command format is incorrect.
ERROR
ERROR is returned after the command is executed because
AT+UDPTRANS=220.199.66.56,6800
a transparent (TCP, UDP, TCP server) connection is
+UDPTRANS: ERROR
already set up.
Format
Parameter
<data_send> Size of data successfully sent transparently through this socket, unsigned 64-bit
integer in decimal ASCII. Unit: byte
<acked_recv> Size of data successfully acknowledged transparently by the receiver, unsigned
64-bit integer in decimal ASCII. Unit: byte
Example
AT+TCPACK 1024-byte data is transmitted from socket 0 and the receiver acknowledges
+TCPACK: 1024,1024 1024-byte data.
AT+TCPACK
No transparent connection is set up.
+TCPACK: DISCONNECT
AT+TCPACK
Only a transparent UDP connection is established.
+TCPACK: NO TCP LINK
Format
Parameter
<state> Connection status
CONNECT
DISCONNECT
<type> Connection type (optional)
TCP
UDP
<send-buffer-size> The size of the available send buffer on the module, in decimal ASCII mode.
Unit: byte. (Optional)
Example
AT+IPSTATU
The AT command is not complete.
ERROR
AT+IPSTATUS The transparent TCP connection is set up, and the available
+IPSTATUS:CONNECT,TCP,61440 buffer size is 61440 bytes.
AT+IPSTATUS A transparent UDP connection is established, and the
+IPSTATUS:CONNECT,UDP,61440 available buffer size is 61440 bytes.
AT+IPSTATUS
No transparent connection is set up.
+IPSTATUS:DISCONNECT
Format
Parameter
<n> 0: close the transparent TCP connection.
1: close the transparent UDP connection.
Example
AT+TRANSCLOSE
Actively close the transparent TCP connection.
+TRANSCLOSE: 0,OK
AT+TRANSCLOSE
Fail to set up a transparent TCP/UDP connection.
ERROR
AT+TRANSCLOSE
Proactively close the transparent UDP connection.
+TRANSCLOSE: 0,OK
Successful
+TCPTRANS:Link Closed The transparent TCP connection is closed passively.
+UDPTRANS:Link Closed The transparent UDP connection is closed passively.
7 FTP Commands
⚫ The FTP functions cannot be used together with the internal protocol stack TCP/UDP function.
⚫ Before performing the FTP operation, you need to log in to the FTP server.
Format
URC +FTPLOGIN:<result>
Parameter
<ip> IP address of the FTP server.
<port> Port number of the FTP server; generally it is 21.
<user> User name used to log in to the FTP server. Its length cannot be larger than 100
ASCII codes and it cannot contains any comma.
<pwd> Password used to log in to the FTP server. Its length cannot be larger than 100
ASCII codes and it cannot contains a comma.
<ftpmode> FTP mode:
0: PASV (passive mode, default)
1: PORT (active mode)
Example
AT+FTPLOGIN=219.134.179.52,21,user1,pwd2009
OK
Log in to the server.
+FTPLOGIN: FAIL
+FTP:Server Control Link Disconnect The FTP control link closes.
+FTP: Server Data Link Disconnect The FTP data link closes.
Format
Example
AT+FTPLOGOUT
Exit from the FTP server.
+FTPLOGOUT:User logged out
OK
AT+FTPLOGOUT
+CME ERROR: INVALID SOCKET ID
Log out of the FTP server because the FTP server is offline.
ERROR
Format
Parameter
<dir&filename> Path and name of the file to be read. The file path is relative to the FTP root
path.
<type> File transmission mode
1: ASCII
2: Binary
<Content or Info> File content or file (or specified directory) information
1: Obtain the file content
2: Obtain the information of the file or the specified path
<offset> Specifies offset of file content.
<lenth> Length of file downloaded from the start point, ranging from 1 to 8192
<length> Data length
<data> Data content
<n> The module reads data successfully and the data length is n.
Example
AT+FTPGET=,1,2
OK
Format
⚫ In transparent mode, after data is transmitted completely, you can execute +++ (excluding <CR><LF>) to
end the upload process.
⚫ Executing +++ (excluding <CR><LF>) can end the upload process anytime.
Parameter
<filename> Name of the file to be uploaded.
The file path is relative to the FTP root path.
<type> File transmission mode
1: ASCII
2: Binary
<mode> Operating mode
1: STOR mode Create a file in the server and write data into the file; if the file exists
already, overwriting the original file.
2: APPE mode Create a file in the server and write data into the file; if the file exists
already, write the data at the end of the file.
3: DELE mode Delete a file.
<size> Data length, ranging from 1 to 8192. Transparent mode is used if this parameter is
omitted.
<n> Length of the file sent.
⚫ +FTPPUT: AT Busy: Last FTP-related AT command has not been executed completely.
⚫ Executing +++ (excluding <CR><LF>) to exit from transparent mode and end the uploading.
⚫ If the file you upload over a connection in transparent mode is large, the port will be occupied all the time
that affects the sending and receiving of other commands. So, it is recommended to transmit files in buffer
mode; when you need to send large files, use APPE mode to send them in segment.
Example
AT+FTPPUT=test.txt,1,1,10 Upload the 10-byte test.txt file in ASCII mode and the operation is
> 1234567890 in STOR mode.
+FTPPUT:OK,10
AT+FTPPUT=test.txt,1,2,10 Upload the 10-byte test.txt file in ASCII mode and the operation is
> 1234567890 in APPE mode.
+FTPPUT:OK,10
AT+FTPPUT=test.txt,1,3,0 Delete the test.txt file.
+FTPPUT:Delete File OK
AT+FTPPUT=test.txt,1,1
CONNECT Transparent mode, upload the 10-byte test.txt file in ASCII mode and
1234567890 the operation is in STOR mode.
+FTPPUT:OK,10
AT+FTPPUT=test.txt,1,2
CONNECT Transparent mode, upload the 10-byte test.txt file in ASCII mode and
1234567890 the operation is in APPE mode.
+FTPPUT:OK,10
AT+FTPPUT=test.txt,1,3
Transparent mode; delete the test.txt file.
+FTPPUT:Delete File OK
Format
Parameter
<filename> Name of the file to be uploaded.
<size> The actual file size
Example
AT+TPSIZE=test_500k.txt
+FTPSIZE: 512000 The file size is 512000 bytes.
OK
AT+FTPSIZE=test.txt
The queried file is inexistent.
+FTPSIZE: File Not Found
AT+FTPSIZE=test_500.txt,100
The format of the AT command is incorrect
ERROR
Format
Parameter
<status> 0: FTP connection is not set up.
1: FTP connection is set up.
<ip> IP address of the FTP server.
<port> Port number of the FTP server.
Example
Query the FTP link status.
AT+FTPSTATUS
Set up an FTP link, and display the IP address and port
+FTPSTATUS:1,119.139.221.66,21
ID of the server.
AT+FTPSTATUS Query the FTP link status.
+FTPSTATUS:0,0.0.0.0,21 The FTP connection is not set up yet.
8 HTTP/HTTPS Commands
Format
Parameter
<para> HTTP parameters, supporting the following parameters:
url: destination address
port: destination port ID (no default value)
keepalive: used to set the HTTP long connection.
When para_value=0 (default), the long connection is disabled.
When para_value=1, the long connection is enabled.
recvmode: Receive mode:
para_value=0 indicates receive mode by default; one HTTP response only
contains one +HTTPPRECV: header identification; para_value=1 indicates data
is displayed in the +HTTPRECV: <length>,<data> format.
<para_value> The value of the <para>, 2048 bytes at most for url; 443 by default for port.
Example
Setthe Neoway homepage as the URL. The URL
AT+HTTPPARA=url,”www.neoway.com.cn/en/index.aspx”
supports domain name translation.
OK
OK
⚫ An HTTP connection is set up successfully only after the destination address and port ID are set correctly.
⚫ Before setting up an HTTP Connection, ensure that a dial-up connection (AT+XIIC=1) is set up
successfully.
Format
Parameter
N/A.
Example
AT+HTTPSETUP Set up an HTTP connection.
OK Successful
AT+HTTPSETUP Set up an HTTP connection.
+HTTPSETUP: FAIL Failed
Format
Parameter
<mode> HTTP request mode
0: GET
1: HEAD
2: POST
99: OPEN_MODE, custom packet mode
<length> The length of the POST content or user-defined packet length, maximum value
2048.
<type> POST request data type.
0: x-www-form-urlencoded
1: text
2: json
3: xml
4: html
<offset> Offset in GET mode. Specify the starting location of the download.
<size> Size of file to be downloaded in GET mode.
⚫ Add a carriage return to the end of the packets if the HTTP request is set to custom packet mode.
Example
AT+HTTPPARA=url,”www.neoway.com.cn/en/index.aspx” Set the destination address. The
OK default port is 80.
AT+HTTPSETUP
OK Set up an HTTP connection.
AT+HTTPACTION=0
OK GET request
+HTTPRECV:
+HTTPRECV:
HTTP/1.1 200 OK Receive the response from the HTTP
Cache-Control: private, max-age=0 server.
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 28 Nov 2013 03: 41: 52 GMT
Connection: close
Content-Length: 98
OK
Format
Parameter
<result> HTTP Link Closed: HTTP link is closed
⚫ After the +HTTPCLOSE command is sent, the HTTP socket is closed and the setting of +HTTPPARA is
cleared.
⚫ Only OK is returned after running this command if the HTTP socket is not connecting.
Example
AT+HTTPCLOSE
OK
Close the HTTP connection.
Format
Type Command
<CR><LF>+HTTPRECV: <datas>
URC
<CR><LF>+HTTPRECV: <length>,<datas>
Parameter
<length> Data length.
<datas> Data received from the HTTP/HTTPS connection.
Example
+HTTPRECV: HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 13842
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=pvlaai3fizxg44eyvyqsyenk; path=/;
HttpOnly Receive data from the HTTP
X-AspNet-Version: 2.0.50727 connection.
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Thu, 28 Nov 2013 05:40:24 GMT
Connection: close
<!DOCTYPE
⚫ This is an asynchronous command. OK is returned immediately after the command is executed. The
downloading, decompressing, and verification processes are done in background.
⚫ When <check_type> and <check_value> are ignored, no verification will be performed after the download
is complete.
⚫ When setting <dir_mode>, the <check_type> and <check_value> parameters can be omitted. The external
flash should be initialized by +NWYSPIFLASH first.
⚫ The downloading, decompressing, and verification results are reported through +HTTPGETSTAT. For
details, see its definitions.
Format
Parameter
<type> Decompression type
0: unzip (default)
1: zip (unsupported)
2 to 99: reserved.
<check_type> Type of checking the integrity of compressed passage.
0: MD5 (default)
1 - 99: reserved
<check_value> Check code, used with <check_type>.
<dir_mode> Select the storage location
0: local (default)
1: external flash
Example
AT+HTTPPARA=url, mybank.icbc.com.cn/icbc/perbank/index.jsp Download file
OK
AT+HTTPGET=0
OK
+HTTPGETRPT: 10
AT+HTTPGET=1
OK
+HTTPGETRPT: 20
AT+HTTPGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+HTTPGETRPT: 30,303
AT+HTTPGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+APHTTPGETRPT: 31
⚫ Different result codes are reported according different results during downloading, verification, and
decompression processes.
Format
Type Command
URC <CR><LF>+HTTPGETRPT: <state_type>[,<err_code>]<CR><LF>
Parameter
<state_type> Status type
10: successful download
11: failed download
20: successful decompression
21: failed decompression
30: successful verification
31: failed verification
<err_code> Error response encountered during HTTP GET.
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
Example
AT+HTTPPARA=url, mybank.icbc.com.cn/icbc/perbank/index.jsp Download the file.
AT+HTTPGET=0
OK
+HTTPGETRPT: 10
AT+HTTPGET=1
OK
+HTTPGETRPT: 20
AT+HTTPGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+HTTPGETRPT: 30,303
AT+APHTTPGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+APHTTPGETRPT: 31
Format
Parameter
<state_type> Status type
0: unknown result
10: successful download
11: failed download
20: successful decompression
21: failed decompression
30: successful verification
31: failed verification
<err_code> Error response encountered during HTTP GET.
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Payload Too Large
414 URI Too Long
Example
AT+HTTPGET=0
OK
AT+HTTPGETSTAT?
+HTTPGETSTAT: 10
OK
AT+APHTTPGET=1
+HTTPGETSTAT: 30
OK
Format
Type Command
URC <CR><LF>+HTTPCLOSED: HTTP Link Closed<CR><LF>
Parameter
N/A.
Example
+HTTPCLOSED: HTTP Link Closed The HTTP connection closes.
Format
<CR><LF>+HTTPSCFG:<sslversion>,<authmode>,
Query AT+HTTPSCFG?<CR> <cacert>,<clientcert>,<clientkey>
<CR><LF>OK<CR><LF>
<CR><LF>+HTTPSCFG:<type>,<type_name>
Test AT+HTTPSCFG=?<CR>
<CR><LF>OK<CR><LF>
Parameter
<type> SSL parameter options
sslversion: SSL protocol version
authmode: authentication mode
cacert: CA certificate.
clientcert: Client certificate
clientkey: Client key
sni: extended option of TLS Server Name Indication
<type_name> Settings for SSL parameter, the relations between the <type> and <type_name>
values are as follows:,
sslversion
0: SSL3.0
1: TLS1.0
2: TLS1.1
3: TLS1.2
authmode
0: No authentication
1: Manage server authentication
2: Manage server and client authentication if requested by the remote server
cacert: string type, CA certificate
clientcert: string type, client certificate
clientkey: string type, client key
sni
0: disable
1: enabled
If the authmode is set to 0, you do not have to set other parameters, such as cacert, clientcert, and clientkey.
Example
AT+HTTPSCFG=”sslversion”,0 Set the SSL version to SSL3.0.
OK
AT+HTTPSCFG =”authmode”,0 Set the authentication mode to no authentication.
OK
AT+HTTPSCFG=”cacert”,ca.pem Set the name of the CA certificate (adding the certificate
OK in advance is required).
AT+HTTPSCFG? Query the current SSL settings.
+HTTPSCFG: 0,1,ca.pem,cc.pem,ck.pem
OK
AT+HTTPSCFG=? Query the available parameter value ranges.
+HTTPSCFG: <type>,<type_name>
OK
Format
Parameter
<para> HTTPS parameters, supporting the following two parameters:
url: destination address
port: destination port ID
keepalive: used to set the long-time connection.
recvmode: Receive mode:
para_value=0 indicates receive mode by default; one HTTP response only
contains one +HTTPPRECV: header identification; para_value=1 indicates data
⚫ After the +HTTPSCLOSE command is sent, the connection is closed and parameter settings will not be
cleared.
Example
Set the ICBC homepage as the URL.
AT+HTTPSPARA=url,mybank.icbc.com.cn/icbc/perbank/index.jsp
The URL supports domain name
OK
resolution.
AT+HTTPSPARA=url,132.188.73.13/prodreg/beginRegistration.action Set the destination address to
OK 132.188.73.13.
AT+HTTPSPARA=port,443
Set the destination port to 443.
OK
⚫ An HTTP connection is set up successfully only after the destination address and port ID are set correctly.
⚫ Before setting up an HTTP Connection, ensure that a dial-up connection (AT+XIIC=1) is set up
successfully.
Format
Parameter
N/A.
Example
AT+HTTPSSETUP Set up an HTTPS connection.
OK Successful
AT+HTTPSSETUP
The FTP connection is established.
+HTTPSSETUP: OK
AT+HTTPSSETUP Set up an HTTPS connection.
ERROR Successful
Format
Parameter
<mode> HTTPS request mode
0: GET
1: HEAD
2: POST
99: OPEN_MODE, custom packet mode
<length> The length of the POST content or user-defined packet length, maximum value
2048. This parameter cannot be omitted when <mode> is set to POST or
OPEN_MODE.
<type> POST request data type.
0: x-www-form-urlencoded
1: text
2: json
3: xml
4: html
<offset> Offset in GET mode. Specify the starting location of the download.
⚫ When using user-defined packet, pay attention to whether the tool you are using comes with carriage return
and line feed characters.
Example
AT+HTTPSPARA=url,support.cdmatech.com/login/
Set the destination path.
OK
AT+HTTPSPARA=port,443
Set the destination port to 443.
OK
AT+HTTPSSETUP
To set up an HTTPS connection.
OK
AT+HTTPSACTION=0
OK
GET request
+HTTPSRECV:
HTTP/1.1 200 OK
Receive the response from the HTTPS
Server: QUALCOMM
server.
X-Powered-By: Servlet/2.5 JSP/2.1
Content-Type: text/html; charset=ISO-8859-1
Date: Sat, 15 Feb 2014 05:58:54 GMT
Content-Length: 7630
Connection: close
Set-Cookie:
JSESSIONID=8V1dS1CpzlPcyNl2LzJZLQgDxWclpMJzP3FHZhVhpGb83G
VM02sn!1955538012; path=/; HttpOnly
/*home page, html format*/
……..
The server finishes the response and
/*Homepage content*/
disconnects the connection.
+HTTPSCLOSED: HTTPS Link Closed
AT+HTTPSPARA=url,support.cdmatech.com/login/
OK
AT+HTTPSPARA=port,443
OK
AT+HTTPSSETUP
Set the destination path.
OK
AT+HTTPSACTION=1
Set the destination port to 443.
OK
+HTTPSRECV:
/*home page, html format*/
……..
/*Homepage content*/
+HTTPSCLOSED: HTTPS Link Closed
After the +HTTPSCLOSE command is sent, the HTTPS socket is closed and the setting of +HTTPPARA is kept.
Format
Parameter
<state> HTTPS Link Closed Close the HTTPS connection.
Example
AT+HTTPSCLOSE
OK
Close the HTTPS connection.
Format
Type Command
<CR><LF>+HTTPSRECV: <CR><LF><datas>
URC
<CR><LF>+HTTPSRECV: <length>,<datas>
Parameter
<datas> Data received from the HTTP/HTTPS connection.
<length> Length of the data received.
Example
+HTTPSRECV:
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 13842
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=pvlaai3fizxg44eyvyqsyenk; path=/; Data received over the HTTPS
HttpOnly connection.
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Thu, 28 Nov 2013 05:40:24 GMT
Connection: close
Format
Parameter
<type> Decompression type
0: unzip (default)
1: zip (unsupported)
2 - 99: reserved
<check_type> Type of checking the integrity of compressed passage.
0: MD5 (default)
1 - 99: reserved
<check_value> Check code, used with <check_type>.
⚫ This is an asynchronous command. OK is returned immediately after the command is executed. The
downloading, decompressing, and verification processes are done in background.
⚫ When <check_type> and <check_value> are ignored, no verification will be performed after the download
is complete.
⚫ When setting <dir_mode>, the <check_type> and <check_value> parameters can be omitted. The external
flash should be initialized by +NWYSPIFLASH first.
⚫ The downloading, decompressing, and verification results are reported through +HTTPGETSTAT. For
details, see its definitions.
Example
AT+HTTPSPARA=url, mybank.icbc.com.cn/icbc/perbank/index.jsp Download the file.
OK
AT+HTTPSGET=0
OK
+HTTPSGETRPT: 10
AT+HTTPSGET=0,0,eaf84487e190bc79af55c972bbc63e3f
OK
+HTTPSGETRPT: 30,303
AT+HTTPSGET=0,0,eaf84487e190bc79af55c972bbc63e3f
OK
+APHTTPSGETRPT: 31
AT+HTTPSGET=0,,,1 Download the file to the
OK external flash. No
verification.
+HTTPSGETRPT: 10
⚫ Different result codes are reported according different results during downloading, verification, and
decompression processes.
Format
Type Command
URC <CR><LF>+HTTPSGETRPT: <state_type>[,<err_code>]<CR><LF>
Parameter
<state_type> Status type
10: successful download
11: failed download
20: successful decompression
21: failed decompression
30: successful verification
31: failed verification
<err_code> Error response encountered during HTTP GET.
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Payload Too Large
414 URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
Example
AT+HTTPSPARA=url, mybank.icbc.com.cn/icbc/perbank/index.jsp Download the file.
OK
AT+HTTPSGET=0
OK
+APHTTPSGETRPT: 10
AT+HTTPSGET=1
OK
+HTTPSGETRPT: 20
AT+HTTPSGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+HTTPSGETRPT: 30,303
AT+HTTPSGET=1,0,eaf84487e190bc79af55c972bbc63e3f
OK
+HTTPSGETRPT: 31
Format
Parameter
<state_type> Status type
0: unknown result
10: successful download
11: failed download
20: successful decompression
21: failed decompression
30: successful verification
Example
AT+HTTPSGET=0
OK
AT+HTTPSGETSTAT?
+HTTPSGETSTAT: 10,303
OK
AT+APHTTPSGET=1
OK
+HTTPSGETSTAT: 30,303
OK
⚫ Before downloading files through HTTP GET, ensure that there are enough remaining space in the file
system.
Format
Parameter
<mode> HTTP request mode
0: GET
1: POST
<length> Length of the POST content, supports 524288 bytes at most.
<type> POST request data type.
0: x-www-form-urlencoded
1: text
2: json
3: xml
4: html
<offset> Offset in GET mode. Specify the starting location of the download.
<size> Length of file downloaded in GET method. Generally, the maximum value of
<size> is 524288. When an external flash is connected, the value of <size>
Example
AT+FILEHTTPACTION=0,0,524288 Read 512 KB data starting from the first byte.
OK
The 512 KB data is downloaded successfully.
+FILEHTTPSTAT: 0,1,524288
AT+FILEHTTPACTION=1,524288,0,text.txt The file with 524288 data length
OK
is posted successfully.
+FILEHTTPSTAT: 1,1,524288
AT+FILEHTTPACTION=0,0,524288 Failed command execution. 1001 indicates PDP not active.
+CME ERROR: 1001
⚫ Before downloading files through HTTP GET, ensure that there are enough remaining space in the file
system.
Format
Parameter
<mode> HTTP request mode
0: GET
1: POST
<length> Length of the POST content, supports 524288 bytes at most.
<type> POST request data type.
0: x-www-form-urlencoded
1: text
2: json
3: xml
4: html
<offset> Offset in GET mode. Specify the starting location of the download.
<size> Size of file to be downloaded in GET mode. The value supports 524288 bytes at
most.
<dir&filename> Path and name of the file needed. The file path is relative to the root path of the file
<errcode> system.
The corresponding values of A and B are as follows:
49 -- The Execute Command Not Support
51 -- No Memory
53 -- Parameters are Invalid
66 -- File too Large
300 -- Netif is Error
301 -- HTTPACTION is Needed First
303 -- HTTPPARA CID Invalid
1001 -- PDP Not Active
<errtext> See the description in <errcode>.
Example
AT+FILEHTTPSACTION=0,0,524288 Read 512 KB data starting from the first byte.
OK
The 512 KB data is downloaded successfully.
+FILEHTTPSTAT: 0,1,524288
AT+FILEHTTPSACTION=1,524288,0,text.txt The file with 524288 data length
OK
is posted successfully.
+FILEHTTPSTAT: 1,1,524288
AT+FILEHTTPSACTION=0,0,524288 Failed command execution. 1001 indicates PDP not active.
+CME ERROR: 1001
Format
Type Command
<CR><LF>+FILEHTTPSTAT: <mode>,<stat>[,<length>]<CR><LF>
URC
<CR><LF>+FILEHTTPSTAT: <stat>,<errcode><CR><LF>
Parameter
<mode> HTTP(S) request type
0: HTTP(S) GET
1: HTTP(S) POST
<stat> Downloading/uploading result code
0: Downloading/uploading failed
1: Downloading/uploading successful
<length> Length of file downloaded/uploaded, unit: byte.
Example
AT+FILEHTTPSACTION=0,0,524288 Read 512 KB data starting from the first byte.
OK
The 512 KB data is downloaded successfully.
+FILEHTTPSTAT: 0,1,524288
is posted successfully.
+FILEHTTPSTAT: 1,1,524288
Format
Type Command
URC <CR><LF>+HTTPSCLOSED: Link Closed <CR><LF>
Parameter
N/A.
Example
+HTTPSCLOSED: HTTPS Link Closed The HTTPS connection is disconnected.
9 Wi-Fi Function
Format
Parameter
<MAC Address> Physical address
<rssi> signal strength.
<channel> Channel number
Example
AT+WIFIAPSCAN Start to scan hotspot and output all the scanning results.
+WIFIAPSCAN: ec6c9f4be889,-93,1
+WIFIAPSCAN: ec6c9f4be880,-99,1
+WIFIAPSCAN: ec6c9f4be87a,-96,1
OK
Before positioning, you need to scan Wi-Fi hot spot and then make a dial-up connection.
Format
Parameter
<fail_string> GPRS DISCONNECTION
ERROR
LINK NOT FREE
<result_string> String containing latitude and longitude
<code> 401: Unauthorized
400: Bad Request
404: Not Found
408: Request Timeout
500: Server Error
Example
AT+WIFIGSMLOC=1+WIFIGSMLOC: Positioning successfully.
{"location":{"lat":34.2060764,"lng":108.8360664},"accuracy":50.0}
+WIFIGSMLOC: OK
Format
<CR><LF>+SSLTCPCFG:<sslversiontype_name>,<authmo
detype_name>,<ciphersuitetype_name>,<cacerttype_name>
Query AT+SSLTCPCFG?<CR>
,<clientcerttype_name>,<clientkeytype_name>
<CR><LF>OK<CR><LF>
<CR><LF>+SSLTCPCFG: <type>,<type_name>
Test AT+SSLTCPCFG=?<CR>
<CR><LF>OK<CR><LF>
Parameter
<type> SSL parameter options
sslversion: SSL protocol version
authmode: authentication mode
ciphersuite: Cupher cuite
cacert: CA certificate
clientcert: Client certificate
clientkey: Client key
<type_name> Settings for SSL parameter, the relations between the <type> and <type_name>
values are as follows:,
⚫ sslversion
0: SSL3.0
1: TLS1.0
2: TLS1.1
3: TLS1.2
⚫ authmode
0: no authentication, indicating you do not have to set other parameters, such
as cacert, clientcert, and clientkey.
1: Manage server authentication
2: Manage server and client authentication if requested by the remote server
⚫ ciphersuite: reserved.
⚫ cacert: string, CA certificate
⚫ clientcert: string, client certificate
⚫ clientkeyClientkey: string, client key
Example
AT+SSLTCPCFG=”sslversion”,0
Set the SSL version to SSL3.0.
OK
AT+SSLTCPCFG=”authmode”,0
Set the authentication mode to no authentication.
OK
AT+SSLTCPCFG?
+SSLTCPCFG:0,1,ca.pem,cc.pem,ck.pem Query the current SSL settings.
OK
AT+SSLTCPCFG=?
+SSLTCPCFG: <type>,<type_name> Query the available parameter value ranges.
OK
Do not establish non-transparent data services when using the transparent command, since the
transparent command conflicts with other non-transparent data services.
Format
<CR><LF>+SSLTCPSETUP: <socket_id>,<ip>,
<port>,<mode>
Query AT+SSLTCPSETUP? [<CR><LF>+SSLTCPSETUP: <socket_id>,<ip>,
<port>,<mode>]…
<CR><LF>OK<CR><LF>
<CR><LF>+SSLTCPSETUP:<socket_id>,<ip>,<port>,
Test AT+SSLTCPSETUP=?
<mode><CR><LF>
Parameter
<n> socket ID, ranging from 0 to 5, used to identify the connection to the server.
<ip> IP address or domain name of the server.
<port> server port.
<mode> transmission mode
0: non-transparent
1: transparent
<status> OK
ERROR1
AUTHFAIL
FAIL
Example
AT+SSLTCPSETUP=0,183,239.240,45,4451,0
OK Set up a non-transparent connection to 183.239.240.45
on socket 0. The port number is 4451.
+SSLTCPSETUP: 0,OK
AT+SSLTCPSETUP=0,183,239.240,45,4451,1 Set up a non-transparent connection to 183.239.240.45
CONNECT on socket 0. The port number is 4451.
AT+SSLTCPSETUP=0,183,239.240,45,4451,0
Set up a non-transparent connection to 183.239.240.45
OK
on socket 0. The port number is 4451.
Fails because of timeout.
+SSLTCPSETUP: 0,FAIL
AT+SSLTCPSETUP=0,183,239.240,45,4451,0
Set up a non-transparent connection to 183.239.240.45
OK
on socket 0. The port number is 4451.
Failed to authenticate.
+SSLTCPSETUP: 0,AUTHFAIL
AT+SSLTCPSETUP?
Query the connection status.
+SSLTCPSETUP: 0,183.239.240.45,4451,0
A transparent TCP connection has been set up on socket
+SSLTCPSETUP: 1,183.239.240.45,4452,0
0 and socket 1.
OK
Format
Parameter
<n> socket ID, ranging from 0 to 5.
<result> OK
ERROR
Link Closed
Example
AT+SSLTCPCLOSE=0
Close the TCP connection on socket 0.
+SSLTCPCLOSE: 0,OK
AT+SSLTCPCLOSE=0
The TCP connection on socket 0 is closed.
+SSLTCPCLOSE: ERROR
+SSLTCPCLOSE: 0,Link Closed The TCP connection on socket 0 is closed.
Format
Parameter
<socket> ranging from 0 to 5, used to identify the connection to the server.
<data_length> data length, ranging from 1 to 4096.
<result> OK
FAIL
Example
AT+SSLTCPSEND=0,20
> Send 20-byte data to the server through socket 1.
+SSLTCPSEND: 0,OK
AT+SSLTCPSEND=0,1024
> Failed to send.
+SSLTCPSEND: 0,FAIL
AT+SSLTCPSEND=0,4097 Send 4097-byte data to the server through socket 0.
+SSLTCPSEND: Data length error Fail because buffer is full.
AT+SSLTCPSEND=?
+SSLTCPSEND: (0-5),(1-4096) Query the value range of the parameters.
OK
Format
Type Command
URC <CR><LF>+SSLTCPRECV: <socket_id>,<data_length>,<data><CR><LF>
Parameter
<socket_id> ranging from 0 to 5, used to identify the connection to the server. This value shall
be the same with the socket value set in the SSLTCPSETUP command.
Example
+SSLTCPRECV: 1,20,12345678901234567890 Receive 20-byte data over socket 0.
Format
Parameter
<file_name> Name of the certificate written to the module
<length> Certificate file name
Example
AT+CERTADD=ca_cert.pem,1428
CONNECT Write the 1428-byte ca_cert.pem certificate to the module.
+CERTADD: 1428,OK
AT+CERTADD=client_cert.pem,1938
CONNECT Write a 1938-byte client_cert.pem certificate to the module.
+CERTADD: 1938,OK
AT+CERTADD=client_key.pem,1097
CONNECT Write a 1097-byte client_cert.pem certificate to the module.
+CERTADD: 1097,OK
Format
<CR><LF><file_name>
Query AT+CERTCHECK?<CR> [<CR><LF><file_name>]
<CR><LF>OK<CR><LF>
Parameter
<file_name> Certificate file name to be confirmed.
Example
AT+CERTCHECK=ca_cert.pem
Check the ca_cert.pem certificate.
+CERTCHECK: ca_cert.pem,OK
AT+CERTCHECK=client_cert.pem
Check the client_cert.pem certificate.
+CERTCHECK: client_cert.pem,OK
AT+CERTCHECK=client_key.pem
The client_key.pem certificate does not exist.
+CERTCHECK: ERROR
AT+CERTCHECKT?
cacert.pem
Query the added file.
keycert.pem
OK
Format
Parameter
<file_name> Certificate file name to be deleted.
Example
AT+CERTDEL=ca_cert.pem
Delete the ca_cert.pem certificate.
OK
AT+CERTDEL=client_cert.pem
Delete the client_cert.pem certificate.
OK
AT+CERTDEL=client_key.pem
Delete the client_key.pem certificate.
OK
AT+CERTDEL
Delete all the added certificates.
OK
Before configuring the SSL encryption options, you need to import the certificate in advance.
Use the AT+CERTADD command to import the certificate. The certificate can be set to null.
Format
Parameter
<sslversion> SSL protocol version
0: SSL3.0
1: TLS1.0
2: TLS1.1
3: TLS1.2
<authmode> authentication mode
0: No authentication
1: Require authentication server
2: Two-way authentication
<cacert> CA certificate.
<clientcert> Client certificate
<clientkey> Client key
Example
AT+SSLTCPCFGA=3,1,"ca.pem","","" Set TLS1.2.
OK Verifying the server is required.
Set the CA certificate to ca.pem.
Other certificates are null.
Format
Parameter
<n> Socket ID, ranging from 0 to 5.
<length> Length of data read, ranging from 1 to 2048.
<len> The length of data read.
<data> data read
Example
AT+SSLTCPSETUP=0,58.60.184.213,12004,0
OK Data received on socket 0.
+SSLTCPSETUP: 0,OK Read data.
AT+SSLTCPSEND=0,10 The data read is 1234567890.
>
+SSLTCPSEND: 0,OK
+SSLTCPRECV: 0
AT+SSLTCPREAD=0,2048
+SSLTCPREAD: 0,10,1111111111
OK
Format
<CR><LF>+SSLTCPCFGA:
Query AT+SSLCIPHERSET?<CR>
<enable><CR><LF>OK<CR><LF>
Parameter
<enable> Whether to remove the weak algorithm. Integer type, ranging from 0 to 1.
0: disable (default)
1: enable
Example
AT+SSLCIPHERSET=1
Remove the weak algorithm from the SSL TCP connection successfully.
OK
AT+SSLCIPHERSET?
+SSLCIPHERSET: 1 Query the current setting.
OK
⚫ Additional (s) makes this command different from the receive mode of the client mode in format.
⚫ Note that the parameters are different from that of the client mode.
11 MQTT Commands
Format
<CR><LF>+MQTTTLS:<sslmode>,<authmode>,
Query AT+MQTTTLS?<CR> <rootca_name>,<clientcert_name>,<clientkey_name>
<CR><LF>OK<CR><LF>
<CR><LF>+MQTTTLS: <type>,<value>
Test AT+MQTTTLS=?<CR>
<CR><LF>OK<CR><LF>
Parameter
<type> Parameter type.
sslmode: Whether to enable authentication mode.
authmode: authentication mode
rootca: CA certificate.
clientcert: Client certificate
clientkey: client key
sslversion: SSL protocol version
<type_name> Corresponding parameter value
The relations between the <type> and <type_name> values are as follows:,
⚫ sslmode
0: not authentication
1: authentication
⚫ authmode
0: verify optional
1: verify required
Example
AT+MQTTTLS=authmode,1 Set the authentication mode to verify required.
OK
AT+MQTTTLS? Query the current SSL settings.
+MQTTTLS: 1,1,ca.pem,cc.pem,ck.pem,3
OK
AT+MQTTTLS=? Query the available parameter value ranges.
+MQTTTLS: <type>,<type_name>
OK
Format
<CR><LF>+MQTTCONNPARAM:<"clientID">,<"
Query AT+MQTTCONNPARAM?<CR> username">,<"password"><CR><LF>
<CR><LF>OK<CR><LF>
<CR><LF>+MQTTCONNPARAM:<cliendid>,<us
Test AT+MQTTCONNPARAM=?<CR> ername>,<password>
<CR><LF>OK<CR><LF>
Parameter
<clientID> Client ID, 256 bytes at most.
Example
AT+MQTTCONNPARAM="C_201801021127","lixytest/thing01","0 Parameters are set successfully.
lSoY/eYnlSqUeAsbAKKQ/ACmipZwEw9H7Ff0h1kOps="
OK
These parameters cannot be set when the MQTT connection is established. The parameters set by
this command is not saved, you need to reset them after the module is powered off.
Format
<CR><LF>+MQTTWILLPARAM:<retained>,<qos>,
Query AT+MQTTWILLPARAM?<CR> <"topicname">,<"message">
<CR><LF>OK<CR><LF>
<CR><LF>+MQTTWILLPARAM:<retained>,<qos>,
Test AT+MQTTWILLPARAM=?<CR> <topicname>,<message>
<CR><LF>OK<CR><LF>
Parameter
<retained> Retain mark, digit type.
<qos> quality of service, 0 to 1.
<”topicname”> Will topic name, 128 at most.
<”message”> Will Message, 1024 at most.
Example
AT+MQTTWILLPARAM=0,1,"neoway02",”byby”
The will is set successfully.
OK
Format
Parameter
<retained> Retain mark, digit type, 0 and 1.
<qos> QoS of the published message.
<”topic”> Topic that is published.
<willmsg_length> Length of the message body, 10240 bytes at most. Enter the message
content of the length specified by after>.
Example
AT+MQTTWILLMSG =1,1,"neoway02",10 Set will message.
> Successful
OK
AT+MQTTWILLMSG=1,1,"neoway02",10 Set will message.
> Failed
+MQTTWILLMSG: Timeout!
Wait for the return value during the module is connecting to the server. You cannot perform the
connection operation again if no value is return.
After the connection is set up successfully, if the module reports +MQTTDISCONNED:Link Closed
while you have not send the connection close command set up the connection manually.
Format
<CR><LF>+MQTTCONN:<"ip:port">,<clean>,<ke
Query AT+MQTTCONN?<CR> ep_alive>
<CR><LF>OK<CR><LF>
<CR><LF>+MQTTCONN:<host>,<clean>,<keep_
Test AT+MQTTCONN=?<CR> alive>
<CR><LF>OK<CR><LF>
Parameter
<"host"> Server address (URL:port).
<clean> Whether to clean session, digit type.
0: Not clean (default)
1: Clean
<keep_alive> timeout period, ranging from 20 to 180, unit: s
Example
AT+MQTTCONN="121.43.166.63:1883",0,60
The connection is set up successfully.
OK
If the subscription is failed perform the operation again after querying the MQTT connection and
network connection status. When the network is poor, the return value is slow.
The query command is valid only when the connection is set up. You can only query the latest
subscribed QoS and topic.
Format
">,<qos><CR> Or
<CR><LF>ERROR<CR><LF>
<CR><LF>+MQTTSUB:<"topicname">,<qos>
Query AT+MQTTSUB?<CR>
<CR><LF>OK<CR><LF>
<CR><LF>+MQTTSUB:<topicname>,<qos>
Test AT+MQTTSUB=?<CR>
<CR><LF>OK<CR><LF>
Parameter
<"topicname"> Topic name, 128 at most.
<qos> Quality of service, 0,1 to 2
Example
AT+MQTTSUB="neoway02",1
OK Subscribe to the topic successfully. The
server issues the topic retained last time.
+MQTTSUB:9,"neoway02",11,neoway mqtt
AT+MQTTSUB= neoway02,1
Subscribed to the topic successfully.
OK
When you fail to cancel the subscription, query the network status. When the network is poor, the
return value is slow.
Format
Parameter
<"topicname"> Name of the topic to be unsubscribed to, 128 at most.
Example
AT+MQTTUNSUB="neoway02"
Cancel a subscription.
OK
It is recommended to publish topic containing the "\" character using the AT+MQTTPUBS command
since "\" is an escape character.
Format
Parameter
<retained> Retain mark, digit type, 0 and 1.
<qos> quality of service, 0, 1, 2.
<"topicname"> Name of the topic that is published, 128 at most.
<"message"> Message that is published, 1024 at most.
Example
AT+MQTTPUB=1,1,"neoway02",”neoway mqtt”
The topic is published successfully.
OK
AT+MQTTPUB=1,1,"neoway02",”neoway mqtt”
OK The topic is published successfully. The server
issues the topic.
+MQTTSUB:5,"neoway02",11, neowaymqtt
Format
Parameter
<retained> Retain mark, digit type, 0 and 1.
<qos> QoS of the published message.
<”topic”> Topic that is published.
<msg_length> Length of the message body, 10240 bytes at most. Enter the message
content of the length specified by after >.
Example
AT+MQTTPUBS=1,1,"lixytopic",10 The message is published successfully.
>
OK
AT+MQTTPUBS=0,1,"lixytopic",12 Failed to publish the message, the writing operation times out.
>
+MQTTPUBS: Timeout!
The device disconnects to the MQTT server proactively and releases the MQTT resources. Then the
MQTT resources are released. If you need to publish messages, you need to reset the MQTT
Format
Parameter
N/A.
Example
AT+MQTTDISCONN
To close the MQTT connection.
OK
Format
Type Command
URC +MQTTSUB:<message_id>,<"topicname">,<message_len>,<message><CR>
Parameter
<message_id> Message ID
<"topicname"> Will topic, value with double quotes.
<message_len> Length of the data received.
<message> data received.
Example
+MQTTSUB:":1,"neoway02",5,12345 Receive the topic.
The setting by this command is not saved after the module is powered off.
Every tine you set up an MQTT connection, enable the URC of MQTT connection status.
Format
Parameter
<state> Reconnection status
0: the connection has been closed
1: the connection is established.
Example
AT+MQTTSTATE?
Query the MQTT connection state.
+MQTTSTATE: 1
1 indicates the MQTT connection is established successfully.
OK
AT+MQTTSTATE?
Query the MQTT connection state.
+MQTTSTATE: 0
0 indicates the MQTT connection is closed.
OK
The current coordinates of latitude and longitude are valid and precision is reserved (0.0 by default).
Format
Parameter
<n> Request selection
0: close positioning request
1: enable positioning through multiple base stations
<fail_string> Prompt strings for request failure
CONTACT FAIL
LINK FAIL
LINK NOT FREE
<result_string> String containing latitude and longitude
<code> Respond code of the server after the request is successful and no latitude and
Example
AT+CIPGSMLOC
The command is executed successfully.
OK
+CIPGSMLOC:{"location":{"lat":22.69083,"lng":113.985228},
Report the location information of the
"accuracy":0.0}
module.
+CIPGSMLOC: OK
AT+CIPGSMLOC
Failed to translate the server DNS name.
+CIPGSMLOC: CONTACT FAIL
AT+CIPGSMLOC
Failed to connect to the server.
+CIPGSMLOC: LINK FAIL
AT+CIPGSMLOC
Location request succeeded.
OK
Set up a PPP link (AT+XIIC=1) before sending this command. Send AT+CCLK? to query whether RTC
is synchronized to the current network time after this command is sent successfully.
The following time servers support time update: time.windows.com, time.nist.gov, etc.
The settings by this command are not saved after the module is powered off.
Format
<CR><LF>+UPDATETIME:
Query AT+UPDATETIME?<CR> <serv_ip>,<time>,<TZ>,<DST>
<CR><LF>OK<CR><LF>
Parameter
<mode> 0: Query mode. Query when the time was updated to the network time last time.
1: Setting mode. Synchronize the time to the network time.
<serv_ip> The IP address of the time server, in form of xx.xx.xx.xx or domain name.
<time> the timeout period, ranging from 1 to 60, unit: second.
<TZ> Time zone, in format of E/W+digits; E8 by default.
E: east time zone, 0 to 13
W: west time zone, 0 to 12
0: Zero time zone
<DST> Daylight Saving Time
1: Select DST auto-adjustment
0: Not select (by default)
<result code> No PPP Link
Time Out
Time Data Is Null
Send Request Fail
Domain Name Invalid
Socket Error
Example
AT+UPDATETIME=0 Query when the time was updated last time.
+UPDATETIME:Last Update Time 2014-03-31,11:10:26
OK The updated time: 2014-03-31,11:10:26
AT+UPDATETIME=0 Query when the time was updated last time.
+UPDATETIME: Last Update Time 0000-00-00,00:00:00
OK The time was not updated.
AT+UPDATETIME=1,210.72.145.44,10
No PPP connection is set up.
+UPDATETIME: No PPP Link
Synchronize with the network time of
AT+UPDATETIME=1,210.72.145.44,10
210.72.145.44.
OK
Time out: 10s.
The default time zone is East 8.
Time Updating,Please Wait...
Daylight saving time is not selected to prompt.
Synchronization times out because the network
+UPDATETIME: Time Out
is busy.
AT+UPDATETIME=1,128.138.141.172,10,"E8",0 Update the time to that of the server
OK 128.138.141.172.
Time out: 10s.
Time Updating,Please Wait... The time zone is set to East 8.
Daylight saving time is not selected to prompt.
+UPDATETIME: Update To 2014-03-31,11:32:55 Time is updated successfully.
AT+UPDATETIME=1,time.windows.com,10,"W12",1 Synchronize with the network time of
OK time.windows.com.
Time out: 10s.
Time Updating,Please Wait... The time zone is set to West 12.
Select daylight saving time.
+UPDATETIME: Update To 2014-04-12,15:17:48 Time is updated successfully.
AT+UPDATETIME=1,128.138.141.172,10,"W12",1 Time update request sending fails.
OK The reason probably is bad network connection
The setting by this command is saved after the module is powered off and it is valid after restart.
Format
<CR><LF>+NETSHAREMODE:
Query AT+NETSHAREMODE? <share_mode>
<CR><LF>OK<CR><LF>
Parameter
<share_mode> 0: RNDIS
1: ECM
Example
AT+NETSHAREMODE=1 Set the network sharing mode to ECM.
OK
AT+NETSHAREMODE? Query what the network sharing mode is set.
+NETSHAREMODE: 1 The current network sharing mode is ECM.
OK
Format
<CR><LF>+NETSHAREACT:<stat>,<auto>,
<err_code>,<wx_stat>,<PDP_type>,<share_
Query AT+NETSHAREACT?
mode>
<CR><LF>OK<CR><LF>
<CR><LF>+NETSHAREACT:(range of
supported<cid>),(range of
supported<action>),(range of
Test AT+NETSHAREACT=? supported<auto>),<apn>,<username>,<pass
wd>,(list of supported<authtype>s,list of
supported <ip_family>s)
<CR><LF>OK<CR><LF>
Parameter
<cid> PDP context, ranging from 2 to 7.
<action> Action
0: stop
1: start
<auto> Specifies whether to enable network sharing automatically after the module is
powered on.
0: manual
1: auto
<APN> Access Point Name, ranging from 0 to 99.
<user_name> User name, ranging from 0 to 64.
<passwd> Character string type, password, ranging from 0 to 64.
<auth_type> Authentication type
0: NONE
1: PAP (default)
2: CHAP
3: PAP and CHAP
<ip_family> IP family
4: IPv4 (default)
6: IPv6
10: IPv4_6
<stat> 0: disconnect
1: connect
<atuo> 0: manual
1: auto
<err_code> not supported currently
<wx_stat> not supported currently
<PDP_type> IPv4
<share_mode> RNDIS/ECM
Example
AT+NETSHAREACT=2,1,0,ctnet,card,card,1 Enable USB network sharing. The autostart
OK function is not set.
AT+NETSHAREACT=? Query the ranges of the parameters.
+NETSHAREACT:
(2-7),(0-1),(0-1),"apn","user","passwd",(0-3),(4,6,10)
OK
AT+NETSHAREACT? Query network sharing status.
+NETSHAREACT: 0,0,,,"IPV4",RNDIS
OK
Format
Parameter
<file_name> File name, at most 50 characters
<mode> 0: If the file already exists, new data is written to the start of the file and then it
overwrites original data.
1: If the file already exists, new data is written to the end of the file.
<size> Data size, ranging from 0 to 1024*1024, unit: byte.
The data to be written should not exceed <size>.
<time> timeout period, ranging from 0 to 240000, unit: ms
⚫ The size of the user disk is 1M, i.e. the total size of the files that can be stored is 1M.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSWF="test.txt",1,1024,10000 Write 1024-byte data to the test.txt file.
>
OK
AT+FSWF="test.txt",1,1024,10000 The command times out after 10 seconds.
>
+FSWF: Timeout!
AT+FSWF="test.txt",1,1024,60001 ERROR is returned because the set value exceeds the parameter
ERROR range.
AT+FSWF=”/sdcard0/test.txt”,1,10,60000 Write data to the test.txt file in SD card.
>
OK
AT+FSWF=/dataflash/test.txt,1,10,120000 Write data to the 10.txt file on the external flash.
>
OK
Format
Parameter
<file_name> File name, at most 50 characters
<mode> 0: read data from the beginning of the file.
1: read data starting from <position> of the file.
<size> data size, not exceed the size of the file, 0 is valid.
<position> the position in the file, where data to be read starts, valid when <mode> is set to 1.
<Size> and <position> are determined by the file size.
<content> Content of the file to be read.
⚫ the specified data size cannot exceed the total size of the file.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSRF="test.txt",0,10 Read 10-byte data from the beginning of the test.txt file.
+FSRF: 10, start01234
OK
AT+FSRF="test.txt",0,0 Read 0-byte data from the beginning of the test.txt file.
+FSRF: 0,
OK
AT+FSRF="test.txt",0,1025 ERROR is returned because <size> exceeds the file size.
ERROR
AT+FSRF="test.txt",1,20,2 Read 20-byte data from the second byte of the test.txt file.
+FSRF: 20, tart0123456789012345 The data is read successfully.
OK
AT+FSRF="test.txt",1,0,2 Read 0-byte data from the second byte of the test.txt file.
+FSRF: 0,
OK
AT+FSRF="test.txt",1,10,1025 <Position> exceeds the file size.
ERROR
AT+FSRF="/sdcard0/test.txt",0,10 Read content of the test.txt file from the SD card.
+FSRF: 10, start01234
OK
AT+FSRF=/dataflash/test.txt,0,10 Read content of the test.txt file from the external flash.
+FSRF: 10,aaaaaaaaaa
OK
Format
Parameter
<file_name> File name, the file length does not exceed 50 characters.
<checksum_mode> Verification type
1: XOR check method
2 - 99: reserved
<mode> 0: read data from the beginning of the file.
1: to read data from the position specified in <position>.
<size> data size, not exceed the size of the file, it cannot be set to 0.
<position> the position in the file, where data to be read starts, valid when <mode> is set to
1, 0 is invalid. Currently 0x40000000 is supported at most.
<lenth> Length of the file to be read.
<content> Content of the file to be read.
<checksum> Content of the file to be read.
⚫ Data size of the file to be read, the specified data size cannot exceed the total size of the file.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash in file name to operate files in the external flash; before
operating, you need to execute +NWYSPIFLASH to initialize the flash.
Example
AT+FSRFEX="test.txt",1,0,10 Read 10-byte data from the beginning of the test.txt file.
+FSRFEX: 10,XXXX,start01234
OK
AT+FSRFEX=/sdcard0/123.txt,1,0,10 Read 10-byte data from the beginning of the 123.txt file
+FSRFEX: 10,XXXX,1234567890 from the SD card.
OK
AT+FSRFEX=/dataflash/test.txt,1,0,10 Read 10-byte data from the beginning of the test.txt file
+FSRFEX: 10,6425,aaaaaaaaaa from the external flash.
OK
Format
Parameter
<file_name> File name, the file length does not exceed 50 characters.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash in file name to operate files in the external flash; before
operating, you need to execute +NWYSPIFLASH to initialize the flash.
Example
AT+FSDF="test.txt" Delete the text.txt file.
OK
AT+FSDF="123.txt" Delete the 123.txt file. ERROR is returned because the file does
ERROR not exist.
AT+FSDF=/sdcard0/1.txt Delete 1.txt from SD card
OK
AT+FSDF=/dataflash/test.txt Delete the test.txt file from the external flash.
OK
Format
<CR><LF>OK<CR><LF>
Or
<CR><LF><file_name>,<size>
Query AT+FSLIST?<CR>
<CR><LF><file_name>,<size>
……
<CR><LF>OK<CR><LF>
Parameter
<directory> Specify the directory to use when querying the file list in the SD card or external
flash.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSLIST? File name before comma
i.amr,6181 File size after comma
file.txt,6000
OK
AT+FSLIST? No file in the file system
OK
AT+FSLIST=/sdcard0 Query file list in /sdcard0
OK
AT+FSLIST=/dataflash Query the file list from the external flash.
+FSLIST: /dataflash/test.txt,10
OK
Format
Parameter
<file_name> File name, the file length does not exceed 50 characters.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSFS="test.txt" Obtain the size of the text.txt file.
+FSFS: 1024 The size is 1024 bytes.
OK
AT+FSFS="123.txt" Obtain the size of the 123.txt file.
ERROR ERROR is returned because the file does not exist.
AT+FSFS=/sdcard0/1.txt Obtain the size of the 1.txt file in SD card.
+FSFS: 10
OK
AT+FSFS=/dataflash/test.txt Query size of the test.txt file in the external flash.
+FSFS: 10
OK
Format
<CR><LF>+FSLS:<size>
<CR><LF>OK<CR><LF>
Query AT+FSLS?<CR>
Or
<CR><LF>+FSLS: DiskInfo Not Right!<CR><LF>
Parameter
<directory> Specify the directory to use when querying the remaining size of the SD card or
external flash.
<size> Remaining storage size of user disk.
⚫ The block size of the file system is 500 byte, based on the actual file occupied block size, SD card or
external flash different models block size may be different.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSLS? The remaining storage size of user disk is 64500 bytes.
+FSLS: 64500 64500=500*129, that is, there are 129 data blocks (500 bytes/block).
OK
AT+FSLS=/sdcard0 Query the remaining size of the SD card.
+FSLS: 1535345345
OK
AT+FSLS=/dataflash Query the remaining size of the external flash.
+FSLS: 15878544
OK
Format
Parameter
<directory> Specify the directory to use when formatting the SD card or external flash.
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash in file name to operate files in the external flash; before
operating, you need to execute +NWYSPIFLASH to initialize the flash.
Example
AT+FSFAT Format the user disk.
OK
AT+FSLS? The remaining storage size of user disk is 65536 bytes.
+FSLS: 65536
OK
Format
Parameter
<src_file_name> File name to be renamed, at most 50 characters
<dst_file_name> File name that after renaming, at most 50 characters
⚫ If SD card is supported, the command with the value of <file_name> containing /sdcard can be used to
operate SD card files.
⚫ If external flash is supported, include /dataflash () in file name to operate files in the SD card.
Example
AT+FSRN="test.txt","dst.txt" The file is renamed successfully.
OK
AT+FSRN="test1.txt","dst.txt" Failed to rename the file.
ERROR
AT+FSRN=/dataflash/test.txt,/dataflash/123.txt Rename the file in the external flash.
OK
Currently N706 only supports dual cards single standby. If only one SIM card is used (ensure that it is
valid) and the issue of failing to register network occurs, it is recommended to run the +SIMCROSS?
command to query whether the correct SIM card slot is selected. Try to use this executed command to
switch the SIM card slot if it an incorrect card slot is selected.
When only one SIM card is used, it is recommended to run the NWDSIMCFG command to query
which of the card slot is valid before inserting the SIM card. Otherwise, the module may fail to register
to the network due to wrong location of the SIM card.
When switching from the currently used card slot to another card slot, the command setting takes
effect after the module restarts.
Format
<CR><LF>+SIMCROSS: <sim_id>
Query AT+SIMCROSS?<CR>
<CR><LF>OK<CR><LF>
Parameter
<sim_id> SIM card identification
1: SIM 1 (default setting upon first boot)
2: SIM 2
Example
AT+SIMCROSS=1 Switch to SIM 1. This setting is valid after restart.
OK
AT+SIMCROSS=? Query the range of SIM card selection.
+SIMCROSS: (1-2)
OK
AT+SIMCROSS? Query the current selected SIM card.
+SIMCROSS: 1
OK
17 Other Commands
Format
Parameter
<rsrpN> Reference Signal Received Quality, the unit is 0.1 dBm. It is valid only on LTE
networks. N is the number of cells in a neighbor of the serving cell:
<rsrp1>,<rsrq1>,<rsrp2>,<rsrq2>,…, <rsrpN>,<rsrqN>.
<sinr> Signal-to-Interference-Plus-Noise Ratio, unit 0.1 dB, valid on an LTE network/
Example
AT+NRSP Read command
+NRSP: -920,-75,-930,-65,-870,-115,-780,-65,-880,-175,-990,-135,107
OK
This command works only after the module is registered with a network.
A predefined null message is returned when the module is not successfully registered to the network.
If the network exception is that the Internet is not registered during the switching of network mode, the
information returned at this time is also completely empty.
<LAC>,<BSIC> are compound query items, displaying the network location information of the current
module.
Format
Parameter
<MCC+MNC> MCC: Mobile Country Code, decimal
MNC: Mobile Network Code, decimal
[<LAC>/<TAC>] Location Area Code, hexadecimal
SID on CDMA1X networks
TAC on LTE networks
[<CELL_ID>] Cell ID, on other network modes, hexadecimal
[<BSIC>/<Phy_cellid>] Decimal BSIC on GSM network, hexadecimal Phy_cellid on LTE
networks,
0 on other networks
<BAND> operating band
GSM 900
DCS1800
PCS 1900
LTE BAND 1
…
LTE BAND 43
<ARFCN> Absolute radio-frequency channel number
<RX dBm> RX power, unit: dBm (199 indicates invalid)
<TX dBm> TX power, unit: dBm (199 indicates invalid)
<net_mode> Mode of network registered with
NONE
GSM
GPRS
TDD LTE
FDD LTE
Example
AT+NETMSG Query the details used to register the network.
+NETMSG: "460+00", 286F, 00000088, 95, LTE BAND 40,
38950, -46, 199, "TDD LTE"
OK
AT+NETMSG Query the details used to register the network.
+NETMSG: "460+00", 286F, 00000FCB, 26, GSM 900, 20, 32,
-46, "GPRS"
OK
AT+NETMSG The module has not been registered with any
+NETMSG: "0", 0, 0, 0, 0, 0, 0, 0, "NONE" network or the network encountered
OK abnormalities.
No SIM card is inserted.
AT+NETMSG
ERROR
This command works only after the module is registered with a network.
On a 3GPP network, there will be valid values in the fields of LAC, CELL_ID, and BSIC and the value
in the SID, NID, and BID fields is 0.
Format
Parameter
<MCC+MNC> MCC: Mobile Country Code, decimal
MNC: Mobile Network Code, decimal
[<LAC>/<TAC>] LAC on CDMA1X networks
TAC on LTE networks
Location Area Code on other network modes, hexadecimal
[<CELL_ID>] NID on CDMA1X networks
Cell ID, on other network modes, hexadecimal
[<BSIC>/<Phy_cellid>] Base Station Identity Code/Physical Cell ID of LTE networks
Net_mode:
NONE
GSM
GPRS
TDD LTE
FDD LTE
<net_mode> Network mode
NONE
GSM
GPRS
TDD LTE
FDD LTE
<BAND> operating band
GSM 900
GSM 1800
GSM 1900
LTE BAND 1
…
LTE BAND 43
<ARFCN> Network Bands
<RX dBm> RX power, unit: dBm (199 indicates invalid)
<TX dBm> TX power, unit: dBm (199 indicates invalid)
<SID> System Identity Number on a CDMA1X network
<NID> Network Identity Number on a CDMA1X network
<BID> BID on a CDMA1X network
<RSRP> Reference Signal Received Power, unit 0.1 dBm, valid on an LTE
network
<RSRQ> Reference Signal Received Quality, unit 0.1 dB, valid on an LTE
network
<SINR> Signal-to-Interference-Plus-Noise Ratio, unit 0.1 dB, valid on an LTE
network
Example
AT+NETDMSG Query the network registration
+NETDMSG: "460+00", 0x286F, 0x00000088, 95, "TDD LTE", LTE BAND 40, information on an LTE network.
If the baud rate is set to automatic detection, issue AT\r\n to detect the baud rate and then the module
returns the upgrade result.
Format
URC +NEOFOTA:<status>
Parameter
<status> Upgrade status
0: no valid OTA packages
1: download the upgrade package successfully (download to RAM)
2: abnormal download network
3: start to perform a local upgrade.
4: the local upgrade is performed successfully.
5: fail to perform the local upgrade.
6: insufficient download space
7: fails to download upgrade package
8: fails to verify upgrade package
Example
AT+NEOFOTA=115.29.212.25/,80
OK Start to upgrade.
This setting should be configured before upgrade and is not saved after the module is powered down.
Format
Parameter
<result> Switch of status report
0: disable status report. Only upgrade result is reported. The upgrade results including
the following:
Upgrade successfully
Failed to upgrade
No upgrade package
Failed to download
1: enable status report (default). All states are reported.
Example
AT+NEOFOTAURC=1 All states are reported.
OK
AT+NEOFOTA=115.29.212.25/,80
OK
AT+NEOFOTA=115.29.212.25/,80
OK
Format
Parameter
<channel> 1 2-pin88
2 4-VBAT
<value> The corresponding ADC value.
Example
AT+READADC=1 To read the value from the pin corresponding to ADC 1 is unsupported.
ERROR
OK
After frequency bands are locked through this AT command, the network mode changes. For example,
the network mode becomes LTE ONLY if you lock the frequency band to LTE B1. LTE and GSM
cannot be locked simultaneously.
The setting by this command takes effect immediately and it is saved after the module is powered off.
If the frequency band currently locked is invalid, registration failure will occur.
Format
<CR><LF>+NBANDLOCK: <mode>,<Bandlist>
<CR><LF>+NBANDLOCK: <mode>,<Bandlist>
<CR><LF><CR><LF>OK<CR><LF>
Query AT+NBANDLOCK?<CR>
Or
<CR><LF>+NBANDLOCK: NONE
<CR><LF><CR><LF>OK<CR><LF>
<CR><LF>+NBANDLOCK:
(listofsupport<mode>s),(list of support
Test AT+NBANDLOCK=?<CR>
<LTE_BAND>s),(list of support <GSM_BAND>s)
<CR><LF><CR><LF>OK<CR><LF>
Parameter
<mode> Network mode
0: unlock all
1: lock all band combinations under the LTE network
2: lock all band combinations under the GSM network
<LTE_Bands> frequency bands supported by LTE protocol, displayed and input in
hexadecimal format.
<GSM_Bands> frequency bands supported by GSM protocol, displayed and input in
hexadecimal format.
Each bit indicates a band according to the setting of <mode>. 0 indicates
disabled and 1 indicates enabled. For details about the match between bit and
band, see the Appendix.
Example
AT+NBANDLOCK=1,1 Lock LTE BAND1.
OK
AT+NBANDLOCK=2,1 Lock GSM BAND1.
OK
AT+NBANDLOCK? Query the status of band locked. LTE band1 is locked.
+NBANDLOCK: 1,0x1 GSM bands are not locked.
+NBANDLOCK: 2,0x0
OK
AT+NBANDLOCK=? Query frequency band locked. Convert 0x1e0080800d5 to
+NBANDLOCK: 1,0x1e0080800d5 11100000000001000000010000000000011010101; it indicates that the
+NBANDLOCK: 2,0xec module supports LTE_B1, LTE_B3, LTE_B5, LTE_B7, LTE_B8, LTE_B20,
LTE_B28, BLTE_B38, LTE_B39, LTE_B40, and LTE_B41.
OK Convert 0xec into 11101100; it indicates that the module supports
GSM_900P,GSM_900E,GSM_850,GSM_1800,GSM1900.
When no band is locked, this command can lock any available frequency. When any band is locked,
this command is only used to lock the available frequencies of the locked band. As the actual network
environments are different, the correction and verification for the input frequency information is
unsupported.
When locking a band, ERROR will be returned if you use this command to lock the frequencies that do
not belong to the locked band.
When no band is locked, depending on the setting of the frequency, the network will be registered to
the band corresponding to the best frequency.
The command supports to lock 9 frequencies at most. The setting is valid immediately after setting,
and is saved after the module is powered off.
Format
<CR><LF>+NFREQLOCK:
<mode>,<frequency1>,<frequency2>...
…
<CR><LF>OK<CR><LF>
Query AT+NFREQLOCK?<CR> Or
<CR><LF>ERROR<CR><LF>
Or
<CR><LF>+CME ERROR:
<err><CR><LF>
Parameter
<mode> Network mode
0: unlock all
1: LTE (including FDD\TDD)
<frequency> at most 9 frequencies can be input
1 - 65535: frequency range
Example
AT+NFREQLOCK=1,38950,38950 Lock the LTE frequency 38950.
OK
AT+NFREQLOCK? Query the frequency locking status.
+NFREQLOCK: 1,38950
OK
AT+NFREQLOCK=0 Unlock all frequencies locked.
OK
AT+NFREQLOCK?
+NFREQLOCK: 1,0
OK
AT+NFREQLOCK=1, 38950,38400 Lock the specific frequencies 38400 and 38950 of the same band in LTE
OK network.
AT+NFREQLOCK?
+NFREQLOCK: 1,38400,38950
OK
Format
Parameter
<LocalIP> Local IP address, character type
<local_port> Local port (varying with channels)
<gate> Gateway
<DNS1> Primary DNS server
<DNS2> Standby DNS server
<type> TCP Client/TCP Server/TCP Accept/UDP
0: TCP Client
1: UDP
2: TCP Server
<dest_ip> Destination IP address
<dest_port> Destination port number
Example
AT+IPINFO Query the connection status on socket 0.
+IPINFO:
0,10.13.70.121,29492,0,202.96.134.33,202.96.128.166,0
,58.60.184.213,12005
OK
AT+IPINFO No socket connection information.
OK
Before executing this command, use the AT+CGDCONT command to set the parameters including
<APN> and ensure that the module registers to the network successfully.
Format
<CR><LF>+CGACT:<cid>,<state>
Query AT+CGACT?<CR>
<CR><LF>OK<CR><LF>
Parameter
<state> Integer type
0: deactivated
1: activated
<cid> PDP activation channel, ranging from 1 to 7. A maximum of 5 channels can be
activated simultaneously.
Example
AT+CGACT=1,1 Activate the PDP context of the first channel.
+CGACT: 1,1
OK
AT+CGACT?
+CGACT: 1,1 Query the PDP channel activated.
OK
AT+CGACT=? Query the value range of <state>.
+CGACT: (0,1)
OK
Error Codes
1 NO CONNECTION TO PHONE
16 INCORRECT PASSWORD
20 MEMORY FULL
21 INVALID INDEX
22 NOT FOUND
23 MEMORY FAILURE
30 NO NETWORK SERVICE
31 NETWORK TIMEOUT
50 INCORRECT PARAMETERS
60 SYSTEM FAILURE
61 DATA MISSING
62 CALL BARRED
100 UNKNOWN
302 Found
306 unused
401 Unauthorized
403 Forbidden
409 Conflict
410 Gone
1>: 0891
2>: Inversion of every two bits (add F if the bits are not sufficient) in SMSC number, fixed. For
example, China Unicom 8613010888500 should be 683108705505F0 here.
3>: 0100
4>: Convert the receiving number into hexadecimal. For example, the number length is 11 bits and
then the hexadecimal length should be 0B.
5>: 81 (Receiving mode) there are multiple receiving modes. 81 indicates that the receiving mode is
unknown.
6>: Inversion of every two bits (add F if the bits are not sufficient) in the recipient number. For
example, 13421839693 should be 3124819396F3 after conversion.
7>: 0008
8>: The hexadecimal length of the SMS message content. For example, the UCS2 code of hello is
00080A00680065006C006C006F, that is 10 bits and the hexadecimal length is 0A.
9>: Message content, for example, the USC2 code of hello is 00080A00680065006C006C006F.
One PDU message contains the above 9 parts and the parameter values are determined by the actual
situation.
If the SMSC address length is 0, replace 08 with 00 and the SMSC type and address fields must be omitted.
The following is an example of the PDU message whose SMSC address length is not 0:
0891683110808805F001000B813124819396F300080A00680065006C006C006F
Wherein,
0891
0100
0008
The SMS message content starts from 0100, so the value of LENGTH in AT+CMGS=LENGTH is 23.
The following is an example of the PDU message whose SMSC address length is 0:
0001000B813124819396F300080A00680065006C006C006F
Wherein,
0100
0008
The SMS message content starts from 0100, so the value of LENGTH in AT+CMGS=LENGTH is 23.
AT+CMGF=1
OK
AT+CSCS= GSM
OK Press Enter. After the >
symbol is displayed, you
input the message.
AT+CMGS="13430981508"
>
Successfully
Return value
+CMGS: 116
OK
End
AT+CMGF=0
OK
AT+CSCS= UCS2
OK The length of the
SMS messages is
23 bytes in PDU
mode.
AT+CMGS=23<CR>
>
Input message
content, which is
Content of the message to be
encoded in PDU mode
sent
and sent by pressing
Ctrl+Z (0x1A). 0891683110808805F001000B813
124819396F300080A0068006500
6C006C006F
Successfully
Return value
+CMGS: 117
OK
End
GSM_480 2 2
GSM_900P 3 4
GSM_900E 4 8
GSM_900R 5 10
GSM_850 6 20
GSM_1800 7 40
GSM_1900 8 80
EUTRAN_BAND2 2 2
EUTRAN_BAND3 3 4
EUTRAN_BAND4 4 8
EUTRAN_BAND5 5 10
EUTRAN_BAND6 6 20
EUTRAN_BAND7 7 40
EUTRAN_BAND8 8 80
EUTRAN_BAND9 9 100
EUTRAN_BAND10 10 200
EUTRAN_BAND11 11 400
EUTRAN_BAND12 12 800
EUTRAN_BAND13 13 1000
EUTRAN_BAND14 14 2000
EUTRAN_BAND17 17 10000
EUTRAN_BAND33 33 100000000
EUTRAN_BAND34 34 200000000
EUTRAN_BAND35 35 400000000
EUTRAN_BAND36 36 800000000
EUTRAN_BAND37 37 1000000000
EUTRAN_BAND38 38 2000000000
EUTRAN_BAND39 39 4000000000
EUTRAN_BAND40 40 8000000000
EUTRAN_BAND41 41 10000000000
EUTRAN_BAND42 42 20000000000
EUTRAN_BAND43 43 40000000000
EUTRAN_BAND44 44 80000000000
EUTRAN_BAND65 51 4000000000000
EUTRAN_BAND66 52 8000000000000
EUTRAN_BAND71 60 800000000000000
EUTRAN_BAND252 61 1000000000000000
EUTRAN_BAND253 62 2000000000000000
EUTRAN_BAND255 64 8000000000000000