0% found this document useful (0 votes)
159 views24 pages

MEIG - SLM3XX - COAP - AT Commands Manual - V2.2

Uploaded by

Vara Prasad
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)
159 views24 pages

MEIG - SLM3XX - COAP - AT Commands Manual - V2.2

Uploaded by

Vara Prasad
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/ 24

SLM3XX COAP

AT Commands Manual

Controlled Version Number: V2.2

Release Date: 2021/8/09

MeiG smart product technical information 0/23


SLM3XX COAP AT Command Manual

IMPORTANT NOTICE

COPYRIGHT NOTICE

Copyright © MeiG Smart Technology Co., Ltd. All rights reserved.

All contents of this manual are exclusively owned by MeiG Smart Technology Co., Ltd
(MeiG Smart for short), which is under the protection of Chineselawsandcopyrightlaws in
international conventions. Anyone shall not copy, spread, distribute, modify or use in other
ways with its contents without the written authorization of MeiG Smart. Those who violated
will be investigated by corresponding legal liability in accordance with the law.

NO GUARANTEE

MeiG Smart makes no representation or warranty, either express or implied, for any content
in this document, and will not be liable for any specific merchantability and applicable or
any indirect,particular and collateral damage.

CONFIDENTIALITY

All information contained here (including any attachments) is confidential. The recipient
acknowledges the confidentiality of this document, and except for the specific purpose, this
document shall not be disclosed to any third party.

DISCLAIMER

MeiG Smart will not take any responsibility for any property and health damage caused by
the abnormal operation of customers. Please develop the product according to the
technical specification and designing reference guide which defined in the product manual.
MeiG Smart have the right to modify the document according to technical requirement with
no announcement to the customer.

MeiG smart product technical information 1/23


SLM3XX COAP AT Commands Manual

Revision History
Revision Date Description

Created, Initial Version - Move from 《SLM320_COMMON_AT_


V1.0 2020-04-21
Command_Manual》

V2.0 2020-05-28 File format and error modification

V2.1 2021-04-22 File format and error modification

Change the document name to "MEIG-SLM3XX COAP AT Commands


V2.2 2021-08-09 Manual"
File format and error modification

MeiG smart product technical information 2/23


SLM3XX COAP AT Commands Manual

Contents
Contents ...................................................................................................................................................... 3
1 Introduction ..............................................................................................................................................4
1.1 Safety Instructions .......................................................................................................................... 4
2 COAP Commands ................................................................................................................................... 5
2.1 AT^COAPGET Get the Resource from COAP Server ................................................................ 5
2.2 AT^COAPPUT Update the Resource from COAP Server ...........................................................6
2.3 AT^COAPPOST Create the Resource on the Server ................................................................. 7
2.4 AT^COAPDELETE Delete the resource on the server ............................................................... 8
2.5 AT^COAPDATA Input the data from serial port or sscom tool ....................................................... 9
2.6 AT^COAPREG Configuration data register to the server ..........................................................10
2.7 Parameters and response explanation ........................................................................................ 10
3 Example of COAP Client ...................................................................................................................... 13
3.1 PDP connected (data network activated) .....................................................................................13
3.2 COAP commands ......................................................................................................................... 14
4 Summary Of Error Code .......................................................................................................................15
4.1 Code of CME ERROR Meaning ................................................................................................... 15
4.2 Code of CMS ERROR Meaning ................................................................................................... 19
5 Reference ............................................................................................................................................... 22

MeiG smart product technical information 3/23


SLM3XX COAP AT Commands Manual

1 Introduction
This document describes how to use COAP function and relative AT commands of SLM320 Modules

1.1 Safety Instructions

By following the safety principles below, you can ensure personal safety and help protect the product
and work environment from potential damages:

Driving safety first! When you are driving, do not use a handheld mobile terminal
unless it has a hands-free function. Please stop and call again!

Please turn off the mobile terminal device before boarding. The wireless function
of the mobile terminal must not be turned on on the airplane to prevent
interference to the communication system of the airplane. Ignoring this prompt
may lead to flight safety and even violate the law.

In hospitals or health care facilities, pay attention to whether there are restrictions
on the use of mobile terminal equipment. RF interference can cause medical
equipment to malfunction, so mobile terminal equipment may need to be turned
off.

The mobile terminal device cannot be effectively connected under any


circumstances, and there is no call charge on the mobile device or the SIM is
invalid. When you encounter the above situations in an emergency, please
remember to make an emergency call and ensure that your device is turned on
and in an area with sufficient signal strength.

Your mobile terminal device receives and transmits radio frequency signals when
it is turned on. Radio frequency interference occurs when it is close to TVs, radio
computers or other electronic equipment.

Keep mobile devices away from flammable gases. When you are close to a gas
station, oil depot, chemical plant or explosion site, please turn off the mobile
terminal device. There are potential safety hazards in operating electronic
equipment in any potentially explosive place.

MeiG smart product technical information 4/23


SLM3XX COAP AT Commands Manual

2 COAP Commands
Contents

• AT^COAPGET Get the resource from COAP server

• AT^COAPPUT Update the resource from COAP server

• AT^COAPPOST Create the resource on the server

• AT^COAPDELETE Delete the resource on the server

• AT^COAPDATA Input the data from serial port or sscom tool

• AT^COAPREG Configuration data register to the server

• Parameters and response explanation

2.1 AT^COAPGET Get the Resource from COAP Server

AT^COAPGET Operation Command

Command Type Command Possible Response

Write Command AT^COAPGET=<url>,<cmdline>,[ti If success:


mer]
returns the resource length, contents and

OK

if failed:

+CME ERROR: <err>

AT^COAPGET Parameter Description

<url> A string parameter which is the address of the resource, usually the url includes
MeiG smart product technical information 5/23
SLM3XX COAP AT Commands Manual
uri-host, uri-port, uri-path and uri- query.The max length is 60.

<cmdline> A string parameter which includes many optional parameters, each optional
parameter must be followed by an optional tag.

[timer] A integer parameter which indicates the execution cycle of the request, and if
timeout request must be terminated and clear the request.

 Max Response Time

If [timer] is not set, the max response time 90 seconds.

If [timer] is set, the max response time [timer]+5 seconds.

Note:

GPRS or WIFI must be connected before AT+COAPGET executed.When thr uri_port value is greater
than 65535,the system automatically creates 5683 or 5684.

2.2 AT^COAPPUT Update the Resource from COAP Server

AT^COAPPUT Operation Command

Command Type Command Possible Response

Write Command AT^COAPPUT=<url>,<cmdline>,[ti If success:


mer],[data]
returns the resource length, contents and

OK

if failed:

+CME ERROR: <err>

AT^COAPPUT Parameter Description

<url> A string parameter which is the address of the resource, usually the url includes
uri-host, uri-port, uri-path and uri- query.The max length is 60.

MeiG smart product technical information 6/23


SLM3XX COAP AT Commands Manual

<cmdline> A string parameter which includes many optional parameters,each optional


parameter must be folowed by an optional tag.

[timer] A integer parameter which indicates the execution cycle of the request, and if timeout
request must be terminated and clear the request.

[data] 0: No need data input


1: need input data (default value)

 Max Response Time


If [timer] is not set, the max response time 90 seconds.
If [timer] is set, the max response time [timer] +5 seconds.

Note:
Before executed COAPPUT needs GPRS or WIFI connect and data input, use AT^COAPDATA prepare
the input resource data.When the uri_port value is greater than 65535,the system automatically creates
5683 or 5684.

2.3 AT^COAPPOST Create the Resource on the Server

AT^COAPPOST Operation Command

Command Type Command Possible Response

Write Command AT^COAPPOST=<url>,<cmdline>, If success:


[timer],[data]
returns the resource length, post contents and

OK

if failed:

+CME ERROR: <err>

AT^COAPPOST Parameter Description

<url> A string parameter which is the address of the resource, usually the url includes
uri-host, uri-port, uri-path and uri- query.The max length is 60.

<cmdline> A string parameter which is the address of the resource, usually the url includes
MeiG smart product technical information 7/23
SLM3XX COAP AT Commands Manual
uri-host, uri-port, uri-path and uri- query.

[timer] A integer parameter which indicates the execution cycle of the request, and if timeout
request must be terminated and clear the request.

[data] 0: No need data input


1: need input data (default value)

 Max Response Time

If [timer] is not set, the max response time 90 seconds.

If [timer] is set, the max response time [timer]+5 seconds.

[timer] range of 1-120.

2.4 AT^COAPDELETE Delete the resource on the server

AT^COAPDELETE Operation Command

Command Type Command Possible Response

Write Command AT^COAPDELETE=<url>,<cmdlin If success:


e>,[timer]
OK

if failed:

+CME ERROR: <err>

AT^COADELETE Parameter Description

<url> A string parameter which is the address of the resource, usually the url includes
uri-host, uri-port, uri-path and uri- query.The max length is 60.

<cmdline> A string parameter which includes many optional parameters, each optional
parameter must be followed by an optional tag.

[timer] A integer parameter which indicates the execution cycle of the request, and if timeout
request must be terminated and clear the request.

MeiG smart product technical information 8/23


SLM3XX COAP AT Commands Manual
 Max Response Time

If [timer] is not set, the max response time 90 seconds.

If [timer] is set, the max response time [timer]+5 seconds.

2.5 AT^COAPDATA Input the data from serial port or sscom tool

AT^COAPDATA Operation Command

Command Type Command Possible Response

Test Command AT^COAPDATA=? If success:

+COAPDATA:<1-65535>[,[1-120]]

OK

Write Command AT^COAPDATA=<length>[,timer] If success:

OK

if failed:

+CME ERROR: <err>

AT^COAPDATA Parameter Description

<length> 1 to 65535 The data length of input.

[timer] Timer is the data input cycle, if timeout data input must be terminated. The <length>
is input data already.

 Max Response Time

If [timer] is not set, the max response time 90 seconds.

MeiG smart product technical information 9/23


SLM3XX COAP AT Commands Manual
If [timer] is set, the max response time [timer]+5 seconds.

Note:

If auto input end with resource or length or timer,if manual end with ctrl+z.

The max wait time is 1-120 seconds.

2.6 AT^COAPREG Configuration data register to the server

AT^COAPREG Operation Command

Command Type Command Possible Response

Write Command AT^COAPREG=<reset> If success:

OK

if failed:

+CME ERROR: <err>

AT^COAPREG Parameter Description

<reset> 0 ICCID saved in NV item without updated.

1 Update the ICCID saved in NV item.

Note:

Don't support this cmd.

2.7 Parameters and response explanation


MeiG smart product technical information 10/23
SLM3XX COAP AT Commands Manual
 CmdLine

Cmdline include many optional parameters, each optional parameter must be followed by an optional tag,
and cmdline also include must parameter uri, uri doesn’t need tag but must be at the end of cmdline.

General tag: -t content-format –p port -k psk –u userId.

 Content-Format

The payload type of the coap message:

1 plain

2 text/plain

3 link

4 link-format

5 application/link-format

6 xml

7 binary

8 octet-stream

9 application/octet-stream

10 exi

11 application/exi

12 json

13 application/json

 <psk>:

Pre-shared key for the specified user. This argument required with PSK to be available.

 <userId>:

MeiG smart product technical information 11/23


SLM3XX COAP AT Commands Manual
User identity for pre-shared key mode. This argument requires DTLS with PSK to be available.

 <port>:

The coap default port is 5683. While coaps default port is 5684 which requires DTLS to be available.

 <url>:

The address of the resource:

1 Uri-Host Option specifies the Internet host of the resource being requested.

2 Uri-Port Option specifies the transport-layer port number of the resource.

3 Uri-Path Option specifies one segment of the absolute path to the resource.

4 Uri-Query Option specifies one argument parameterizing the resource.

 Server response error:

Client Error 4.xx

4.00 Bad Resuest

4.01 Unauthorized

4.02 Bad Option

4.03 Forbidden

4.04 Not Found

4.05 Method Not Allowed

4.06 Not Acceptable

4.12 Precondition Failed

MeiG smart product technical information 12/23


SLM3XX COAP AT Commands Manual

4.13 Request Entity Too Large

4.15 Unsupported Content-Format

Server Error 5.xx

5.00 Internal Server Error

5.01 Not Implemented

5.02 Bad Gateway

5.03 Service Unavailable

5.05 Proxying Not Supported

3 Example of COAP Client


3.1 PDP connected (data network activated)

AT+CGATT=1

+CGATT:1

OK

AT+CGDCONT=1,”IP”,”cmnet”

OK

AT+CGACT=1,1

MeiG smart product technical information 13/23


SLM3XX COAP AT Commands Manual

OK

3.2 COAP commands

AT^COAPPUT="coap://39.99.205.232:9800/put","-t text/plain -p 9800"

OK

AT^COAPDATA=11

> testforpost

OK

AT^COAPDATA=14

> HELLO ! MEIGE.

OK

AT^COAPPOST="coap://39.99.205.232:9800/post_12345","-t text/plain -p 9800"

OK

AT^COAPGET="coap://39.99.205.232:9800/post_12345","-t text/plain -p 9800"

+COAP(14):

HELLO ! MEIGE.

OK

AT^COAPDELETE="coap://39.99.205.232:9800/post_12345","-t text/plain -p 9800"

OK

MeiG smart product technical information 14/23


SLM3XX COAP AT Commands Manual

AT^COAPDATA=14

> HELLO ! MEIGE.

OK

AT^COAPPUT="coap://39.99.205.232:9800/put","-t text/plain -p 9800"

OK

AT^COAPGET="coap://39.99.205.232:9800/put","-t text/plain -p 9800"

+COAP(14):

HELLO ! MEIGE.

OK

4 Summary Of Error Code


• Code of CME ERROR Meaning

• Code of CMS ERROR Meaning

4.1 Code of CME ERROR Meaning

0 PHONE_FAILURE

1 NO_CONNECT_PHONE

2 PHONE_ADAPTER_LINK_RESERVED

3 OPERATION_NOT_ALLOWED

4 OPERATION_NOT_SUPPORTED

5 PHSIM_PIN_REQUIRED

6 PHFSIM_PIN_REQUIRED

MeiG smart product technical information 15/23


SLM3XX COAP AT Commands Manual

7 PHFSIM_PUK_REQUIRED

10 SIM_NOT_INSERTED

11 SIM_PIN_REQUIRED

12 SIM_PUK_REQUIRED

13 SIM_FAILURE

14 SIM_BUSY

15 SIM_WRONG

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_LONG

25 INVALID_CHAR_INTEXT

26 DAIL_STR_LONG

27 INVALID_CHAR_INDIAL

30 NO_NET_SERVICE

31 NETWORK_TIMOUT

32 NOT_ALLOW_EMERGENCY

40 NET_PER_PIN_REQUIRED

41 NET_PER_PUK_REQUIRED

MeiG smart product technical information 16/23


SLM3XX COAP AT Commands Manual

42 NET_SUB_PER_PIN_REQ

43 NET_SUB_PER_PUK_REQ

44 SERVICE_PROV_PER_PIN_REQ

45 SERVICE_PROV_PER_PUK_REQ

46 CORPORATE_PER_PIN_REQ

47 CORPORATE_PER_PUK_REQ

48 PHSIM_PBK_REQUIRED

49 EXE_NOT_SURPORT

50 EXE_FAIL

51 NO_MEMORY

52 OPTION_NOT_SURPORT

53 PARAM_INVALID

54 EXT_REG_NOT_EXIT

55 EXT_SMS_NOT_EXIT

56 EXT_PBK_NOT_EXIT

57 EXT_FFS_NOT_EXIT

58 INVALID_COMMAND_LINE

59 ITF_DIFFERENT

60 BURN_FLASH_FAIL

61 TFLASH_NOT_EXIST

103 GPRS_ILLEGAL_MS_3

106 GPRS_ILLEGAL_MS_6

107 GPRS_SVR_NOT_ALLOWED

MeiG smart product technical information 17/23


SLM3XX COAP AT Commands Manual

111 GPRS_PLMN_NOT_ALLOWED

112 GPRS_LOCATION_AREA_NOT_ALLOWED

113 GPRS_ROAMING_NOT_ALLOWED

132 GPRS_OPTION_NOT_SUPPORTED

133 GPRS_OPTION_NOT_SUBSCRIBED

134 GPRS_OPTION_TEMP_ORDER_OUT

149 GPRS_PDP_AUTHENTICATION_FAILURE

150 GPRS_INVALID_MOBILE_CLASS

148 GPRS_UNSPECIFIED_GPRS_ERROR

264 SIM_VERIFY_FAIL

265 SIM_UNBLOCK_FAIL

266 SIM_CONDITION_NO_FULLFILLED

267 SIM_UNBLOCK_FAIL_NO_LEFT

268 SIM_VERIFY_FAIL_NO_LEFT

269 SIM_INVALID_PARAMETER

270 SIM_UNKNOW_COMMAND

271 SIM_WRONG_CLASS

272 SIM_TECHNICAL_PROBLEM

273 SIM_CHV_NEED_UNBLOCK

274 SIM_NOEF_SELECTED

275 SIM_FILE_UNMATCH_COMMAND

276 SIM_CONTRADICTION_CHV

277 SIM_CONTRADICTION_INVALIDATION

MeiG smart product technical information 18/23


SLM3XX COAP AT Commands Manual

278 SIM_MAXVALUE_REACHED

279 SIM_PATTERN_NOT_FOUND

280 SIM_FILEID_NOT_FOUND

281 SIM_STK_BUSY

282 SIM_UNKNOW

283 SIM_PROFILE_ERROR

4.2 Code of CMS ERROR Meaning

1 UNASSIGNED_NUM

8 OPER_DETERM_BARR

10 CALL_BARRED

21 SM_TRANS_REJE

27 DEST_OOS

28 UNINDENT_SUB

29 FACILIT_REJE

30 UNKONWN_SUB

38 NW_OOO

41 TMEP_FAIL

42 CONGESTION

47 RES_UNAVAILABLE

50 REQ_FAC_NOT_SUB

69 RFQ_FAC_NOT_IMP

81 INVALID_SM_TRV

MeiG smart product technical information 19/23


SLM3XX COAP AT Commands Manual

95 INVALID_MSG

96 INVALID_MAND_INFO

97 MSG_TYPE_ERROR

98 MSG_NOT_COMP

99 INFO_ELEMENT_ERROR

111 PROT_ERROR

127 IW_UNSPEC

128 TEL_IW_NOT_SUPP

129 SMS_TYPE0_NOT_SUPP

130 CANNOT_REP_SMS

143 UNSPEC_TP_ERROR

144 DCS_NOT_SUPP

145 MSG_CLASS_NOT_SUPP

159 UNSPEC_TD_ERROR

160 CMD_CANNOT_ACT

161 CMD_UNSUPP

175 UNSPEC_TC_ERROR

176 TPDU_NOT_SUPP

192 SC_BUSY

193 NO_SC_SUB

194 SC_SYS_FAIL

195 INVALID_SME_ADDR

196 DEST_SME_BARR

MeiG smart product technical information 20/23


SLM3XX COAP AT Commands Manual

197 SM_RD_SM

198 TP_VPF_NOT_SUPP

199 TP_VP_NOT_SUPP

208 D0_SIM_SMS_STO_FULL

209 NO_SMS_STO_IN_SIM

210 ERR_IN_MS

211 MEM_CAP_EXCCEEDED

212 SIM_APP_TK_BUSY

213 SIM_DATA_DL_ERROR

255 UNSPEC_ERRO_CAUSE

300 ME_FAIL

301 SMS_SERVIEC_RESERVED

302 OPER_NOT_ALLOWED

303 OPER_NOT_SUPP

304 INVALID_PDU_PARAM

305 INVALID_TXT_PARAM

310 SIM_NOT_INSERT

311 SIM_PIN_REQUIRED

312 PH_SIM_PIN_REQUIRED

313 SIM_FAIL

314 SIM_BUSY

315 SIM_WRONG

316 SIM_PUK_REQUIRED

MeiG smart product technical information 21/23


SLM3XX COAP AT Commands Manual

317 SIM_PIN2_REQUIRED

318 SIM_PUK2_REQUIRED

320 MEM_FAIL

321 INVALID_MEM_INDEX

322 MEM_FULL

330 SCA_ADDR_UNKNOWN

331 NO_NW_SERVICE

332 NW_TIMEOUT

340 NO_CNMA_ACK_EXPECTED

500 UNKNOWN_ERROR

512 USER_ABORT

513 UNABLE_TO_STORE

514 INVALID_STATUS

515 INVALID_ADDR_CHAR

516 INVALID_LEN

517 INVALID_PDU_CHAR

518 INVALID_PARA

519 INVALID_LEN_OR_CHAR

520 INVALID_TXT_CHAR

521 TIMER_EXPIRED

5 Reference

MeiG smart product technical information 22/23


SLM3XX COAP AT Commands Manual
 ITU-T V.25 ter: Serial asynchronous automatic dialling and control

 3GPP TS 27.007

 3GPP TS 27.005

 Q/GDW 1376.3(2013)

 Related AT Commands Documents:

《MEIG-SLM3XX_Common_AT_Commands_Manual》

MeiG smart product technical information 23/23

You might also like