0% found this document useful (0 votes)
298 views183 pages

Neoway N706 AT Commands Manual V1.0

At command manual for Neoway 4G N706 Module

Uploaded by

ayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
298 views183 pages

Neoway N706 AT Commands Manual V1.0

At command manual for Neoway 4G N706 Module

Uploaded by

ayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 183

N706

AT Commands Manual
Issue 1.0 Date 2022-07-01
N706 AT Commands Manual
Copyright

Copyright © Neoway Technology Co., Ltd 2022. All rights reserved.


No part of this document may be reproduced or transmitted in any form or by any means without prior
written consent of Neoway Technology Co., Ltd.

is the trademark of Neoway Technology Co., Ltd.


All other trademarks and trade names mentioned in this document are the property of their respective
holders.

Notice
This document provides guide for users to use N706.
This document is intended for system engineers (SEs), development engineers, and test engineers.

THIS GUIDE PROVIDES INSTRUCTIONS FOR CUSTOMERS TO DESIGN THEIR APPLICATIONS.


PLEASE FOLLOW THE RULES AND PARAMETERS IN THIS GUIDE TO DESIGN AND COMMISSION.
NEOWAY WILL NOT TAKE ANY RESPONSIBILITY OF BODILY HURT OR ASSET LOSS CAUSED BY
IMPROPER OPERATIONS.

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE DUE TO


PRODUCT VERSION UPDATE OR OTHER REASONS.
EVERY EFFORT HAS BEEN MADE IN PREPARATION OF THIS DOCUMENT TO ENSURE ACCURACY
OF THE CONTENTS, BUT ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS
DOCUMENT DO NOT CONSTITUTE A WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.

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

Copyright © Neoway Technology Co., Ltd. ii


N706 AT Commands Manual
Contents

Contents

1 Boot LOG Instruction ............................................................................... 10


2 AT Syntax................................................................................................. 11
2.1 Symbols....................................................................................................................................... 11
2.2 Description .................................................................................................................................. 11
2.3 Command Types ........................................................................................................................ 12
2.4 Command Response Time-Out.................................................................................................. 12
3 General Commands ................................................................................ 15
3.1 ATI–Querying the Manufacturer Information ............................................................................ 15
3.2 AT+GMR–Querying the Firmware Version ............................................................................... 15
3.3 AT+CSQ–Querying Signal Quality ............................................................................................ 16
3.4 AT+CREG–Querying the Network Registration Status ............................................................ 17
3.5 AT+CEREG–Querying EPS Network Registration Status ........................................................ 18
3.6 AT+COPS–Selecting an Operator ............................................................................................ 19
3.7 AT+CIMI–Requesting International Mobile Subscriber Identity (IMSI) ..................................... 21
3.8 AT+CGSN–Requesting Product Serial Number Identification .................................................. 22
3.9 AT+GSN–Requesting Product Serial Number Identification .................................................... 22
3.10 AT+CCID–Obtaining ICCID of SIM Card ................................................................................ 23
3.11 AT+CGMM–Requesting Model Identification.......................................................................... 23
3.12 AT+GMM–Querying Module Model ........................................................................................ 24
3.13 AT+IPR–Setting Baud Rate .................................................................................................... 25
3.14 AT+CFUN–Setting Module Functionality ................................................................................ 25
3.15 AT+CMUX–Enabling/Disabling Multiplexing Mode ................................................................. 26
3.16 AT+CCLK–Clock ..................................................................................................................... 28
3.17 AT+CPIN–Entering PIN Code ................................................................................................. 29
3.18 AT+CLCK–Facility Lock .......................................................................................................... 30
3.19 AT+CPWD–Changing the Password ...................................................................................... 31
3.20 AT+CGDCONT–Defining PDP Context .................................................................................. 32
3.21 AT+XGAUTH–PDP Authentication ......................................................................................... 33
3.22 AT+CGATT–Setting GPRS Attach and Detach ...................................................................... 34
3.23 ATE1/ATE0–Enabling/Disabling the Terminal Display ............................................................ 36
3.24 ATD*99#–GPRS ..................................................................................................................... 37
3.25 AT+ENPWRSAVE–Enabling or Disabling Sleep Mode .......................................................... 37
3.26 AT+CESQ–Extended Signal Quality....................................................................................... 38
3.27 AT+NWDNS–Parsing the Domain Name ............................................................................... 39
4 SMS Commands ..................................................................................... 41
4.1 AT+CSMS–Selecting SMS Services ........................................................................................ 41

Copyright © Neoway Technology Co., Ltd. iii


N706 AT Commands Manual
Contents

4.2 AT+CPMS–Setting Preferred SMS Storage ............................................................................. 42


4.3 AT+CMGF–Setting Message Format ....................................................................................... 43
4.4 AT+CSCS–Setting the TE Character Set ................................................................................. 44
4.5 AT+CNMI–New Message Indications to TE ............................................................................. 45
4.6 AT+CMGR–Reading SMS Message ........................................................................................ 47
4.7 AT+CMGL–SMS Message List ................................................................................................. 49
4.8 AT+CMGS–Sending SMS Messages ....................................................................................... 51
4.9 AT+CMGW–Writing SMS Messages ........................................................................................ 52
4.10 AT+CMSS–Sending Messages from Storage ........................................................................ 53
4.11 AT+CMGD–Deleting SMS Messages ..................................................................................... 54
4.12 AT+CSCA–Service Center Address ....................................................................................... 55
4.13 AT+CSMP–Setting Text Mode Parameters ............................................................................ 56
4.14 AT+CSDH–Showing Text Mode Parameters .......................................................................... 57
5 TCP/UDP Client Commands ................................................................... 59
5.1 AT+NETAPN–Setting Network APN ......................................................................................... 59
5.2 AT+XIIC–Setting up a PPP Link ............................................................................................... 59
5.3 AT+TCPSETUP–Setting up a TCP Connection ....................................................................... 60
5.4 AT+TCPSEND–Sending TCP Data .......................................................................................... 62
5.5 AT+RECVMODE–Setting Receive Mode ................................................................................. 63
5.6 +TCPRECV–URC Notifying Data Received from Server ......................................................... 64
5.7 A+TCPREAD–Reading TCP Data ............................................................................................ 65
5.8 AT+TCPCLOSE–Closing a TCP Connection ........................................................................... 66
5.9 AT+UDPSETUP–Setting up a UDP Connection....................................................................... 66
5.10 AT+UDPSEND–Sending UDP Data ....................................................................................... 68
5.11 +UDPRECV–URC Notifying UDP Data Received .................................................................. 69
5.12 AT+UDPREAD–Reading UDP Data ....................................................................................... 70
5.13 AT+UDPCLOSE–Closing UDP Link ....................................................................................... 70
5.14 AT+IPSTATUS–Querying the Transparent TCP/UDP Socket Status ..................................... 71
5.15 AT+TCPACK–Querying Status of Data Sent by TCP Socket ................................................. 72
5.16 AT+DNSSERVER–Setting DNS Server ................................................................................. 73
5.17 AT+PDPKEEPALIVE–Setting PDP Keepalive Heartbeat ....................................................... 74
5.18 AT+PDPSTATUS–Querying PDP Status ................................................................................ 75
5.19 AT+TCPKEEPALIVE–Setting TCP Keepalive Heartbeat ....................................................... 75
6 TCP/UDP Transparent Commands ......................................................... 78
6.1 AT+TCPTRANS–Setting up a Transparent TCP Connection ................................................... 78
6.2 AT+UDPTRANS–Setting up a Transparent UDP Connection .................................................. 79
6.3 AT+TCPACK–Querying of Data Transmitted Status................................................................. 80
6.4 AT+IPSTATUS–Querying the TCP/UDP Socket Status............................................................ 81
6.5 AT+TRANSCLOSE–Closing the Transparent Connection ....................................................... 82
7 FTP Commands ...................................................................................... 84
7.1 AT+FTPLOGIN–Logging in to the FTP Server ......................................................................... 84
7.2 AT+FTPLOGOUT–Logging out from the FTP Server ............................................................... 85

Copyright © Neoway Technology Co., Ltd. iv


N706 AT Commands Manual
Contents

7.3 AT+FTPGET–Downloading Data from the FTP Server ............................................................ 86


7.4 AT+FTPPUT–Uploading Data to the FTP Server ..................................................................... 87
7.5 AT+FTPSIZE–Obtaining the FTP File Size .............................................................................. 89
7.6 AT+FTPSTATUS–Querying the FTP Connection Status .......................................................... 90
8 HTTP/HTTPS Commands ....................................................................... 91
8.1 AT+HTTPPARA–Setting HTTP Parameters ............................................................................. 91
8.2 AT+HTTPSETUP–Setting up an HTTP Connection ................................................................. 92
8.3 AT+HTTPACTION–HTTP Request ........................................................................................... 92
8.4 AT+HTTPCLOSE–Closing the Socket of an HTTP Client ........................................................ 96
8.5 +HTTPRECV–URC Notifying HTTP Data Received ................................................................ 96
8.6 AT+HTTPGET–Downloading HTTP Files ................................................................................. 98
8.7 +HTTPGETRPT–URC Notifying Downloading Result............................................................. 99
8.8 AT+HTTPGETSTAT?–Querying the HTTP Downloading Result............................................ 101
8.9 +HTTPCLOSED–URC Notifying Socket of the HTTP Client is Closed .................................. 102
8.10 AT+HTTPSCFG–Configuring SSL Parameters for HTTPS .................................................. 103
8.11 AT+HTTPSPARA–Setting HTTPS Parameters .................................................................... 104
8.12 AT+HTTPSSETUP–Setting up an HTTPS Connection ........................................................ 105
8.13 AT+HTTPSACTION–Sending an HTTPS Request .............................................................. 106
8.14 AT+HTTPSCLOSE–Closing an HTTPS Connection ............................................................ 108
8.15 +HTTPSRECV–URC Notifying HTTPS Data Received ....................................................... 109
8.16 AT+HTTPSGET–Download HTTPS Files.............................................................................. 110
8.17 +HTTPSGETRPT–URC Notifying Downloading Result ........................................................ 111
8.18 AT+HTTPSGETSTAT?–Querying the Download Result ....................................................... 113
8.19 AT+FILEHTTPACTION–HTTP Request in File System ........................................................ 115
8.20 AT+FILEHTTPACTION–HTTPS Request in File System ...................................................... 116
8.21 +FILEHTTPSTAT–URC Notifying the HTTP(S) Uploading/Downloading Result .................. 118
8.22 +HTTPCLOSED–URC Notifying HTTP Link Closed ............................................................. 119
9 Wi-Fi Function ....................................................................................... 120
9.1 AT+WIFIAPSCAN–Wi-Fi Hotspot Scanning ........................................................................... 120
9.2 AT+WIFIGSMLOC–Wi-Fi Positioning ..................................................................................... 120
10 SSL TCP Data Service ........................................................................ 122
10.1 AT+SSLTCPCFG–Configuring SSL Parameters for TCP ..................................................... 122
10.2 AT+SSLTCPSETUP–Setting up a TCP Connection over SSL ............................................. 123
10.3 AT+SSLTCPCLOSE–Closing a TCP Connection over SSL ................................................. 125
10.4 AT+SSLTCPSEND–Sending TCP Data over SSL ................................................................ 125
10.5 +SSLTCPRECV–URC Notifying SSLTCP Data is Received ................................................ 126
10.6 AT+CERTADD–Adding SSL Certificate ................................................................................ 127
10.7 AT+CERTCHECK–Checking the SSL Certificate ................................................................. 128
10.8 AT+CERTDEL–Deleting an SSL Certificate ......................................................................... 128
10.9 AT+SSLTCPCFGA–Configuring SSL Parameters for TCP .................................................. 129
10.10 AT+SSLTCPREAD–Reading SSL TCP Data...................................................................... 130
10.11 AT+SSLCIPHERSET–Removing Weak Algorithm from the SSLTCP Connection ............. 131

Copyright © Neoway Technology Co., Ltd. v


N706 AT Commands Manual
Contents

11 MQTT Commands ............................................................................... 132


11.1 AT+MQTTTLS–Configuring TLS Parameters ....................................................................... 132
11.2 AT+MQTTCONNPARAM–Setting User Parameters ............................................................ 133
11.3 AT+MQTTWILLPARAM–Setting Will .................................................................................... 134
11.4 AT+MQTTWILLMSG–Setting Long Will Messages .............................................................. 135
11.5 AT+MQTTCONN–Connection Command............................................................................. 135
11.6 AT+MQTTSUB–Subscribing a Topic .................................................................................... 136
11.7 AT+MQTTUNSUB–Canceling a Subscription....................................................................... 137
11.8 AT+MQTTPUB–Publishing a Topic ....................................................................................... 138
11.9 AT+MQTTPUBS–Publishing a Topic with Long Message .................................................... 139
11.10 AT+MQTTDISCONN–Disconnecting from the MQTT Server ............................................. 139
11.11 +MQTTSUB–URC Notifying Received Topic Content ........................................................ 140
11.12 AT+MQTTSTATE–Query the MQTT Connection Status .................................................... 141
12 GSM Location Command .................................................................... 142
12.1 AT+CIPGSMLOC–Obtaining the Location of the Module..................................................... 142
13 Time Synchronization Commands ....................................................... 144
13.1 AT+UPDATETIME–Updating Time to Network ..................................................................... 144
14 Network Sharing Commands ............................................................... 147
14.1 AT+NETSHAREMODE–Selecting Network Sharing Mode .................................................. 147
14.2 AT+NETSHAREACT–Enabling Network Sharing ................................................................. 148
15 File System Commands ...................................................................... 150
15.1 AT+FSWF–Writing Data to File............................................................................................. 150
15.2 AT+FSRF–Reading Data from a File .................................................................................... 151
15.3 AT+FSRFEX–Reading File ................................................................................................... 152
15.4 AT+FSDF–Deleting a File ..................................................................................................... 153
15.5 AT+FSLIST–Obtaining File List ............................................................................................ 154
15.6 AT+FSFS–Obtaining the Size of a File ................................................................................. 155
15.7 AT+FSLS–Obtaining the Remaining Storage Size of User Disk .......................................... 156
15.8 AT+FSFAT–Formating the User Disk ................................................................................... 157
15.9 AT+FSRN–Renaming the File .............................................................................................. 158
16 SIM Card Related Commands ............................................................. 159
16.1 AT+SIMCROSS–Switching SIM ........................................................................................... 159
17 Other Commands ................................................................................ 161
17.1 AT+NRSP–Querying RSRP, RSRQ, SINR of Cells in a Neighbor of a Serving Cell on the LTE
Network .......................................................................................................................................... 161
17.2 AT+NETMSG–Querying Network Registration Information.................................................. 161
17.3 AT+NETDMSG–Querying Network Registration Information ............................................... 163
17.4 AT+NEOFOTA–FOTA Command ......................................................................................... 165
17.5 AT+NEOFOTAURC–FOTA Status Report ............................................................................ 166
17.6 AT+READADC–Reading ADC Value .................................................................................... 167
17.7 AT+NBANDLOCK–Locking Multiple Frequency Bands........................................................ 168

Copyright © Neoway Technology Co., Ltd. vi


N706 AT Commands Manual
Contents

17.8 AT+NFREQLOCK–Locking the Specified Frequency .......................................................... 169


17.9 AT+IPINFO–Querying Socket Connection Information ........................................................ 171
17.10 AT+CGACT–Activating/Deactivating PDP Context ............................................................ 172
Error Codes ........................................................................................... 173
A.1 General Error Codes ................................................................................................................ 173
A.2 FTP Error Codes ...................................................................................................................... 175
A.3 HTTP(S) Error Codes .............................................................................................................. 175
Reference Process of AT Command Programming .............................. 178
B.1 Content of PDU SMS Messages ............................................................................................. 178
B.2 Flowchart of Sending Text SMS Messages (Through UART) ................................................. 180
B.3 Flowchart of Sending PDU SMS Messages (Through UART) ................................................ 181
Supported Band List ............................................................................. 182
C.1 GSM Bands ............................................................................................................................. 182
C.2 LTE Bands ............................................................................................................................... 182

Copyright © Neoway Technology Co., Ltd. vii


N706 AT Commands Manual
About This Document

About This Document

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

Copyright © Neoway Technology Co., Ltd. viii


N706 AT Commands Manual
About This Document

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.

Means note or tips for readers to use the module

Related Documents
Neoway_N706_Datasheet

Neoway_N706_Product_Specifications

Neoway_N706_HW_User_Guide

Neoway_N706_EVK_User_Guide

Copyright © Neoway Technology Co., Ltd. ix


N706 AT Commands Manual
Chapter 1 Boot LOG Instruction

1 Boot LOG Instruction

The UART outputs \r\n+PBREADY\r\n after the phonebook is available.

Copyright © Neoway Technology Co., Ltd. 10


N706 AT Commands Manual
Chapter 2 AT Syntax

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.

Extended commands, defined by Neoway

Joint Mark

+ or $, used between the prefix and a command line

Termination Character

<CR>, i.e. 0x0D

Copyright © Neoway Technology Co., Ltd. 11


N706 AT Commands Manual
Chapter 2 AT Syntax

Response Syntax

<CR><LF>response<CR><LF>

Response can be one or multiple messages.

Result Syntax

<CR><LF>OK<CR><LF> indicates that a command is executed successfully.

<CR><LF>ERROR<CR><LF> indicates that a command fails to be executed.

For the error codes, see Appendix A.

2.3 Command Types


Type Syntax Response Function
<CR><LF>OK<CR><LF>
Store a value or
Set AT+CMD=<VALUE><CR> Or
values for later use
<CR><LF>ERROR<CR><LF>

[<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>

Determine the range


[<CR><LF>response] of parameter values
Test AT+CMD=?<CR>
<CR><LF>OK<CR><LF> or parameter lengths
that are supported

[<CR><LF>response] Determine the current


Query AT+CMD?<CR>
<CR><LF>OK<CR><LF> value or values stored

Report the status


Unsolicited <CR><LF>+CMD:
N/A change and data
result code <VALUE><CR><LF>
receiving

Symbols are not displayed in AT commands. All commands comply with the rules in this
Remarks
chapter.

2.4 Command Response Time-Out


Every command issued to the Neoway module returns a result response and the time needed to

Copyright © Neoway Technology Co., Ltd. 12


N706 AT Commands Manual
Chapter 2 AT Syntax

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.

No. Command Estimated maximum time to get response (Seconds)


1 AT+COPS 180

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

"OK" or "ERROR" is returned within 300 ms; the actual


14 AT+TCPTRANS
connection status is returned within 60s.

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

Copyright © Neoway Technology Co., Ltd. 13


N706 AT Commands Manual
Chapter 2 AT Syntax

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

48 AT+FSWF Custom, ranging from 0 to 240

49 AT+MYCELLINFO 300

50 AT+CGACT 60s per dial-up operation

Copyright © Neoway Technology Co., Ltd. 14


N706 AT Commands Manual
Chapter 3 General Commands

3 General Commands

3.1 ATI–Querying the Manufacturer Information


To query the manufacturer information, including manufacture, model, and version

Format

Type Command Response


<CR><LF><manufacturer>
<CR><LF><module_version>
Execute ATI<CR>
<CR><LF><soft_version>
<CR><LF>OK<CR><LF>

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

3.2 AT+GMR–Querying the Firmware Version


To query the firmware version

Copyright © Neoway Technology Co., Ltd. 15


N706 AT Commands Manual
Chapter 3 General Commands

Format

Type Command Response


<CR><LF>+GMR: <reversion>
Execute AT+GMR<CR>
<CR><LF>OK<CR><LF>

Parameter
<reversion> Firmware version of the module.

Example
AT+GMR Query the firmware version
+GMR: N706-R004-STD-BZ-003
OK

3.3 AT+CSQ–Querying Signal Quality


To query the receiving signal strength indication (RSSI).

Format

Type Command Response


<CR><LF>+CSQ: <signal>,<ber>
Execute AT+CSQ<CR>
<CR><LF>OK<CR><LF>

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

1 <10 < -93 dBm

2 <16 < -111 dBm

3 <22 < -69 dBm

4 <28 < -57 dBm

5 >=28 >=-57 dBm

Copyright © Neoway Technology Co., Ltd. 16


N706 AT Commands Manual
Chapter 3 General Commands

<ber> Refer to the value of RXQUAL in the table of GSM


0...7
05.08 8.2.4.

99 Not known or not detectable.

Example
AT+CSQ Query the signal quality.
+CSQ: 19,2
OK

3.4 AT+CREG–Querying the Network Registration Status


To query the network registration status of the module.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
Execute AT+CREG=[<n>]<CR> <CR><LF>ERROR<CR><LF>
Or
<CR><LF>+CREG:<stat>[,<lac>,<ci>[,<Act>]]<CR><LF>

<CR><LF>+CREG: <n>,<stat>
Query AT+CREG?
<CR><LF>OK<CR><LF>

<CR><LF>+CREG: range of supported<n>


Test 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

Copyright © Neoway Technology Co., Ltd. 17


N706 AT Commands Manual
Chapter 3 General Commands

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

3.5 AT+CEREG–Querying EPS Network Registration


Status
To query the EPS network registration status of the module.

Format

Type Command Response


Execute AT+CEREG=[<n>]<CR> <CR><LF>OK<CR><LF>

<CR><LF>+CEREG:
<stat>[,[<tac>],[<ci>],[<AcT>][,,[,[<Active-Time>],[<Peri
Query AT+CEREG?<CR>
odic-TAU>]]]]
<CR><LF>OK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 18


N706 AT Commands Manual
Chapter 3 General Commands

<CR><LF>+CEREG: (list of supported<n>s)


Test AT+CEREG=?<CR>
<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

3.6 AT+COPS–Selecting an Operator


To select an operator.

Copyright © Neoway Technology Co., Ltd. 19


N706 AT Commands Manual
Chapter 3 General Commands

Format

Type Command Response


AT+COPS=[<mode>[,<format>[,<op
Execute <CR><LF>OK<CR><LF>
er>>[,<AcT>]]]]<CR>

<CR><LF>+COPS:<mode>[,<format>,<oper>[,
Query AT+COPS?<CR>
<AcT>]]

<CR><LF>+COPS: [list of supported


(<stat>,long alphanumeric <oper>,short
alphanumeric <oper>,numeric
Test AT+COPS=?<CR> <oper>[,<AcT>])s][,,(list of
supported<mode>s),(list of supported
<format>s)]<CR><LF>
<CR><LF>OK<CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 20


N706 AT Commands Manual
Chapter 3 General Commands

+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

3.7 AT+CIMI–Requesting International Mobile Subscriber


Identity (IMSI)
Execution command causes the TA to return <IMSI>, which is intended to permit the TE to identify the
individual SIM card or active application in the UICC (GSM or USIM) which is attached to MT.

Format

Type Command Response


<CR><LF>+CIMI: <IMSI>
<CR><LF>OK<CR><LF>
Execute AT+CIMI<CR>
Or
<CR><LF>ERROR<CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 21


N706 AT Commands Manual
Chapter 3 General Commands

3.8 AT+CGSN–Requesting Product Serial Number


Identification
To obtain the product serial number, identified as the IMEI of the module.

Format

Type Command Response


<CR><LF>+CGSN: <IMEI>
Execute AT+CGSN<CR>
<CR><LF>OK<CR><LF>

Parameter
<IMEI> Product serial number identification of the module.

Example
AT+CGSN Read command
+CGSN: 355897043139120
OK

On a 3GPP2 network, the return code is an 8-digit ESN.

3.9 AT+GSN–Requesting Product Serial Number


Identification
To obtain the product serial number, identified as the IMEI of the module.

Format

Type Command Response


<CR><LF>+GSN: <IMEI>
Execute AT+GSN<CR>+
<CR><LF>OK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 22


N706 AT Commands Manual
Chapter 3 General Commands

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

3.10 AT+CCID–Obtaining ICCID of SIM Card


To obtain the integrated circuit card identifier (ICCID) of the SIM Card.

Format

Type Command Response


<CR><LF>+CCID: <ICCID>
<CR><LF>OK<CR><LF>
Execute AT+CCID<CR>
Or
<CR><LF>ERROR<CR><LF>

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

3.11 AT+CGMM–Requesting Model Identification


To request model identification which consists of a single line containing the name of the module.

Copyright © Neoway Technology Co., Ltd. 23


N706 AT Commands Manual
Chapter 3 General Commands

Format

Type Command Response


<CR><LF>+CGMM:<model>
Execute AT+CGMM<CR>
<CR><LF>OK<CR><LF>

Parameter
<model> Module model

Example
AT+CGMM Request model identification of the module.
+CGMM: N706
OK

3.12 AT+GMM–Querying Module Model


To request model identification which consists of a single line containing the name of the module.

Format

Type Command Response


<CR><LF>+GMM:<model>
Execute AT+GMM<CR>
<CR><LF>OK<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 24


N706 AT Commands Manual
Chapter 3 General Commands

3.13 AT+IPR–Setting Baud Rate


To set the baud rate of the module.

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

Type Command Response


Execute AT+IPR=<baud rate><CR> <CR><LF>OK<CR><LF>

<CR><LF>+IPR: <baud rate>


Query AT+IPR?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+IPR: (list of supported <baud rate>s)


Test AT+IPR=?<CR>
<CR><LF>OK<CR><LF>

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

3.14 AT+CFUN–Setting Module Functionality


To select the level of functionality of the module by setting <fun>. <fun>: only certain values are
supported.

Copyright © Neoway Technology Co., Ltd. 25


N706 AT Commands Manual
Chapter 3 General Commands

The setting is not saved after the module is powered off.

Format

Type Command Response


<CR><LF>+CFUN: (list of supported <fun>s),(list of
supported <rst>s)
Execute AT+CFUN=[<fun>[,<rst>]]<CR> <CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CFUN:<fun>
Query AT+CFUN?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CFUN: (list of supported <fun>s),(range of


Test AT+CFUN=?<CR> supported <rst>)
<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

3.15 AT+CMUX–Enabling/Disabling Multiplexing Mode


This command is used to manage (enable or disable) the multiplexing protocol control channel.

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.

Copyright © Neoway Technology Co., Ltd. 26


N706 AT Commands Manual
Chapter 3 General Commands

Executing AT+CMUX=0 to enable the multiplexing protocol control channel is recommended.

Format

Type Command Response


AT+CMUX=<mode>[,<subset>[,<p <CR><LF>OK<CR><LF>
Execute ort_speed>[,<N1>[,<T1>[,<N2>[,< Or
T2>[,<T3>[,<k>]]]]]]]]<CR> <CR><LF>ERROR<CR><LF>

<CR><LF>+CMUX: (list of supported


<mode>values),(list of supported <subset>
values),(value range of<port_speed>),(value range
Test AT+CMUX=?<CR> of<N1>),(value range of<T1>),(value range
of<N2>),(value range of<T2>),(value range
of<T3>),(value range of<k>)<CR><LF>
<CR><LF>OK<CR><LF>

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)

Copyright © Neoway Technology Co., Ltd. 27


N706 AT Commands Manual
Chapter 3 General Commands

<k> Window size, integer type.


(Not supported)

<T2> must be greater than <T1>.

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

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CCLK=<time><CR> Or
<CR><LF>ERROR<CR><LF>

<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].

Copyright © Neoway Technology Co., Ltd. 28


N706 AT Commands Manual
Chapter 3 General Commands

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

3.17 AT+CPIN–Entering PIN Code


to enter a password or query whether or not the module requires a password which is necessary
before it can be operated. The password may be SIM PIN, SIM PUK, PH-SIM PIN, etc.

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

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+CPIN=<pin>[,<newpin>]<CR> Or
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 29


N706 AT Commands Manual
Chapter 3 General Commands

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.

+PBREADY The SIM card is unlocked.


AT+CPIN? If PIN code is input incorrectly for three times, PUK
+CPIN: SIM PUK is required to unlock.
OK
AT+CPIN="12345678","4321"
OK Enter PUK code and then enter the new PIN code.

+PBREADY The SIM card is unlocked.

3.18 AT+CLCK–Facility Lock


To lock, unlock or interrogate a MT or a network facility <fac>. The setting by this command valid after
the module is restarted.

Format

Type Command Response


⚫ When <mode>=2:
<CR><LF>+CLCK: <status>[,<class1>
[<CR><LF>+CLCK: <status>,<class2>[...]]
<CR><LF>OK<CR><LF>
AT+CLCK=<fac>,<mode>[,<passwd>[ Or
Set
,<class>]]<CR> <CR><LF>ERROR<CR><LF>
⚫ When <mode>≠2:
<CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CLCK: (list of supported <fac>


Test AT+CLCK=?<CR> values)
<CR><LF>OK<CR><LF>

Parameter
<fac> Value with double quotes.

Copyright © Neoway Technology Co., Ltd. 30


N706 AT Commands Manual
Chapter 3 General Commands

"OI": Outgoing international calls


"SC": SIM card
"AO": All outgoing calls
"OX": All outgoing international calls except to the home country
"FD": Fixed dialing of the SIM card
<mode> 0: unlock
1: lock
2: registration
<status> 0: not active
1: active
<passwd> Password or operation code; string with double quotes.
<classx> 1: voice service
2: data service
4: fax service
8: SMS
16: data circuit sync
32: data circuit async
64: dedicated packet access
128: dedicated PAD access

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

3.19 AT+CPWD–Changing the Password


To set a new password for the facility lock function defined by command Facility Lock.

Before changing PIN code, lock the SIM card (running AT+CLCK="SC",1,"1234").

Copyright © Neoway Technology Co., Ltd. 31


N706 AT Commands Manual
Chapter 3 General Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CPWD=<fac>,<oldpwd>,<newpwd><CR> Or
<CR><LF>ERROR<CR><LF>

<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.

3.20 AT+CGDCONT–Defining PDP Context


To specify GPRS PDP context parameter values for a PDP context.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+CGDCONT=<cid>[,<PDP_type>[,<APN>[,
Set Or
<PDP_addr>[,<d_comp>[,<h_comp>]]]]]<CR>
<CR><LF>ERROR<CR><LF>

<CR><LF>+CGDCONT:<cid>,<PDP_t
Query AT+CGDCONT?<CR> ype>,<APN>,<PDP_addr>,<d_comp>,
<h_comp><CR><LF>

Copyright © Neoway Technology Co., Ltd. 32


N706 AT Commands Manual
Chapter 3 General Commands

<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

3.21 AT+XGAUTH–PDP Authentication


PDP authentication.

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

Copyright © Neoway Technology Co., Ltd. 33


N706 AT Commands Manual
Chapter 3 General Commands

uses the private network.

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

Type Command Response


<CR><LF>OK<CR><LF>
AT+XGAUTH=<cid>,<auth>[,
Set Or
<name>,<pwd>]<CR>
<CR><LF>ERROR<CR><LF>

<CR><LF>+XGAUTH: (list of supported <cid>),(value


Test AT+XGAUTH=? range of<auth>),(length of <name>),(length of <pwd>)
<CR><LF>OK<CR><LF>

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

3.22 AT+CGATT–Setting GPRS Attach and Detach


To attach the MT to, or detach the MT from, the Packet Domain service. The setting by this command

Copyright © Neoway Technology Co., Ltd. 34


N706 AT Commands Manual
Chapter 3 General Commands

is not saved after the module is powered off.

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

Type Command Response


<CR><LF>GPRS DISCONNECTION<CR><LF>
<CR><LF>OK<CR><LF>
Or
Set AT+CGATT=<state><CR>
<CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CGATT: <state>
Query AT+CGATT?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CGATT: (value range of <state>)


Test 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.

Copyright © Neoway Technology Co., Ltd. 35


N706 AT Commands Manual
Chapter 3 General Commands

+CGATT: (0-1)
OK

3.23 ATE1/ATE0–Enabling/Disabling the Terminal Display


To enable or disable the terminal display function of the AT commands.

The terminal display function is enabled by default.

The setting by this command is not saved after the module is powered off.

Format

Type Command Response


Set ATE[<value>]<CR> <CR><LF>OK<CR><LF>

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”

ATE0 Turn off the terminal display function.


OK
Send “AT”
OK Serial tools displays only “OK”.

Copyright © Neoway Technology Co., Ltd. 36


N706 AT Commands Manual
Chapter 3 General Commands

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

Type Command Response


Execute ATD*99#<CR> <CR><LF>CONNECT<CR><LF>

Parameter

N/A.

Example
ATD*99# Start a dial-up connection.
CONNECT Successful

3.25 AT+ENPWRSAVE–Enabling or Disabling Sleep


Mode
To enable or disable sleep mode. The settings by this command are not saved after the module is
powered off.

Sleep mode is triggered by inputting low level at DTR by default.

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

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+ENPWRSAVE=<n>[,<usb>]<CR> Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 37


N706 AT Commands Manual
Chapter 3 General Commands

<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

3.26 AT+CESQ–Extended Signal Quality


To query the extended signal quality.

⚫ 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.

For the detailed rule, see the 3GPP TS 27.007 8.69.

Format

Type Command Response


<CR><LF>+CESQ: <rxlev>,<ber>,<rscp>,<ecno>,
Execute AT+CESQ<CR> <rsrq>,<rsrp>,<ss_rsrq>,<ss_rsrp>,<ss_sinr>
<CR><LF>OK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 38


N706 AT Commands Manual
Chapter 3 General Commands

<CR><LF>+CESQ: (list of supported <rxlev>s),(list of


supported <ber>s),(list of supported <rscp>s),(list of
supported <ecno>s),(list of supported <rsrq>s),(list of
Test AT+CESQ=?<CR> supported <rsrp>s),(list of supported <ss_rsrq>s),(list of
supported <ss_rsrp>s),(list of supported
<ss_sinr>s)<CR><LF>
<CR><LF>OK<CR><LF>

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

3.27 AT+NWDNS–Parsing the Domain Name


To query the DNS parsing result after the module establishes a dial-up connection using the internal
protocol stack successfully.

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.

Currently the query command only retrieves the IPv4 address.

Copyright © Neoway Technology Co., Ltd. 39


N706 AT Commands Manual
Chapter 3 General Commands

Format

Type Command Response


<CR><LF>+NWDNS: <Sign>,<IP><CR><LF>
<CR><LF>+NWDNS: <Sign>,<IP><CR><LF>
Execute AT+NWDNS=<hostname><CR> <CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

<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”

Query the obtained IP address.


+NWDNS: IPV6,””

OK

Copyright © Neoway Technology Co., Ltd. 40


N706 AT Commands Manual
Chapter 4 SMS Commands

4 SMS Commands

4.1 AT+CSMS–Selecting SMS Services


To check the message types supported by the module. There are three message types:
mobile-originated SMS messages (SMS-MO), mobile-terminated SMS messages (SMS-MT) and cell
broadcast messages (SMS-CB).

Format

Type Command Response


<CR><LF>+CSMS: <mt>,<mo>,<bm><CR><LF>
<CR><LF>OK<CR><LF>
Execute AT+CSMS=<service><CR>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CSMS:
Query AT+CSMS?<CR> <service>,<mt>,<mo>,<bm><CR><LF>
<CR><LF>OK<CR><LF>

<CR><LF>+CSMS: (list of supported <service>s)


Test AT+CSMS=?<CR> <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

The default value is 0,1,1,1.

Copyright © Neoway Technology Co., Ltd. 41


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.2 AT+CPMS–Setting Preferred SMS Storage


To set preferred SMS storage.

Format

Type Command Response


<CR><LF>+CPMS:<used1>,<total1>,<used2>,<total2>,<
used3>,<total3><CR><LF>
AT+CPMS=<mem1>[,<mem
Execute <CR><LF>OK<CR><LF>
2>[,<mem3>]]<CR>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CPMS:
<mem1>,<used1>,<total1>,<mem2>,<used2>,<total2>,<
Query AT+CPMS?<CR>
mem3>,<used3>,<total3><CR><LF>
<CR><LF>OK<CR><LF>

<CR><LF>+CPMS: (list of supported <mem1>s),(list of


supported <mem2>s),(list of supported <mem3>s)
Test AT+CPMS=?<CR>
<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”

Copyright © Neoway Technology Co., Ltd. 42


N706 AT Commands Manual
Chapter 4 SMS Commands

"SM": SIM only


"ME": ME only
<used> number of messages currently in memory.
<total> total number of message locations in memory.

The received SMS message is stored in SM by default.

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

4.3 AT+CMGF–Setting Message Format


Set command tells the TA, which input and output format of messages to use.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CMGF=[<mode>]<CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CMGF: <mode><CR><LF>
Query AT+CMGF?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CMGF: (list of supported <mode>s)<CR><LF>


Test AT+CMGF=?<CR>
<CR><LF>OK<CR><LF>

Parameter
<mode> 0: PDU mode (default)
1: text mode

Copyright © Neoway Technology Co., Ltd. 43


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.4 AT+CSCS–Setting the TE Character Set


To set “TE” character set.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CSCS[=<chest>]<CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CSCS: <chset>
Query AT+CSCS?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CSCS: (list of supported <chset>s)<CR><LF>


Test 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).

The default character set is "PCCP936".

Copyright © Neoway Technology Co., Ltd. 44


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.5 AT+CNMI–New Message Indications to TE


To set the mode how the module informs users of new SMS messages received from the network.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+CNMI=[<mode>[,<mt>[,
Set Or
<bm>[,<ds>[,<bfr>]]]]]<CR>
<CR><LF>ERROR<CR><LF>

<CR><LF>+CNMI:
Query AT+CNMI?<CR> [<mode>[,<mt>[,<bm>[,<ds>[,<bfr>]]]]]<CR><LF>
<CR><LF>OK<CR><LF>

<CR><LF>+CNMI: (list of supported <mode>s),(list of


supported <mt>s),(list of supported <bm>s),(list of supported
Test AT+CNMI=?<CR>
<ds>s),(list of supported <bfr>s)<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.

Copyright © Neoway Technology Co., Ltd. 45


N706 AT Commands Manual
Chapter 4 SMS Commands

0: SMS instruction codes will not be sent to the end device.


1: The format of the new SMS instruction codes is +CMTI: "MT" ,<index>. The SMS
message is stored rather than directly displayed.
2: The format of the new SMS instruction codes is +CMT :
<oa>,<scts>,<tooa>,<lang>,<encod>,<priority>
[,<cbn>],<length><CR><LF><data>(text mode), SMS messages are directly displayed
rather than stored.
3: Use the report codes defined by <mt>=2 to transmit SMS instruction codes to the end
device. The SMS instruction codes in other modes are the same as that of <mt>=1.
<bm> Set the format of the new cell broadcast codes, default value is 1.
0: not send the instruction information of new cell broadcast. The cell broadcast will not
be stored.
2: the format of the new cell broadcast instruction codes is +CBM:
<oa>,[<alpha>,]<scts>[,<tooa>,<length>]
<CR><LF><data> (text mode). The cell broadcast will be directly displayed rather than
stored.
<ds> report status of SMS message sending. The default value is 1.
0: no status report of SMS message sending.
1: the format of the SMS sending status report is +CDS:
<fo>,<mr>,[<ra>],[<tora>],<scts>,
<dt>,<st> (text mode).
<bfr> The default value is 0.
0: when <mode> is set to 1 or 2, codes defined by this command and stored in TA will
be sent to TE. The module will return OK before transmitting the codes.
1: when <mode> is set to 1 or 2, the codes defined by this command and stored in TA
will be cleared.

⚫ The default value is 0, 0, 0, 0, 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).

⚫ SMS message types:

⚫ Class 0: Displayed not stored

⚫ Class 1: Stored in ME

⚫ Class 2: Stored in SIM

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)

Copyright © Neoway Technology Co., Ltd. 46


N706 AT Commands Manual
Chapter 4 SMS Commands

OK
AT+CNMI?
+CNMI: 1,1,0,0,0 Query the current setting of the parameters.
OK

4.6 AT+CMGR–Reading SMS Message


To read SMS messages stored in current memory (use the AT+CPMS command to specify the current
memory)

If the received message is unread, its status in the storage changes to received read after executing
this command.

Format

Type Command Response


TEXT mode (+CMGF=1)
⚫ The command is executed successfully and the
command belongs to SMS-DELIVER:
<CR><LF>+CMGR:
<stat>,<oa>,[<alpha>],<scts>[,<tooa>,<fo>,
<pid>,<dcs>,<sca>,<tosca>,<length>]<CR><LF><dat
a>
⚫ The command is executed successfully and the
command belongs to SMS-SUBMIT:
<CR><LF>+CMGR:
<stat>,<da>,[<alpha>][,<toda>,<fo>,<pid>,
<dcs>,[<vp>],<sca>,<tosca>,<length>]<CR><LF><dat
a>
Execute AT+CMGR=<index><CR> ⚫ The command is executed successfully and the
command belongs to SMS-STATUS REPORT:
<CR><LF>+CMGR:
<stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>, <st>
⚫ The command is executed successfully and the
command belongs to SMS-COMMAND:
<CR><LF>+CMGR:
<stat>,<fo>,<ct>[,<pid>,[<mn>],[<da>],
[<toda>],<length><CR><LF><cdata>]
⚫ The command is executed successfully and the
command belongs to CBM-STORAGE:
<CR><LF>+CMGR:
<stat>,<sn>,<mid>,<dcs>,<page>,<pages><CR><LF>
<data>

Copyright © Neoway Technology Co., Ltd. 47


N706 AT Commands Manual
Chapter 4 SMS Commands

When PDU mode (+CMGF=0) and the command is


executed successfully:
<CR><LF>+CMGR:
<stat>,[<alpha>],<length><CR><LF><pdu>
⚫ Failed to execute the command:
<CR><LF>ERROR<CR><LF>

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

AT+CMGF=0 Set PDU mode.


OK
AT+CSCS="UCS2"
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.

Copyright © Neoway Technology Co., Ltd. 48


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.7 AT+CMGL–SMS Message List


To read SMS messages of one type from the current memory specified by the +CPMS command.

Format

Type Command Response


TEXT mode (+CMGF=1)
⚫ The command is executed successfully
SMS-SUBMITs or SMS-DELIVERs:
<CR><LF>+CMGL:
<index>,<stat>,<oa/da>,[<alpha>],[<scts>][,<tooa/tod
a>,<length>]<CR><LF>
<data>[<CR><LF>+CMGL:
<index>,<stat>,<da/oa>,[<alpha>],[<scts>][,<tooa/tod
a>,<length>]<CR><LF><data>[...]]
⚫ The command is executed successfully and the
command belongs to SMS-STATUS-REPORTs:
<CR><LF>+CMGL:
<index>,<stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>,
Execute AT+CMGL[=<stat>]<CR> <st>[<CR><LF>+CMGL:
<index>,<stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>,
<st>[...]]
⚫ The command is executed successfully and the
command belongs to SMS-COMMANDs:
<CR><LF>+CMGL:
<index>,<stat>,<fo>,<ct>[<CR><LF>+CMGL:
index>,<stat>,<fo>,<ct>[...]]
⚫ The command is executed successfully and the
command belongs to CBM storage:
<CR><LF>+CMGL:
<index>,<stat>,<sn>,<mid>,<page>,<pages><CR><L
F><data>[<CR><LF>+CMGL:
<index>,<stat>,<sn>,<mid>,<page>,<pages><CR><L

Copyright © Neoway Technology Co., Ltd. 49


N706 AT Commands Manual
Chapter 4 SMS Commands

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>

<CR><LF>+CMGL: (list of supported <stat>s)<CR><LF>


Test AT+CMGL=?<CR>
<CR><LF>OK<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",

Copyright © Neoway Technology Co., Ltd. 50


N706 AT Commands Manual
Chapter 4 SMS Commands

"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

4.8 AT+CMGS–Sending SMS Messages


To send an SMS message from the module to the network. The network will return reference value
<mr> to the module after the SMS message is sent successfully.

Format

Type Command Response


Sent successfully in Text mode:
Text mode: <CR><LF>+CMGS: <mr>[,<scts>]<CR><LF>
AT+CMGS=<da>[,<toda>]<CR>te <CR><LF>OK<CR><LF>
xt is entered<Ctrl+Z/ESC> Sent successfully in PDU mode:
Execute
PDU mode: <CR><LF>+CMGS: <mr>[,<ackpdu>]<CR><LF>
AT+CMGS=<length><CR>PDU is <CR><LF>OK<CR><LF>
given<Ctrl+Z/ESC> Failed to execute the command:
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 51


N706 AT Commands Manual
Chapter 4 SMS Commands

<ackpdu> GPP 23.040 RP-User-Data element of RP-ACK PDU

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

4.9 AT+CMGW–Writing SMS Messages


To write an SMS message into the memory. The location information <index> will be returned after the
message is saved correctly.

Format

Type Command Response


⚫ Text mode:
AT+CMGW[=<oa/da>[,<tooa/toda>[,<stat <CR><LF>+CMGW: <index><CR><LF>
>]]]<CR>text is entered<Ctrl+Z/ESC> <CR><LF>OK<CR><LF>
Execute
⚫ PDU mode: Or
AT+CMGW=<length>[,<stat>]<CR>PDU <CR><LF>ERROR<CR><LF>
is given<Ctrl+Z/ESC>

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.

Copyright © Neoway Technology Co., Ltd. 52


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.10 AT+CMSS–Sending Messages from Storage


To send an SMS message specified by <index> in the memory (SMS-SUBMIT).
The network returns reference value <mr> to the end device after the SMS message is sent
successfully.

Format

Type Command Response


Sent successfully in Text mode:
<CR><LF>+CMSS: <mr>[,<scts>]<CR><LF>
<CR><LF>OK<CR><LF>
Sent successfully in PDU mode:
AT+CMSS=<index>[,<da>[,<toda>]]
Execute <CR><LF>+CMSS:
<CR>
<mr>[,<ackpdu>]<CR><LF>
<CR><LF>OK<CR><LF>
Failed to execute the command:
<CR><LF>ERROR<CR><LF>

Parameter
<index> Indicates message location
<da> The destination number of the SMS messages.

Copyright © Neoway Technology Co., Ltd. 53


N706 AT Commands Manual
Chapter 4 SMS Commands

<toda> Type of address


<mr> Message reference number
<scts> Service center time stamp
<ackpdu> 3GPP 23.040 RP-User-Data element of RP-ACK PDU

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

4.11 AT+CMGD–Deleting SMS Messages


To delete SMS messages from the current memory.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+CMGD=<index>[,<delflag>]<CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CMGD: (list of supported


<index>s, list of supported
Test AT+CMGD=?<CR>
<delflag>s)<CR><LF>
<CR><LF>OK<CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 54


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.12 AT+CSCA–Service Center Address


To set the SMSC address. N706 does not supports this command while in CDMA mode.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CSCA=<sca>[,<tosca>]<CR> Or
<CR><LF>ERROR<CR><LF>

<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.

A pair of quotation marks is not a must for the SMSC address.

Example
AT+CSCA="+8613800755500",145
Set an international SMSC address.
OK

Copyright © Neoway Technology Co., Ltd. 55


N706 AT Commands Manual
Chapter 4 SMS Commands

AT+CSCA?
+CSCA: "+8613800755500",145 Query the SMSC address.
OK

4.13 AT+CSMP–Setting Text Mode Parameters


To select values for additional parameters needed when SM is sent to the network or placed in a
storage when text format message mode is selected. It is possible to set the validity period starting
from when the SM is received by the SMSC (<vp> is in range 0... 255) or define the absolute time of
the validity period termination (<vp> is a string).

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CSMP[=<fo>[,<vp>[,<pid>[,<dcs>]]]]<CR> Or
<CR><LF>ERROR<CR><LF>

<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

144-167 12hours +((vp–143)*30mins), 24 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).

The default value is 17,167,0,0.

Copyright © Neoway Technology Co., Ltd. 56


N706 AT Commands Manual
Chapter 4 SMS Commands

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

4.14 AT+CSDH–Showing Text Mode Parameters


To control whether detailed header information is shown in text mode result codes. This command is
valid in text mode, which can be set by AT+CMGF=1.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+CSDH[=<show>]<CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CSDH: <show><CR><LF>
Query AT+CSDH?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CSDH: (list of supported <show>s)<CR><LF>


Test 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

Copyright © Neoway Technology Co., Ltd. 57


N706 AT Commands Manual
Chapter 4 SMS Commands

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

Copyright © Neoway Technology Co., Ltd. 58


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

5 TCP/UDP Client Commands

5.1 AT+NETAPN–Setting Network APN


To set the network APN.

Format

Type Command Response


AT+NETAPN="APN","username","
Set <CR><LF>OK<CR><LF>
password"<CR>

<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

5.2 AT+XIIC–Setting up a PPP Link


To set up a PPP link.

Copyright © Neoway Technology Co., Ltd. 59


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+XIIC=<n><CR> Or
<CR><LF>ERROR<CR><LF>

<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.

5.3 AT+TCPSETUP–Setting up a TCP Connection


To set up a TCP connection.

Copyright © Neoway Technology Co., Ltd. 60


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+TCPSETUP=<n>,<ip>,<port><CR> Or
<CR><LF>ERROR<CR><LF>

URC +TCPSETUP: 0,<result>

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

Copyright © Neoway Technology Co., Ltd. 61


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

5.4 AT+TCPSEND–Sending TCP Data


To send TCP data.

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.

The mode setting is not saved. Set it when sending data.

⚫ Ensure that a TCP connection is set up before sending TCP data.

⚫ Run AT+IPSTATUS to check the buffer size before sending data.

⚫ 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.

⚫ To send data containing more than 15 commas, use buffer mode.

Format

Type Command Response


<CR><LF>><content>
<CR><LF>OK<CR><LF>
Or
<CR><LF>OK<CR><LF>
Or
<CR><LF>+TCPSEND: ERROR<CR><LF>
Or
<CR><LF>+TCPSEND: <n>, OPERATION
AT+TCPSEND=<n>,<length>[[
Execute EXPIRED<CR><LF>
,<content>][,mode]]<CR>
Or
<CR><LF>+TCPSEND: SOCKET ID OPEN
FAILED<CR><LF>
Or
<CR><LF>+TCPSEND: DATA LENGTH
ERROR<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 62


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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.

5.5 AT+RECVMODE–Setting Receive Mode


To set the receive mode of TCP and UDP data. The setting by this command is not saved after the
module is powered off.

Do not send this command during communication because it will clear the buffer. This command also
works for UDP data.

Copyright © Neoway Technology Co., Ltd. 63


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+RECVMODE=<n>[,<mode>]<CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+RECVMODE: <n>,<mode>
Query AT+RECVMODE?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+RECVMODE: (list of supported


Test AT+RECVMODE=?<CR> <n>s), (list of supported <mode>s)
<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

5.6 +TCPRECV–URC Notifying Data Received from


Server
To notify TCP data received from the TCP server.

Copyright © Neoway Technology Co., Ltd. 64


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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.

5.7 A+TCPREAD–Reading TCP Data


To read TCP data.

The receive mode is set by the +RECVMODE command.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+TCPREAD=<n>,<length><CR> Or
<CR><LF>ERROR<CR><LF>

Parameter
<n> Socket ID, ranging from 0 to 5.
<length> maximum length of data allowed to read, ranging from 1 to 2048 bytes.

Copyright © Neoway Technology Co., Ltd. 65


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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.

5.8 AT+TCPCLOSE–Closing a TCP Connection


To close a TCP connection.

Format

Type Command Response


<CR><LF>+TCPCLOSE: <n>,OK<CR><LF>
Execute AT+TCPCLOSE=<n><CR> Or
<CR><LF>+TCPCLOSE: ERROR<CR><LF>

URC +TCPCLOSE:0,Link Closed

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.

5.9 AT+UDPSETUP–Setting up a UDP Connection


To set up a UDP connection.

Use the AT+XIIC=1 command to set up a PPP link before running this command.

Copyright © Neoway Technology Co., Ltd. 66


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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>

⚫ If the parameter is incorrect, "+UDPSETUP: ERROR" is prompted.

⚫ If the socket ID is used, for example, socket 0, "+UDPSETUP: 0,ERROR1" is prompted.

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

Copyright © Neoway Technology Co., Ltd. 67


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

AT+UDPSET=0,58.60.184.213,10012
The AT command is not complete.
ERROR

5.10 AT+UDPSEND–Sending UDP Data


To send UDP data.

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).

Copyright © Neoway Technology Co., Ltd. 68


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

<content> data sent in command mode, ranging from 0 to 1024.


To send data containing more than 15 commas, use buffer mode.
<mode> data format
0: ASCII
1: HEX

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.

+UDPSEND: 0,6 Successfully


AT+UDPSEND=0,10 After the data sending command is input and > is returned,
> no more data is entered in 30 seconds. Then the expiration
+UDPSEND: 0,OPERATION EXPIRED information is displayed.

5.11 +UDPRECV–URC Notifying UDP Data Received


To notify that UDP data is received.

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>.

Copyright © Neoway Technology Co., Ltd. 69


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

Example
+UDPRECV: 0,10,1234567890 10-byte of data is received on socket 0. The data is 1234567890.

5.12 AT+UDPREAD–Reading UDP Data


To read UDP data. Executing the +RECVMODE command to select the receive mode is required.

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

5.13 AT+UDPCLOSE–Closing UDP Link


To close the UDP connection.

Copyright © Neoway Technology Co., Ltd. 70


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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

5.14 AT+IPSTATUS–Querying the Transparent TCP/UDP


Socket Status
To query the transparent TCP/UDP socket status.

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

Type Command Response


<CR><LF>+IPSTATUS: <n>,<CONNECT or
DISCONNECT >[,<TCP or UDP>,<send-buffer-size>]
<CR><LF>OK<CR><LF>
Execute AT+IPSTATUS=<n><CR> Or
<CR><LF>+IPSTATUS: 1,DISCONNECT<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

Parameter
<STATUS> Socket type, value: CONNECT or DISCONNECT.

Copyright © Neoway Technology Co., Ltd. 71


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

<CONNECT or DISCONNECT> Socket type, value: CONNECT or DISCONNECT;


CONNECTING or DISCONNECTING
<TCP or UDP> socket type, value: TCP or UDP
<send-buffer-size> The size of the available send buffer on the module, in
decimal ASCII mode. Unit: byte.

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

Querying of the <send-buffer-size> parameter is not supported on the UDP link.

5.15 AT+TCPACK–Querying Status of Data Sent by TCP


Socket
To query the size of data successfully sent by the TCP server and the size of the data successfully
received.

Format

Type Command Response


<CR><LF>+TCPACK: <n>,<data_sent>,<acked_recv><CR><LF>
Or
<CR><LF>ERROR<CR><LF>
Execute AT+TCPACK<CR> Or
<CR><LF>+TCPACK: <n>,DISCONNECT<CR><LF>
Or
<CR><LF>+TCPACK: NO TCP LINK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 72


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

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

5.16 AT+DNSSERVER–Setting DNS Server


To set primary and secondary DNS servers.

In general, you do not have to set DNS server, which will be issued by base station during PPP
negotiation.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+DNSSERVER=<n>,<dns-ip><CR> Or
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 73


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

<dns-ip> IP address of the 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

5.17 AT+PDPKEEPALIVE–Setting PDP Keepalive


Heartbeat
To set PDP keepalive heartbeat.

Set up a PPP connection before setting the domain name parameters.

Activate PDP before sending this command.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+PDPKEEPALIVE=<onoff>,<inerval><CR> Or
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 74


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

5.18 AT+PDPSTATUS–Querying PDP Status


To query the status of PDP.

The status is returned immediately if PDP keepalive heartbeat is enabled.

If PDP keepalive heartbeat is disabled, the status is returned after a delay (200 ms to 10000 ms,
depending on network conditions).

Format

Type Command Response


Execute AT+PDPSTATUS<CR> <CR><LF>+PDPSTATUS: <status><CR><LF>

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

5.19 AT+TCPKEEPALIVE–Setting TCP Keepalive


Heartbeat
To set the TCP keepalive heartbeat.

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.

Copyright © Neoway Technology Co., Ltd. 75


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

This function consumes data traffic.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+TCPKEEPALIVE=<mode>[,<time>[,
Set Or
<interval>[,<keepcount>]]]<CR>
<CR><LF>ERROR<CR><LF>

<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:

Copyright © Neoway Technology Co., Ltd. 76


N706 AT Commands Manual
Chapter 5 TCP/UDP Client Commands

<time>: 120 - 300s


<interval>: 40 - 100s

Example
AT+TCPKEEPALIVE=1 Enable the KEEPALIVE function.
OK

AT+TCPKEEPALIVE=1,120,75,9 Enable and set the KEEPALIVE parameters.


OK
AT+TCPKEEPALIVE=0 Disable the KEEPALIVE function.
OK
AT+TCPKEEPALIVE? Query the setting of the KEEPALIVE parameters.
+TCPKEEPALIVE: 1,120,75,9
OK
AT+TCPKEEPALIVE=?
+TCPKEEPALIVE: (0-1),(30-7200),(1-1800),(0-15)
OK

Copyright © Neoway Technology Co., Ltd. 77


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

6 TCP/UDP Transparent Commands

6.1 AT+TCPTRANS–Setting up a Transparent TCP


Connection
To set up a transparent TCP connection.

⚫ 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

Type Command Response


<CR><LF>OK<CR><LF>
<CR><LF>+TCPTRANS:<result><
Set AT+TCPTRANS=<ip>,<port>[,<cfgt>,cfgp]<CR> CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 78


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

The default value is 2048.


<result> Result codes
OK
FAIL

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.

6.2 AT+UDPTRANS–Setting up a Transparent UDP


Connection
To set up a transparent UDP connection.

⚫ 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.

Copyright © Neoway Technology Co., Ltd. 79


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+UDPTRANS=<ip>,<port>[,<cfgt> <CR><LF>+UDPTRANS:<result><CR><LF>
Set
,cfgp]<CR> Or
<CR><LF>ERROR<CR><LF>

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.

6.3 AT+TCPACK–Querying of Data Transmitted Status


To query the size of data successfully sent and received over the transparent TCP connection.

Copyright © Neoway Technology Co., Ltd. 80


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

Format

Type Command Response


<CR><LF>+TCPACK:<data_sent>,<acked_recv><CR><LF>
Or
<CR><LF>ERROR<CR><LF>
Execute AT+TCPACK<CR> Or
<CR><LF>+TCPACK: DISCONNECT<CR><LF>
Or
<CR><LF>+TCPACK: NO TCP LINK<CR><LF>

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

6.4 AT+IPSTATUS–Querying the TCP/UDP Socket Status


To query the transparent TCP/UDP socket status.

Format

Type Command Response


<CR><LF>+IPSTATUS:<state>[,<type>,<send-buffer-size>]
<CR><LF>
Execute AT+IPSTATUS<CR>
Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 81


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

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

6.5 AT+TRANSCLOSE–Closing the Transparent


Connection
To close the transparent transmission connection.

Format

Type Command Response


<CR><LF>+TRANSCLOSE:<n>,OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>
Execute AT+TRANSCLOSE<CR> Or
<CR><LF>+UDPTRANS:Link Closed
Or
<CR><LF>+TCPTRANS:Link Closed

Parameter
<n> 0: close the transparent TCP connection.
1: close the transparent UDP connection.

Copyright © Neoway Technology Co., Ltd. 82


N706 AT Commands Manual
Chapter 6 TCP/UDP Transparent Commands

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.

Copyright © Neoway Technology Co., Ltd. 83


N706 AT Commands Manual
Chapter 7 FTP Commands

7 FTP Commands

7.1 AT+FTPLOGIN–Logging in to the FTP Server


To log in to the FTP server.

⚫ 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.

⚫ The FTP function is in passive mode by default.

Format

Type Command Response


<CR><LF>OK<CR><LF>
<CR><LF>+FTPLOGIN: <result>
Or
AT+FTPLOGIN=<ip>,<port>,<user>, <CR><LF>OK<CR><LF>
Execute
<pwd>[,<ftpmode>]<CR> <CR><LF>+FTP: Server Control Link
Disconnect<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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)

Copyright © Neoway Technology Co., Ltd. 84


N706 AT Commands Manual
Chapter 7 FTP Commands

<result> Result codes


Have Logged In: The user has logged in to the FTP server.
AT Busy: Last FTP AT command has not been executed completely.
User logged in: The user logs in to the FTP server successfully.
530 Not logged in: The user fails to log in to the FTP server because the user
account or password is incorrect.
GPRS DISCONNECTION: The user logged in to the FTP server before a PPP link
is set up.

Example
AT+FTPLOGIN=219.134.179.52,21,user1,pwd2009
OK
Log in to the server.

+FTPLOGIN: User logged in


AT+FTPLOGIN=183.239.240.40,12150,pp,123
OK Fail to log in to the server; the user account
or password is incorrect.
+FTPLOGIN: 530 Not logged in
AT+FTPLOGIN=58.60.184.213,21,neoway,neoway
OK
Failed to log in to the FTP server.

+FTPLOGIN: FAIL
+FTP:Server Control Link Disconnect The FTP control link closes.
+FTP: Server Data Link Disconnect The FTP data link closes.

7.2 AT+FTPLOGOUT–Logging out from the FTP Server


To log out from the FTP server.

Format

Type Command Response


<CR><LF>+FTPLOGOUT:User logged out
<CR><LF>OK<CR><LF>
Or
Execute AT+FTPLOGOUT<CR>
<CR><LF>+CME ERROR: INVALID SOCKET
ID<CR><LF>
<CR><LF>ERROR<CR><LF>

Example
AT+FTPLOGOUT
Exit from the FTP server.
+FTPLOGOUT:User logged out

Copyright © Neoway Technology Co., Ltd. 85


N706 AT Commands Manual
Chapter 7 FTP Commands

OK
AT+FTPLOGOUT
+CME ERROR: INVALID SOCKET ID
Log out of the FTP server because the FTP server is offline.

ERROR

7.3 AT+FTPGET–Downloading Data from the FTP Server


To download data from the FTP server.

Format

Type Command Response


<CR><LF>+FTPGET: Error Not Login<CR><LF>
Or
<CR><LF>+FTPGET: Error TimeOut<CR><LF>
Or
AT+FTPGET=<dir&filename>
<CR><LF>+FTPGET: <length>,<data><CR><LF>
Execute ,<type>,<Content or
Or
Info>[,offset[,lenth]] <CR>
<CR><LF>+FTPGET: OK.total length is
<n><CR><LF>
Or
<CR><LF>ERROR<CR><LF>

URC +FTPSTATE: <result>

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.

Copyright © Neoway Technology Co., Ltd. 86


N706 AT Commands Manual
Chapter 7 FTP Commands

Example
AT+FTPGET=,1,2
OK

+FTPGET:446,drw-rw-rw- 1 user group


0 Apr 14 15:55 .
drw-rw-rw- 1 user group 0
Apr 14 15:55 ..
Obtain information under the root directory.
-rw-rw-rw- 1 user group 1238528
Jan 14 10:36 1M.doc
-rw-rw-rw- 1 user group 10
Jan 15 15:01 test.txt
+FTPGET: OK.total length is 446

+FTP:Server Data Link Disconnect


AT+FTPGET=test.txt,1,2
OK

+FTPGET:65,-rw-rw-rw- 1 user group


Obtain information of test.txt.
10 Jan 15 15:01 test.txt
+FTPGET:OK.total length is 65

+FTP:Server Data Link Disconnect


AT+FTPGET=123.txt,1,1
The file is inexistent.
+FTPGET: File Not Found
AT+FTPPUT=test.txt,1,2,10
> 10-byte data is successfully uploaded.
+FTPPUT: OK,10
AT+FTPGET=test.txt,1,1
+FTPGET:10,0123456789
+FTPGET: OK.total length is 10 Read all data.

+FTP:Server Data Link Disconnect


AT+FTPGET=test.txt,1,1,2
+FTPGET:8,23456789
+FTPGET:OK.total length is 8 Offset 2 bytes, read all data after the third byte.

+FTP:Server Data Link Disconnect


AT+FTPGET=test.txt,1,1,2,4
+FTPGET:4,2345 Offset 2 bytes, read 4-byte data after the third byte.
+FTPGET:OK.total length is 4

7.4 AT+FTPPUT–Uploading Data to the FTP Server


To upload data to the FTP Server.

Format

Type Command Response


Execute AT+FTPPUT=<filename>,<type>, In non-transparent mode

Copyright © Neoway Technology Co., Ltd. 87


N706 AT Commands Manual
Chapter 7 FTP Commands

<mode>[,<size>]<CR> <CR><LF>+FTPPUT: OK,<size><CR><LF>


In transparent mode:
<CR><LF>CONNECT
<CR><LF>+FTPPUT: OK,<size><CR><LF>
Or
<CR><LF>+FTPPUT:Error Not Login<CR><LF>
Or
<CR><LF>+FTPPUT:AT Busy<CR><LF>
Or
<CR><LF>+FTPPUT:SIZE Error (non-transparent
mode)
Or
<CR><LF>+FTPPUT:OK,<n><CR><LF>
Or
<CR><LF>+FTPPUT:Delete File OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

⚫ 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.

Copyright © Neoway Technology Co., Ltd. 88


N706 AT Commands Manual
Chapter 7 FTP Commands

⚫ +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

7.5 AT+FTPSIZE–Obtaining the FTP File Size


To obtain the size of the specified file on the FTP server.

Format

Type Command Response


<CR><LF>+FTPSIZE: <size>
<CR><LF>OK<CR><LF>
Or
Execute AT+FTPSIZE=<filename><CR>
<CR><LF>+FTPSIZE: File Not Found<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 89


N706 AT Commands Manual
Chapter 7 FTP Commands

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

7.6 AT+FTPSTATUS–Querying the FTP Connection


Status
To query the FTP connection status.

Format

Type Command Response


Execute AT+FTPSTATUS<CR> <CR><LF>+FTPSTATUS: <status>,<ip>,<port><CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 90


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8 HTTP/HTTPS Commands

8.1 AT+HTTPPARA–Setting HTTP Parameters


To set HTTP parameters.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+HTTPPARA=<para>,<para_value><CR> Or
<CR><LF>ERROR<CR><LF>

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

AT+HTTPPARA=url,”121.15.200.97/Service1.asmx/GetNote” Set URL.


OK
AT+HTTPPARA=url, The AT command format is incorrect.
ERROR
AT+HTTPPARA=port,80 Set the destination port to 80.
OK
AT+HTTPPARA=port,8080 Set the destination port to 8080.

Copyright © Neoway Technology Co., Ltd. 91


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

OK

8.2 AT+HTTPSETUP–Setting up an HTTP Connection


To set up an HTTP connection.

⚫ 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

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+HTTPSETUP<CR> Or
<CR><LF>+HTTPSETUP: FAIL<CR><LF>

Parameter

N/A.

Example
AT+HTTPSETUP Set up an HTTP connection.
OK Successful
AT+HTTPSETUP Set up an HTTP connection.
+HTTPSETUP: FAIL Failed

8.3 AT+HTTPACTION–HTTP Request


To execute the HTTP request.

Copyright © Neoway Technology Co., Ltd. 92


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
⚫ AT+HTTPACTION=<mode>[, <CR><LF>ERROR<CR><LF>
<length>[,<type>]]<CR> Or
Execute
⚫ AT+HTTPACTION=<mode>[, <CR><LF>+HTTPACTION:SOCKET ID OPEN
<offset>,<size>]<CR> FAILED<CR><LF>
Or
<CR><LF>+HTTPSEND: ERROR<CR><LF>

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.

⚫ Comply with the HTTP protocol when defining packets.

⚫ 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:

Copyright © Neoway Technology Co., Ltd. 93


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

HTTP/1.1 200 OK Receive the response from the HTTP


Cache-Control: private server.
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=rh3fjg554ufzb145aevgzz45;
path=/; HttpOnly
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Thu, 28 Nov 2013 03: 06: 57 GMT
Connection: close
Content-Length: 13842

/*neoway homepage, html format, 13842 bytes*/


……..
/* neoway homepage*/

+HTTPCLOSED: HTTP Link Closed

The server finishes the response and


disconnects the connection.
Set the destination address. The
AT+HTTPPARA=url,”www.neoway.com.cn/en/index.aspx” default port is 80.
OK
AT+HTTPSETUP Set up an HTTP connection.
OK
AT+HTTPACTION=1 HEAD request
OK

+HTTPRECV: The HTTP server responds.


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=znt4fqabqsuclz55pvfufn55;
path=/; HttpOnly
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Thu, 28 Nov 2013 03: 32: 35 GMT
Connection: close

+HTTPCLOSED: HTTP Link Closed

AT+HTTPPARA=url,”121.15.200.97/Service1.asmx/GetNote” Set URL.


OK
AT+HTTPPARA=port,8080 Set the destination port to 8080.
OK
AT+HTTPSETUP Set up an HTTP connection.
OK
AT+HTTPACTION=2,25 POST request. Send 23 bytes; enter the
>MAC=NEOWAY&DATA=0123456 contents to be uploaded after > is
displayed.
OK

Copyright © Neoway Technology Co., Ltd. 94


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

+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

<?xml version="1.0" encoding="utf-8"?>


<string xmlns="http: //wsliu.cn/">NEOWAY+0123456
</string>
The server replies an XML file
+HTTPCLOSED: HTTP Link Closed containing the uploaded content
NEOWAY and 0123456.

The server disconnected with the


module after it finished responding.
Set URL.

Use the default port 80 to set up an


AT+HTTPPARA=url,”www.neoway.com.cn/en/index.aspx”
HTTP connection.
OK
AT+HTTPSETUP
Use custom packet mode to send 76-byte
OK
packets.
AT+HTTPACTION=99,76
>HEAD /en/index.aspx HTTP/1.1
connection: close
HOST: www.neoway.com.cn

OK

Receive the response from the HTTP


+HTTPRECV:
server.
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
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

+HTTPCLOSED: HTTP Link Closed

The server finishes responding and


close the connection.
AT+HTTPACTION=0 PPP is not enabled or SOC connection
+HTTPACTION:SOCKET ID OPEN FAILED encounters an error.
AT+HTTPACTION=0
Failed to send data.
+HTTPSEND: ERROR
AT+HTTPACTION=2,adasd
Other errors
ERROR

Copyright © Neoway Technology Co., Ltd. 95


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8.4 AT+HTTPCLOSE–Closing the Socket of an HTTP


Client
To close the socket of an HTTP client.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+HTTPCLOSE<CR> Or
<CR><LF>ERROR<CR><LF>

URC +HTTPCLOSE: <result>

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.

+HTTPCLOSE: HTTP Link Closed


AT+HTTPCLOSE
OK is returned.
OK

8.5 +HTTPRECV–URC Notifying HTTP Data Received


To notify data received from the HTTP connection.

Copyright © Neoway Technology Co., Ltd. 96


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

+HTTPCLOSED: HTTP Link Closed


+HTTPRECV: 803,HTTP/1.1 206 Partial Content
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 10
Content-Range: bytes 0-9/14615
Content-Type: text/html
Date: Tue, 10 Jul 2018 00:55:30 GMT
Etag: "5b3c3650-3917"
Last-Modified: Wed, 04 Jul 2018 02:52:00 GMT
P3p: CP=" OTI DSP COR IVA OUR IND COM "
Pragma: no-cache
Format of the received data
Server: BWS/1.1
when RECVMODE is set to 1.
Set-Cookie: BAIDUID=F18E6894A34321D8CF9AAF28C14FACC9:FG=1;
expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/;
domain=.baidu.com
Set-Cookie: BIDUPSID=F18E6894A34321D8CF9AAF28C14FACC9; expires=Thu,
31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
Set-Cookie: PSTM=1531184130; expires=Thu, 31-Dec-37 23:55:55 GMT;
max-age=2147483647; path=/; domain=.baidu.com
Vary: Accept-Encoding
X-Ua-Compatible: IE=Edge,chrome=1

<!DOCTYPE

Copyright © Neoway Technology Co., Ltd. 97


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8.6 AT+HTTPGET–Downloading HTTP Files


To download HTTP files.

⚫ 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

Type Command Response


<CR><LF>OK<CR><LF>
AT+HTTPGET=<type>[,<check_type>,<check_
Execute Or
value>[,<dir_mode>]]<CR>
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 98


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

+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

8.7 +HTTPGETRPT–URC Notifying Downloading Result


To notify downloading results.

⚫ This command indicates the execution result of AT+HTTPGET.

⚫ 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

Copyright © Neoway Technology Co., Ltd. 99


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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
505 HTTP Version Not Supported

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

Copyright © Neoway Technology Co., Ltd. 100


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8.8 AT+HTTPGETSTAT?–Querying the HTTP


Downloading Result
To query the HTTP GET process and the downloading result.

Format

Type Command Response


<CR><LF>+HTTPGETSTAT:
Query AT+HTTPGETSTAT?<CR>
<state_type>[,<err_code>]<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 101


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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
505 HTTP Version Not Supported

Example
AT+HTTPGET=0
OK
AT+HTTPGETSTAT?
+HTTPGETSTAT: 10
OK
AT+APHTTPGET=1
+HTTPGETSTAT: 30
OK

8.9 +HTTPCLOSED–URC Notifying Socket of the HTTP


Client is Closed
To notify the socket of the HTTP client is closed.

Format

Type Command
URC <CR><LF>+HTTPCLOSED: HTTP Link Closed<CR><LF>

Parameter

N/A.

Example
+HTTPCLOSED: HTTP Link Closed The HTTP connection closes.

Copyright © Neoway Technology Co., Ltd. 102


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8.10 AT+HTTPSCFG–Configuring SSL Parameters for


HTTPS
To configure SSL parameters for HTTPS,

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+HTTPSCFG=<type>,<type_n
Set Or
ame><CR>
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 103


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

8.11 AT+HTTPSPARA–Setting HTTPS Parameters


To set HTTPS parameters.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+HTTPSPARA=<para>,<para_value><CR> Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 104


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

is displayed in the +HTTPRECV: <length>,<data> format.


<para_value> Corresponding to the value of <para>, 512 bytes at most for URL; 443 by default
for port.URLsupport domain name resolution.

⚫ To send new HTTPS request, set new HTTPS parameters.

⚫ 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

8.12 AT+HTTPSSETUP–Setting up an HTTPS


Connection
To set up an HTTPS connection.

⚫ 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

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+HTTPSSETUP<CR> Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 105


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

8.13 AT+HTTPSACTION–Sending an HTTPS Request


To send an HTTPS request.

Format

Type Command Response


⚫ AT+HTTPSACTION=<mode>[,<length>
<CR><LF>OK<CR><LF>
[,<type>]<CR>
Execute Or
⚫ AT+HTTPSACTION=<mode>[,<offset>,
<CR><LF>ERROR<CR><LF>
<size>]<CR>

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.

Copyright © Neoway Technology Co., Ltd. 106


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

<size> Size of file to be downloaded in GET mode.

⚫ Comply with the HTTP protocol when defining packets.

⚫ 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

To set up an HTTPS connection.


+HTTPSRECV:
HTTP/1.1 200 OK
Server: QUALCOMM
X-Powered-By: Servlet/2.5 JSP/2.1
HEAD request
Content-Type: text/html; charset=ISO-8859-1
Date: Sat, 15 Feb 2014 6:05:39 AM GMT
HTTPS server responses.
Content-Length: 0
Connection: close
Set-Cookie:
JSESSIONID=qyNVS1DSmnjS9cvh72yW1xz1jtjBBRj0yv0zTmMy2LVyBG
7HK02b!1955538012; path=/; HttpOnly

Copyright © Neoway Technology Co., Ltd. 107


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

+HTTPSCLOSED: HTTPS Link Closed


AT+HTTPSPARA=url,mybank.icbc.com.cn/icbc/perbank/index.js
p
OK
AT+HTTPSPARA=port,443
OK
AT+HTTPSSETUP
OK
AT+HTTPSACTION=99,500
>POST /icbc/perbank/index.jsp HTTP/1.1<CRLF> /*custom header
information*/
Connection: close<CRLF> /*custom header information*/
Host: mybank.icbc.com.cn<CRLF> /*custom header OPEN_MODE, user-defined packet mode.
information*/ Note that the packet length contains
Content-Length: 10<CRLF> /*custom header information*/ the user-defined header information.
Content-Type: application/x-www-form-urlencoded<CRLF>
/*custom header information*/
<CRLF><CRLF>
/*Content to be sent*/
……

+HTTPSRECV:
/*home page, html format*/
……..
/*Homepage content*/
+HTTPSCLOSED: HTTPS Link Closed

8.14 AT+HTTPSCLOSE–Closing an HTTPS Connection


To close an HTTPS connection.

After the +HTTPSCLOSE command is sent, the HTTPS socket is closed and the setting of +HTTPPARA is kept.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+HTTPSCLOSE<CR> Or
<CR><LF>ERROR<CR><LF>

URC +HTTPSCLOSE: <state>

Copyright © Neoway Technology Co., Ltd. 108


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

Parameter
<state> HTTPS Link Closed Close the HTTPS connection.

Example
AT+HTTPSCLOSE
OK
Close the HTTPS connection.

+HTTPSCLOSE: HTTPS Link Closed

8.15 +HTTPSRECV–URC Notifying HTTPS Data


Received
To notify data received over 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

Copyright © Neoway Technology Co., Ltd. 109


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

+HTTPSCLOSED: HTTPS Link Closed


+HTTPSRECV: 832,HTTP/1.1 206 Partial Content
Server: Tengine/2.1.0
Date: Tue, 10 Jul 2018 1:09:25 AM GMT
Content-Type: text/html; charset=utf-8
Content-Length: 10
Connection: keep-alive
x-server-id: 40-5005
request-id: 0bea4b2215311849654971530e6674
Accept-Ranges: bytes
set-cookie: ctoken=MBHI38pHhdL6q0ltGFqjkviz; path=/;
domain=.alipay.com; secure
set-cookie:
ALIPAYJSESSIONID=jMi6e4Q2JmIN8HRk68wm53KXisfnB5H0homeproxy; Format of the received data when
path=/; domain=.alipay.com RECVMODE is set to 1.
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-download-options: noopen
strict-transport-security: max-age=31536000
Content-Range: bytes 0-9/21651
x-readtime: 2
Set-Cookie: ssl_upgrade=0;path=/;secure;
Set-Cookie:
spanner=aGuTtGMbvBcOy1dCyZ/e4JI97JSiPcR1Xt2T4qEYgj0=;path=/;se
cure;
Via: spanner-internet-g2-35.em14[206]

8.16 AT+HTTPSGET–Download HTTPS Files


To download HTTPS files.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+HTTPSGET=<type>[,<check_typ
Execute Or
e>,<check_value>]<CR>
<CR><LF>ERROR<CR><LF>

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)

Copyright © Neoway Technology Co., Ltd. 110


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

8.17 +HTTPSGETRPT–URC Notifying Downloading


Result
To notify HTTPS downloading results in GET method.

⚫ This command indicates the execution result of AT+HTTPGET.

⚫ Different result codes are reported according different results during downloading, verification, and
decompression processes.

Copyright © Neoway Technology Co., Ltd. 111


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

Copyright © Neoway Technology Co., Ltd. 112


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

505 HTTP Version Not Supported

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

8.18 AT+HTTPSGETSTAT?–Querying the Download


Result
To query the HTTPS GET process and the download result.

Format

Type Command Response


<CR><LF>+HTTPSGETSTAT:
Execute AT+HTTPSGETSTAT?<CR>
<state_type>[,<err_code>]<CR><LF>

Parameter
<state_type> Status type
0: unknown result
10: successful download
11: failed download
20: successful decompression
21: failed decompression
30: successful verification

Copyright © Neoway Technology Co., Ltd. 113


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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
505 HTTP Version Not Supported

Example
AT+HTTPSGET=0
OK

AT+HTTPSGETSTAT?
+HTTPSGETSTAT: 10,303
OK

AT+APHTTPSGET=1
OK

+HTTPSGETSTAT: 30,303
OK

Copyright © Neoway Technology Co., Ltd. 114


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

8.19 AT+FILEHTTPACTION–HTTP Request in File


System
HTTP Request in File System

⚫ Establish an HTTP connection before executing this command.

⚫ Before downloading files through HTTP GET, ensure that there are enough remaining space in the file
system.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
AT+CMEE=0
<CR><LF>ERROR<CR><LF>
AT+FILEHTTPACTION=<mode>,<length>,
Or
<type>,<dir&filename><CR>
Execute AT+CMEE=1
AT+FILEHTTPACTION=<mode>,<offset>,
<CR><LF>+CME
<size>[,dir&filename]<CR>
ERROR:<errcode><CR><LF>
Or
<CR><LF>+CME
ERROR:<errtext><CR><LF>

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>

Copyright © Neoway Technology Co., Ltd. 115


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

supports 2166720 bytes at most.


<dir&filename> Path and name of the file needed.
When mode=0, you can specify the name of the file saved locally.
<errcode> 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
303 -- HTTPPARA CID Invalid
1001 -- PDP Not Active
<errtext> See the description in <errcode>.

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

8.20 AT+FILEHTTPACTION–HTTPS Request in File


System
HTTPS Request in File System

⚫ Establish an HTTP connection before executing this command.

⚫ Before downloading files through HTTP GET, ensure that there are enough remaining space in the file
system.

Copyright © Neoway Technology Co., Ltd. 116


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
AT+CMEE=0
AT+FILEHTTPSACTION=<mode>,<l <CR><LF>ERROR<CR><LF>
ength>,<type>,<dir&filename><CR> Or
Execute
AT+FILEHTTPSACTION=<mode>,< AT+CMEE=1
offset>,<size><CR> <CR><LF>+CMEERROR:<errcode><CR><LF>
Or
AT+CMEE=2
<CR><LF>+CME ERROR:<errtext><CR><LF>

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>.

Copyright © Neoway Technology Co., Ltd. 117


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

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

8.21 +FILEHTTPSTAT–URC Notifying the HTTP(S)


Uploading/Downloading Result
To notify the HTTP(S) uploading/downloading result.

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

AT+FILEHTTPSACTION=1,524288,0,text.txt The file with 524288 data length


OK

Copyright © Neoway Technology Co., Ltd. 118


N706 AT Commands Manual
Chapter 8 HTTP/HTTPS Commands

is posted successfully.
+FILEHTTPSTAT: 1,1,524288

8.22 +HTTPCLOSED–URC Notifying HTTP Link Closed


To notify the HTTPS link is closed.

Format

Type Command
URC <CR><LF>+HTTPSCLOSED: Link Closed <CR><LF>

Parameter

N/A.

Example
+HTTPSCLOSED: HTTPS Link Closed The HTTPS connection is disconnected.

Copyright © Neoway Technology Co., Ltd. 119


N706 AT Commands Manual
Chapter 9 Wi-Fi Function

9 Wi-Fi Function

9.1 AT+WIFIAPSCAN–Wi-Fi Hotspot Scanning


To scan for Wi-Fi hotspots around the module.

Format

Type Command Response


<CR><LF>+WIFIAPSCAN:<MAC
Address>,<rssi>,<channel>
Execute AT+WIFIAPSCAN<CR> <CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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

9.2 AT+WIFIGSMLOC–Wi-Fi Positioning


To perform Wi-Fi positioning function.

Copyright © Neoway Technology Co., Ltd. 120


N706 AT Commands Manual
Chapter 9 Wi-Fi Function

Before positioning, you need to scan Wi-Fi hot spot and then make a dial-up connection.

Format

Type Command Response


<CR><LF>FIGSMLOC: <fail_string><CR><LF>
Or
<CR><LF>+WIFIGSMLOC: {<result_string>}
<CR><LF>+WIFIGSMLOC: OK<CR><LF>
Or
Execute AT+WIFIGSMLOC =<n><CR>
<CR><LF><code>
<CR><LF>+WIFIGSMLOC: FAIL<CR><LF>
Or
<CR><LF>OK
<CR><LF>+WIFIGSMLOC: TIMEOUT<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 121


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

10 SSL TCP Data Service

10.1 AT+SSLTCPCFG–Configuring SSL Parameters for


TCP
To configure SSL encryption options.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+SSLTCPCFG=<type>,
Set Or
<type_name><CR>
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 122


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

⚫ 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

10.2 AT+SSLTCPSETUP–Setting up a TCP Connection


over SSL
To set up a TCP connection over SSL.

Do not establish non-transparent data services when using the transparent command, since the
transparent command conflicts with other non-transparent data services.

Format

Type Command Response


<CR><LF>OK<CR><LF>
<CR><LF>+SSLTCPSETUP: <n>,<status>
Or
<CR><LF>CONNECT
AT+SSLTCPSETUP=<n>,<ip
Execute Or
>,<port>,<mode><CR>
<CR><LF>+SSLTCPSETUP: ERROR
Or
<CR><LF>+SSLTCPSETUP: GPRS
DISCONNECTION

Copyright © Neoway Technology Co., Ltd. 123


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

<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

Copyright © Neoway Technology Co., Ltd. 124


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

10.3 AT+SSLTCPCLOSE–Closing a TCP Connection over


SSL
To close a TCP connection over SSL.

Format

Type Command Response


<CR><LF>+SSLTCPCLOSE: <socket_id>,<result>
Execute AT+SSLTCPCLOSE=<socket_id> Or
<CR><LF>+SSLTCPCLOSE: ERROR

URC +SSLTCPCLOSE: <socket_id>,Link Closed

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.

10.4 AT+SSLTCPSEND–Sending TCP Data over SSL


To send TCP data over SSL.

Format

Type Command Response


<CR><LF>>
AT+SSLTCPSEND=<socket_id>,<da
Execute <CR><LF>+SSLTCPSEND: <socket_id>,<result>
ta_length>
Or

Copyright © Neoway Technology Co., Ltd. 125


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

<CR><LF>+SSLTCPSEND: Data length


error<CR><LF>

<CR><LF>+SSLTCPSEND: (value range


Test AT+SSLTCPSEND=?
of<n>),(value range of<data_length>)<CR><LF>

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

10.5 +SSLTCPRECV–URC Notifying SSLTCP Data is


Received
To notify TCP data is received over SSL.

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.

Copyright © Neoway Technology Co., Ltd. 126


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

<data_length> Length of the data received.


<data> data received.

Example
+SSLTCPRECV: 1,20,12345678901234567890 Receive 20-byte data over socket 0.

10.6 AT+CERTADD–Adding SSL Certificate


To add an SSL certificate to the module.

The writing process can be interrupted by +++.

Format

Type Command Response


<CR><LF>CONNECT<CR><LF>
<CR><LF>+CERTADD: <length>,OK<CR><LF>
AT+CERTADD=<file_name>,<len Or
Execute
gth><CR> <CR><LF>+CERTADD: ERROR<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 127


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

10.7 AT+CERTCHECK–Checking the SSL Certificate


To check the SSL certificate.

Format

Type Command Response


<CR><LF>+CERTCHECK: <file_name>,OK
Execute AT+CERTCHECK=<file_name><CR> Or
<CR><LF>+CERTCHECK: ERROR

<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

10.8 AT+CERTDEL–Deleting an SSL Certificate


To delete an SSL certificate.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+CERTDEL[=<file_name>]<CR> Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 128


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

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

10.9 AT+SSLTCPCFGA–Configuring SSL Parameters for


TCP
To configure SSL encryption options.

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

Type Command Response


AT+SSLTCPCFGA=<sslversion>, <CR><LF>OK<CR><LF>
Set <authmode>,<cacert>,<clientcert> Or
,<clientkey><CR> <CR><LF>ERROR<CR><LF>
<CR><LF>+SSLTCPCFGA:
<sslversion>,<authmode>,<cacert>,<clientcert>,
Query AT+SSLTCPCFGA?<CR>
<clientkey>
<CR><LF>OK<CR><LF>
<CR><LF>+SSLTCPCFGA:<sslversion>,<authmo
Test AT+SSLTCPCFGA=?<CR> de>,<cacert>,<clientcert>,<clientkey>
<CR><LF>OK<CR><LF>

Parameter
<sslversion> SSL protocol version
0: SSL3.0
1: TLS1.0
2: TLS1.1

Copyright © Neoway Technology Co., Ltd. 129


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

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.

AT+SSLTCPCFGA? Query the current SSL settings.


+SSLTCPCFGA: 0,1,ca.pem,cc.pem,ck.pem
OK

10.10 AT+SSLTCPREAD–Reading SSL TCP Data


To read SSL TCP data.

Format

Type Command Response


<CR><LF>+SSLTCPREAD:<id>,<len>,<data>
AT+SSLTCPREAD=<n>,<leng <CR><LF>OK<CR><LF>
Execute
th><CR><LF> Or
<CR><LF>ERROR<CR><LF>

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.
>

Copyright © Neoway Technology Co., Ltd. 130


N706 AT Commands Manual
Chapter 10 SSL TCP Data Service

+SSLTCPSEND: 0,OK

+SSLTCPRECV: 0
AT+SSLTCPREAD=0,2048
+SSLTCPREAD: 0,10,1111111111
OK

10.11 AT+SSLCIPHERSET–Removing Weak Algorithm


from the SSLTCP Connection
To remove the weak algorithm from the SSL TCP connection.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Set AT+SSLCIPHERSET=<enable><CR><LF> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+SSLTCPCFGA:
Query AT+SSLCIPHERSET?<CR>
<enable><CR><LF>OK<CR><LF>

Test AT+SSLCIPHERSET=?<CR> <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.

Copyright © Neoway Technology Co., Ltd. 131


N706 AT Commands Manual
Chapter 11 MQTT Commands

11 MQTT Commands

11.1 AT+MQTTTLS–Configuring TLS Parameters


To configure MQTT TLS parameters.

Add the certificate through the AT+CERTADD command.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+MQTTTLS=<type>,<type_n
Set Or
ame><CR>
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 132


N706 AT Commands Manual
Chapter 11 MQTT Commands

Note: this parameter is valid only when sslmode=1.


⚫ rootca: string: CA certificate.
⚫ clientcert: string, name of the client certificate
⚫ clientkey: clientkey: string, name of the client key
⚫ sslversion: The default value is 3.
0: SSL3.0
1: TLS1.0
2: TLS1.1
3: TLS1.2

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

11.2 AT+MQTTCONNPARAM–Setting User Parameters


To set the ID, user name, password parameters.

The user name and password can be null.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+MQTTCONNPARAM=<”clientdID”>,
Set Or
<”username”>,<”password”><CR>
<CR><LF>ERROR<CR><LF>

<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.

Copyright © Neoway Technology Co., Ltd. 133


N706 AT Commands Manual
Chapter 11 MQTT Commands

<username> User name, 512 bytes at most.


<password> Password, 256 bytes at most.

Example
AT+MQTTCONNPARAM="C_201801021127","lixytest/thing01","0 Parameters are set successfully.
lSoY/eYnlSqUeAsbAKKQ/ACmipZwEw9H7Ff0h1kOps="
OK

11.3 AT+MQTTWILLPARAM–Setting Will


To set will parameters.

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

Type Command Response


AT+MQTTWILLPARAM=<retained>, <CR><LF>+GNSSSTATE: <status><CR><LF>
Set <qos>,<”topicname”>,<”message”>< Or
CR> <CR><LF>OK<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 134


N706 AT Commands Manual
Chapter 11 MQTT Commands

11.4 AT+MQTTWILLMSG–Setting Long Will Messages


To set long will messages or will messages of non-character string by specifying retained, qos, topic,
and message length.

Format

Type Command Response


<CR><LF>>
AT+MQTTWILLMSG=<retained>,<qos>,<”topic”>, <CR><LF>OK<CR><LF>
Set
<msg_length><CR> Or
<CR><LF>ERROR<CR><LF>

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!

11.5 AT+MQTTCONN–Connection Command


To connect to the MQTT server.

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.

Copyright © Neoway Technology Co., Ltd. 135


N706 AT Commands Manual
Chapter 11 MQTT Commands

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+MQTTCONN=<"host">,<cle
Execute Or
an>,<keep_alive><CR>
<CR><LF>ERROR<CR><LF>

<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

11.6 AT+MQTTSUB–Subscribing a Topic


To subscribe to a topic.

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

Type Command Response


Execute AT+MQTTSUB=<"topicname <CR><LF>OK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 136


N706 AT Commands Manual
Chapter 11 MQTT Commands

">,<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

11.7 AT+MQTTUNSUB–Canceling a Subscription


To cancel a subscription of the specified topic.

When you fail to cancel the subscription, query the network status. When the network is poor, the
return value is slow.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+MQTTUNSUB=<"topicname"><CR> Or
<CR><LF>ERROR<CR><LF>

Parameter
<"topicname"> Name of the topic to be unsubscribed to, 128 at most.

Copyright © Neoway Technology Co., Ltd. 137


N706 AT Commands Manual
Chapter 11 MQTT Commands

Example
AT+MQTTUNSUB="neoway02"
Cancel a subscription.
OK

11.8 AT+MQTTPUB–Publishing a Topic


To publish a topic.

When the network is poor, the return value is slow.

It is recommended to publish topic containing the "\" character using the AT+MQTTPUBS command
since "\" is an escape character.

Format

Type Command Response


<CR><LF>OK<CR><LF>
AT+MQTTPUB=<retained>,<qos>,<"to
Execute Or
picname">,<"message"><CR>
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 138


N706 AT Commands Manual
Chapter 11 MQTT Commands

11.9 AT+MQTTPUBS–Publishing a Topic with Long


Message
To publishing a topic with long message.

Format

Type Command Response


<CR><LF>>
<CR><LF>OK<CR><LF>
Or
AT+MQTTPUBS=<retained>,<qos>,<”to
Execute <CR><LF>><CR><LF>
pic”>,<msg_length><CR>
<CR><LF>+MQTTPUBS: Timeout!<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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!

11.10 AT+MQTTDISCONN–Disconnecting from the


MQTT Server
To close the MQTT connection.

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

Copyright © Neoway Technology Co., Ltd. 139


N706 AT Commands Manual
Chapter 11 MQTT Commands

connection parameters and set up the connection again.

Format

Type Command Response


Execute AT+MQTTDISCONN<CR> <CR><LF>OK<CR><LF>

Parameter

N/A.

Example
AT+MQTTDISCONN
To close the MQTT connection.
OK

11.11 +MQTTSUB–URC Notifying Received Topic


Content
To notify the topic content. When the network is poor, the value is returned slowly.

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.

Copyright © Neoway Technology Co., Ltd. 140


N706 AT Commands Manual
Chapter 11 MQTT Commands

11.12 AT+MQTTSTATE–Query the MQTT Connection


Status
To query the MQTT connection status.

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

Type Command Response


<CR><LF>+MQTTSTATE: <state><CR><LF>
Query AT+MQTTSTATE?<CR>
<CR><LF>OK<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 141


N706 AT Commands Manual
Chapter 12 GSM Location Command

12 GSM Location Command

12.1 AT+CIPGSMLOC–Obtaining the Location of the


Module
Obtain the base station location information of the module.

The obtained data is GPS coordinates.

The current coordinates of latitude and longitude are valid and precision is reserved (0.0 by default).

Format

Type Command Response


<CR><LF>+CIPGSMLOC: <fail_string><CR><LF>
Or
<CR><LF>OK<CR><LF>
<CR><LF>+CIPGSMLOC: {<result_string>}
<CR><LF>+CIPGSMLOC: OK<CR><LF>
Or
Execute AT+CIPGSMLOC[=<n>]<CR>
<CR><LF>OK<CR><LF>
<CR><LF>+CIPGSMLOC: <code><CR><LF>
<CR><LF>+CIPGSMLOC: FAIL<CR><LF>
Or
<CR><LF>OK<CR><LF>
<CR><LF>+CIPGSMLOC: TIMEOUT<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 142


N706 AT Commands Manual
Chapter 12 GSM Location Command

longitude data is returned.


401: Unauthorized
400: Bad Request
404: Not Found
408: Request Timeout
500: Server Error

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

Since the base station queried is not


+CIPGSMLOC: 404
included, the result cannot be
calculated.
+CIPGSMLOC: FAIL
Request multiple base stations
AT+CIPGSMLOC=1 positioning.
OK The last request has not been responded
AT+CIPGSMLOC=1 to, and the link has not been released.
+CIPGSMLOC: LINK NOT FREE Request again, prompting that the link
is occupied.
AT+CIPGSMLOC=0 Close the request.
OK The link is released.
AT+CIPGSMLOC=1
positioning through multiple base
OK
stations is requested successfully.

+CIPGSMLOC: {"location": {"lat": 22.689646628671216,


The module reports the position
"lng":113.98586121790129},"accuracy":0.0}
coordinates.
+CIPGSMLOC: OK

Copyright © Neoway Technology Co., Ltd. 143


N706 AT Commands Manual
Chapter 13 Time Synchronization Commands

13 Time Synchronization Commands

13.1 AT+UPDATETIME–Updating Time to Network


To update the module time to the network time.

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

Type Command Response


<mode>=0
<CR><LF>+UPDATETIME: Last Update Time
yyyy-mm-dd,hh:mm:ss
<CR><LF>OK<CR><LF>
<mode>=1
<CR><LF>OK<CR><LF>
AT+UPDATETIME=<mode>[,<serv_i <CR><LF>+UPDATETIME:<result
Execute
p>,<time>[[,<TZ>][,<DST>]]]<CR> code><CR><LF>
Or
<CR><LF>OK<CR><LF>
<CR><LF>Time Updating,Please
Wait...<CR><LF>
<CR><LF>+UPDATETIME: Update To
yyyy-mm-dd,hh:mm:ss<CR><LF>

<CR><LF>+UPDATETIME:
Query AT+UPDATETIME?<CR> <serv_ip>,<time>,<TZ>,<DST>
<CR><LF>OK<CR><LF>

<CR><LF>+UPDATETIME: (value range of


<mode>),,(value range of <time>),,(value range of
Test AT+UPDATETIME=?<CR>
<DST>)
<CR><LF>OK<CR><LF>

Copyright © Neoway Technology Co., Ltd. 144


N706 AT Commands Manual
Chapter 13 Time Synchronization Commands

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

Copyright © Neoway Technology Co., Ltd. 145


N706 AT Commands Manual
Chapter 13 Time Synchronization Commands

or inability to support time update.


+UPDATETIME: Send Request Fail
AT+UPDATETIME=1,time.windows.com,10,"W12",1 The domain name is invalid. The possible reason
+UPDATETIME: Domain Name Invalid is the SIM (USIM) card is out of credit.
AT+UPDATETIME=1,time.windows.com,10,"W12",1
Socket error.
OK
The possible reason might be network
congestion.
+UPDATETIME: Socket Error
AT+UPDATETIME? Query the IP address of the server to which the
+UPDATETIME: 128.138.141.172,10,"E8",0 time is updated and the timeout period, time
OK zone, and DTS.
AT+UPDATETIME=?
+UPDATETIME: (0-1),,(1-30),,(0-1) Query available parameter value ranges.
OK
AT+UPDATETIME=0 Query when the time was updated last time.
+UPDATETIME:Last Update Time 2014-03-31,11:10:26
OK Update to 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.

Copyright © Neoway Technology Co., Ltd. 146


N706 AT Commands Manual
Chapter 14 Network Sharing Commands

14 Network Sharing Commands

14.1 AT+NETSHAREMODE–Selecting Network Sharing


Mode
To select the network sharing mode.

The setting by this command is saved after the module is powered off and it is valid after restart.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+NETSHAREMODE=<share_mode><CR> Or
<CR><LF>ERROR<CR><LF>

<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

Copyright © Neoway Technology Co., Ltd. 147


N706 AT Commands Manual
Chapter 14 Network Sharing Commands

14.2 AT+NETSHAREACT–Enabling Network Sharing


To enable network sharing.

Format

Type Command Response


AT+NETSHAREACT=<cid>,<action>, <CR><LF>OK<CR><LF>
Set <auto>[,<APN>[,<username>[,<passw Or
d>[,<authtype>[,<ip_family>]]]]] <CR><LF>ERROR<CR><LF>

<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)

Copyright © Neoway Technology Co., Ltd. 148


N706 AT Commands Manual
Chapter 14 Network Sharing Commands

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

Copyright © Neoway Technology Co., Ltd. 149


N706 AT Commands Manual
Chapter 15 File System Commands

15 File System Commands

15.1 AT+FSWF–Writing Data to File


To write data to a file.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
AT+FSWF=<file_name>,<mode>,<si
Execute <CR><LF>ERROR<CR><LF>
ze>,<time><CR>
Or
<CR><LF>+FSWF: Timeout!<CR><LF>

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 data to be written should not exceed <size>.

⚫ 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.

Copyright © Neoway Technology Co., Ltd. 150


N706 AT Commands Manual
Chapter 15 File System Commands

>
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

15.2 AT+FSRF–Reading Data from a File


To read data from a file

Format

Type Command Response


<CR><LF>+FSRF:<size>,<content>
AT+FSRF=<file_name>,<mode>,<size> <CR><LF>OK<CR><LF>
Execute
[,<position>]<CR> Or
<CR><LF>ERROR<CR><LF>

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.

⚫ <size> and <position> is determined by the file size.

⚫ 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.

Copyright © Neoway Technology Co., Ltd. 151


N706 AT Commands Manual
Chapter 15 File System Commands

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

15.3 AT+FSRFEX–Reading File


To read a file.

Format

Type Command Response


<CR><LF>+FSRFEX:
<lenth>,<checksum>,<content>
AT+FSRFEX=<file_name>,<checksum_
Execute <CR><LF>OK<CR><LF>
mode>,<mode>,<size>[,<position>]
Or
<CR><LF>ERROR<CR><LF>

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>.

Copyright © Neoway Technology Co., Ltd. 152


N706 AT Commands Manual
Chapter 15 File System Commands

<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.

⚫ File size is determined by <size> and <position>.

⚫ 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

15.4 AT+FSDF–Deleting a File


To delete a file.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+FSDF=<file_name><CR> Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 153


N706 AT Commands Manual
Chapter 15 File System Commands

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

15.5 AT+FSLIST–Obtaining File List


To obtain the list of files in the file system.

Format

Type Command Response


Execute AT+FSLIST=<directory><CR> <CR><LF>OK<CR><LF>

<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.

Copyright © Neoway Technology Co., Ltd. 154


N706 AT Commands Manual
Chapter 15 File System Commands

⚫ 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

15.6 AT+FSFS–Obtaining the Size of a File


To obtain the size of a file.

Format

Type Command Response


<CR><LF>+FSFS:<size>
<CR><LF>OK<CR><LF>
Execute AT+FSFS=<file_name><CR>
Or
<CR><LF>ERROR<CR><LF>

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.

Copyright © Neoway Technology Co., Ltd. 155


N706 AT Commands Manual
Chapter 15 File System Commands

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

15.7 AT+FSLS–Obtaining the Remaining Storage Size of


User Disk
To obtain the remaining storage size of user disk.

Format

Type Command Response


<CR><LF>+FSLS:<size>
Execute AT+FSLS=<directory><CR>
<CR><LF>OK<CR><LF>

<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.

Copyright © Neoway Technology Co., Ltd. 156


N706 AT Commands Manual
Chapter 15 File System Commands

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

15.8 AT+FSFAT–Formating the User Disk


To format the user disk.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+FSFAT[=<directory>]<CR> Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 157


N706 AT Commands Manual
Chapter 15 File System Commands

AT+FSFAT The user disk is not ready.


ERROR
AT+FSFAT=/sdcard0 Format the SD card.
OK
AT+FSFAT=/dataflash Format the external flash.
OK

15.9 AT+FSRN–Renaming the File


To rename the file.

If the file renamed exists, it will overwrite the original file.

If the file renamed does not exist, errors will be returned.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+FSRN=<src_file_name>,<dst_file_name><CR> Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 158


N706 AT Command Manual
Chapter 16 SIM Card Related Commands

16 SIM Card Related Commands

16.1 AT+SIMCROSS–Switching SIM


To switch SIM. Card slot 1 is used by default at the first startup.

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

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+SIMCROSS=<sim_id><CR> Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+SIMCROSS: <sim_id>
Query AT+SIMCROSS?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+SIMCROSS: (range of <sim_id> value)


Test 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

Copyright © Neoway Technology Co., Ltd. 159


N706 AT Commands Manual
Chapter 16 SIM Card Related Commands

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

Copyright © Neoway Technology Co., Ltd. 160


N706 AT Commands Manual
Chapter 17 Other Commands

17 Other Commands

17.1 AT+NRSP–Querying RSRP, RSRQ, SINR of Cells in


a Neighbor of a Serving Cell on the LTE Network
To query RSRP, RSRQ, SINR in a neighbor of the LTE cell.

This command is valid only on LTE networks.

Format

Type Command Response


<CR><LF>+NRSP: <rsrp1>,<rsrq1>,<rsrp2>,<rsrq2>,…,<sinr>
Execute AT+NRSP<CR>
<CR><LF>OK<CR><LF>

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

17.2 AT+NETMSG–Querying Network Registration


Information
To query network registration information

This command works only after the module is registered with a network.

Copyright © Neoway Technology Co., Ltd. 161


N706 AT Commands Manual
Chapter 17 Other Commands

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

Type Command Response


<CR><LF>+NETMSG: <MCC+MNC>, [<LAC>/<TAC>],
[<CELL_ID>], [<BSIC><Phy_cellid>], <BAND>, <ARFCN>,
<RX_dBm>, <TX_dBm>, <net_mode>
Execute AT+NETMSG<CR>
<CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 162


N706 AT Commands Manual
Chapter 17 Other Commands

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

17.3 AT+NETDMSG–Querying Network Registration


Information
To query the current network registration information.

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.

RX power, RSRQ, and SINR are valid only on LTE networks.

Format

Type Command Response


<CR><LF>+NETDMSG:<MCC+MNC>,[<LAC>/<TAC>],<CELL_ID>,
[<BSIC>/<Phy_cellid>],<net_mode>,<BAND>,
<ARFCN>,<RX_dBm>,<TX_dBm>,<SID>,<NID>,<BID>,
Execute AT+NETDMSG <RSRP>,<RSRQ>,<SINR><CR><LF>
<CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

Copyright © Neoway Technology Co., Ltd. 163


N706 AT Commands Manual
Chapter 17 Other Commands

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.

Copyright © Neoway Technology Co., Ltd. 164


N706 AT Commands Manual
Chapter 17 Other Commands

38950, -49, -8, 0x0, 0x0, 0x0, -730, -55, 108


OK
AT+NETDMSG Query the network registration
+NETDMSG: "460+00", 0x286F, 0x00000FCB, 26, "GPRS", GSM 900, 20, 26, information on a non-LTE 3GPP
-46, 0x0, 0x0, 0x0, 0, 0, 0 network.
OK
AT+NETDMSG The module has not been
+NETDMSG: “0”,0,0,0,”NONE”,0,0,0,0,0,0,0,0,0,0 registered with any network or
OK the network encountered
abnormalities.

17.4 AT+NEOFOTA–FOTA Command


To control the firmware-over-the-air of the module.

Do not power down or restart the module during upgrade.

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.

If PDP context is not activated, +NWFOTA: GPRS DISCONNECTION is prompted.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+NEOFOTA=<server>,<port><CR> Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 165


N706 AT Commands Manual
Chapter 17 Other Commands

Example
AT+NEOFOTA=115.29.212.25/,80
OK Start to upgrade.

+NEOFOTA: 1 The upgrade package is downloaded successfully.


+NEOFOTA: 3 Start to upgrade.
OK After the upgrade is successful, the module restarts automatically.

+NEOFOTA: 4 Upgrade successfully.


AT+NEOFOTA=115.29.212.25/,80
AT+NEOFOTA=115.29.212.25/,80
OK
OK
+NEOFOTA: 0
+NEOFOTA: 0

17.5 AT+NEOFOTAURC–FOTA Status Report


To control the status report during an FOTA upgrade.

This setting should be configured before upgrade and is not saved after the module is powered down.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Execute AT+NEOFOTAURC=<result><CR> Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 166


N706 AT Commands Manual
Chapter 17 Other Commands

AT+NEOFOTA=115.29.212.25/,80
OK

+NEOFOTA: 1 The upgrade package is downloaded successfully.


+NEOFOTA: 3 Start to upgrade.
OK After the upgrade is successful, the module restarts automatically.

+NEOFOTA: 4 Upgrade successfully.


AT+NEOFOTAURC=0 Status reports during the disable process.
OK

AT+NEOFOTA=115.29.212.25/,80
OK

+NEOFOTA: 4 The module is upgraded successfully.

17.6 AT+READADC–Reading ADC Value


To read the value from pins corresponding to the three ADC channels.

Refer to the pin definitions listed in Neoway_N706_Hardware_User_Guide.

Format

Type Command Response


<CR><LF>+READADC: <channel>,<value>
<CR><LF>OK<CR><LF>
Execute AT+READADC=<channel>
Or
<CR><LF>ERROR<CR><LF>

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

AT+READADC=2 Read the value from the pin corresponding to ADC 2.


+READADC:2,1810
OK
AT+READADC=3 Read ADC value of the VBAT channel
+READADC:3,3840

Copyright © Neoway Technology Co., Ltd. 167


N706 AT Commands Manual
Chapter 17 Other Commands

OK

17.7 AT+NBANDLOCK–Locking Multiple Frequency


Bands
Lock one and more frequency bands by band mask.

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.

This command can lock 5 frequencies at most at the same time.

For the band settings, see Appendix C Supported Band List.

Format

Type Command Response


<CR><LF>OK<CR><LF>
Or
<CR><LF>+NBANDLOCK:
<mode>,<SupportBandlist>
AT+NBANDLOCK=<mode>[,<LTE_
Set <CR><LF>OK<CR><LF>
Bands>][,<GSM_Bands>]<CR>
Or
<CR><LF>ERROR<CR><LF>
Or
<CR><LF>+NBANDLOCK: <err><CR><LF>

<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>

Copyright © Neoway Technology Co., Ltd. 168


N706 AT Commands Manual
Chapter 17 Other Commands

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.

17.8 AT+NFREQLOCK–Locking the Specified Frequency


To lock a combination of frequencies.

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.

Copyright © Neoway Technology Co., Ltd. 169


N706 AT Commands Manual
Chapter 17 Other Commands

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

Type Command Response


<CR><LF>OK<CR><LF>
AT+NFREQLOCK=<mode>[,<frequency1> Or
,<frequency2>,<frequency3>,<frequency4> <CR><LF>ERROR<CR><LF>
Execute
,<frequency5>,<frequency6>,<frequency7> Or
,<frequency8>,<frequency9>]<CR> <CR><LF>+CME ERROR:
<err><CR><LF>

<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.

Copyright © Neoway Technology Co., Ltd. 170


N706 AT Commands Manual
Chapter 17 Other Commands

AT+NFREQLOCK?
+NFREQLOCK: 1,38400,38950
OK

17.9 AT+IPINFO–Querying Socket Connection


Information
To query the socket connection information.

Format

Type Command Response


<CR><LD>+IPINFO:
<SocketID>,<LocalIP>,<local_port>,<gate>,<DNS1>,<DNS2>,<ty
pe>,<dest_ip>,<dest_port>
Execute AT+IPINFO<CR>
<CR><LF>OK<CR><LF>
Or
<CR><LF>ERROR<CR><LF>

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

Copyright © Neoway Technology Co., Ltd. 171


N706 AT Commands Manual
Chapter 17 Other Commands

17.10 AT+CGACT–Activating/Deactivating PDP Context


To activate or deactivate the specified PDP context(s).

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

Type Command Response


<CR><LF>+CGACT: <cid>,<state>
<CR><LF>OK<CR><LF>
Set AT+CGACT=<state>[,<cid>[,cid]….]<CR>
Or
<CR><LF>ERROR<CR><LF>

<CR><LF>+CGACT:<cid>,<state>
Query AT+CGACT?<CR>
<CR><LF>OK<CR><LF>

<CR><LF>+CGACT: (list of supported


Test AT+CGACT=?<CR> <state>s)
<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

Copyright © Neoway Technology Co., Ltd. 172


N706 AT Commands Manual
A Error Codes

Error Codes

A.1 General Error Codes


Code(AT+CMEE=1) Text(AT+CMEE=2)
0 PHONE FAILURE

1 NO CONNECTION TO PHONE

2 PHONE-ADAPTOR LINK RESERVED

3 OPERATION NOT ALLOWED

4 OPERATION NOT SUPPORTED

5 PH-SIM PIN REQUIRED

6 PH-FSIM PIN REQUIRED

7 PH-FSIM PUK REQUIRED

10 SIM NOT INSERTED (SEE NOTE 1)

11 SIM PIN REQUIRED

12 SIM PUK REQUIRED

13 SIM FAILURE (SEE NOTE 1)

14 SIM BUSY (SEE NOTE 1)

15 SIM WRONG (SEE NOTE 1)

16 INCORRECT PASSWORD

17 SIM PIN2 REQUIRED

18 SIM PUK2 REQUIRED

20 MEMORY FULL

21 INVALID INDEX

22 NOT FOUND

23 MEMORY FAILURE

24 TEXT STRING TOO LONG

25 INVALID CHARACTERS IN TEXT STRING

26 DIAL STRING TOO LONG

27 INVALID CHARACTERS IN DIAL STRING

Copyright © Neoway Technology Co., Ltd. 173


N706 AT Commands Manual
A Error Codes

30 NO NETWORK SERVICE

31 NETWORK TIMEOUT

32 NETWORK NOT ALLOWED - EMERGENCY CALLS ONLY

40 NETWORK PERSONALIZATION PIN REQUIRED

41 NETWORK PERSONALIZATION PUK REQUIRED

42 NETWORK SUBSET PERSONALIZATION PIN REQUIRED

43 NETWORK SUBSET PERSONALIZATION PUK REQUIRED

44 SERVICE PROVIDER PERSONALIZATION PIN REQUIRED

45 SERVICE PROVIDER PERSONALIZATION PUK REQUIRED

46 CORPORATE PERSONALIZATION PIN REQUIRED

47 CORPORATE PERSONALIZATION PUK REQUIRED

48 HIDDEN KEY REQUIRED (SEE NOTE 2)

49 EAP METHOD NOT SUPPORTED

50 INCORRECT PARAMETERS

51 COMMAND IMPLEMENTED BUT CURRENTLY DISABLED

52 COMMAND ABORTED BY USER

NOT ATTACHED TO NETWORK DUE TO MT FUNCTIONALITY


53
RESTRICTIONS

MODEM NOT ALLOWED - MT RESTRICTED TO EMERGENCY CALLS


54
ONLY

OPERATION NOT ALLOWED BECAUSE OF MT FUNCTIONALITY


55
RESTRICTIONS

FIXED DIAL NUMBER ONLY ALLOWED - CALLED NUMBER IS NOT A


56
FIXED DIAL NUMBER (REFER 3GPP TS 22.101 [147])

57 TEMPORARILY OUT OF SERVICE DUE TO OTHER MT USAGE

58 LANGUAGE/ALPHABET NOT SUPPORTED

59 UNEXPECTED DATA VALUE

60 SYSTEM FAILURE

61 DATA MISSING

62 CALL BARRED

63 MESSAGE WAITING INDICATION SUBSCRIPTION FAILURE

100 UNKNOWN

Copyright © Neoway Technology Co., Ltd. 174


N706 AT Commands Manual
A Error Codes

A.2 FTP Error Codes


Code(AT+CMEE=1) Text(AT+CMEE=2)
SERVICES CANNOT BE PROVIDED. CLOSE THE CONTROL
421
CONNECTION.

425 FAIL TO OPEN THE DATA CONNECTION.

426 CLOSE THE CONNECTION AND TERMINATE THE TRANSMISSION.

450 THE REQUESTED FILE OPERATION IS NOT EXECUTED.

TERMINATE THE REQUESTED OPERATION: A LOCAL ERROR


451
OCCURS.

THE REQUESTED OPERATION IS NOT EXECUTED: INSUFFICIENT


452
SYSTEM STORAGE SPACE.

THE COMMAND IS UNABLE TO IDENTIFY BECAUSE OF INCORRECT


500
FORMAT.

501 SYNTAX ERROR.

502 COMMAND NOT EXECUTED.

503 COMMAND SEQUENCE ERROR.

504 THE COMMAND SPECIFYING THE PARAMETER IS NOT EXECUTED.

530 USERS DO NOT LOG IN.

532 ACCOUNT INFORMATION IS REQUIRED FOR FILE STORAGE.

550 THE REQUESTED OPERATION IS NOT EXECUTED.

THE REQUESTED OPERATION IS TERMINATED: UNKNOWN PAGE


551
TYPE.

THE REQUESTED FILE OPERATION IS TERMINATED: STORAGE


552
SPACE EXCEEDED.

THE REQUESTED OPERATION IS NOT EXECUTED: INVALID FILE


553
NAME.

600 UNKNOWN ERROR.

A.3 HTTP(S) Error Codes


Code(AT+CMEE=1) Text(AT+CMEE=2)

300 Multiple Choice

301 Moved Permanently

Copyright © Neoway Technology Co., Ltd. 175


N706 AT Commands Manual
A Error Codes

302 Found

303 See Other

304 Not Modified

305 Use Proxy

306 unused

307 Temporary Redirect

308 Permanent 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

418 I'm a teapot

421 Misdirected Request

422 Unprocessable Entity (WebDAV)

423 Locked (WebDAV)

424 Failed Dependency (WebDAV)

425 Too Early

426 Upgrade Required

Copyright © Neoway Technology Co., Ltd. 176


N706 AT Commands Manual
A Error Codes

428 Precondition Required

429 Too Many Requests

431 Request Header Fields Too Large

451 Unavailable For Legal Reasons

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 Variant Also Negotiates

507 Insufficient Storage

508 Loop Detected (WebDAV)

510 Not Extended

511 Network Authentication Required

Copyright © Neoway Technology Co., Ltd. 177


N706 AT Commands Manual
B Reference Process of AT Command Programming

Reference Process of AT Command


Programming

B.1 Content of PDU SMS Messages


<PDU> SMS message sending format:

1>: 0891

08: indicates the length of the SMSC address information

91: indicates the format of the SMSC address

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

01: Indicates basic parameters

00: indicates message baseline value

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:

Copyright © Neoway Technology Co., Ltd. 178


N706 AT Commands Manual
B Reference Process of AT Command Programming

0891683110808805F001000B813124819396F300080A00680065006C006C006F

Wherein,

0891

683108705505F0: SMSC number of China Unicom

0100

0B: the length of the recipient number

81: Receiving mode

3124819396F3: The number of recipient

0008

0A: The length of the content

00680065006C006C006F: SMS message content

Message content: hello

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,

00: SMSC address information length

SMSC number is not needed.

0100

0B: the length of the recipient number

81: Receiving mode

3124819396F3: The number of recipient

0008

0A: The length of the content

00680065006C006C006F: SMS message content

SMS message content: hello

The SMS message content starts from 0100, so the value of LENGTH in AT+CMGS=LENGTH is 23.

Copyright © Neoway Technology Co., Ltd. 179


N706 AT Commands Manual
B Reference Process of AT Command Programming

B.2 Flowchart of Sending Text SMS Messages (Through


UART)
Figure B-1 Flowchart of sending text format SMS messages

Set the text mode

AT+CMGF=1
OK

Configure the TE character set

AT+CSCS= GSM
OK Press Enter. After the >
symbol is displayed, you
input the message.

Send an SMS message.

AT+CMGS="13430981508"
>

Enter Shenzhen Neoway


Technology and press
Ctrl+Z (character 0x1A) to
send the message.
Content of the message to be
sent.

Shenzhen Neoway Technology

Successfully

Return value

+CMGS: 116

OK

End

Copyright © Neoway Technology Co., Ltd. 180


N706 AT Commands Manual
B Reference Process of AT Command Programming

B.3 Flowchart of Sending PDU SMS Messages (Through


UART)
Figure B-2 Flowchart of Sending PDU SMS messages

Set the PDU mode.

AT+CMGF=0
OK

Configure TE character set.

AT+CSCS= UCS2
OK The length of the
SMS messages is
23 bytes in PDU
mode.

Send an SMS message.

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

Copyright © Neoway Technology Co., Ltd. 181


N706 AT Commands Manual
C Supported Band List

Supported Band List

C.1 GSM Bands


GSM Band Name Bit HEX Band Mask
GSM_450 1 1

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

C.2 LTE Bands


LTE Band Name Bit HEX Band Mask
EUTRAN_BAND1 1 1

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

Copyright © Neoway Technology Co., Ltd. 182


N706 AT Commands Manual
C Supported Band List

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

Copyright © Neoway Technology Co., Ltd. 183

You might also like