+ All Categories
Home > Documents > USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual...

USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual...

Date post: 04-Jun-2018
Category:
Upload: phungtuyen
View: 280 times
Download: 1 times
Share this document with a friend
22
USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com Jinan USR IOT Technology Limited 1 / 22 h.usriot.com USR-C210-SSL-MQTT-Firmware-Manual File version: 1.0.0
Transcript
Page 1: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 1 / 22 h.usriot.com

USR-C210-SSL-MQTT-Firmware-Manual

File version: 1.0.0

Page 2: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 2 / 22 h.usriot.com

OverviewC210_V2.2.3_SSL-MQTT_V1.0.0 firmware is created based on C210 V2.2.3 firmware. Compared to C210V2.2.3, the removed/added functions as follows:Removed function: AP+STAmode, Socket A, Socket B, Web Server, Usrlink, Simpleconfig/Airkiss, NTP clock,HTTP Client mode, GPIO.Added function: SSL Client, HTTPS, MQTT, MQTTS.

Note: After upgrading firmware version from regular firmware to this firmware, user must send AT commandAT+CLEAR.

Page 3: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 3 / 22 h.usriot.com

ContentUSR-C210-SSL-MQTT-Firmware-Manual..............................................................................................................11. Product functions......................................................................................................................................................5

1.1. SSL Client......................................................................................................................................................... 51.1.1.Introduction......................................................................................................................................... 51.1.2.Burn certificate and private key...................................................................................................51.1.3.Configuration....................................................................................................................................... 6

1.2. HTTPS.................................................................................................................................................................71.2.1.Introduction......................................................................................................................................... 71.2.2.Configuration....................................................................................................................................... 7

1.3. MQTT/MQTTS..................................................................................................................................................81.3.1.Introduction......................................................................................................................................... 81.3.2.Configuration....................................................................................................................................... 8

2. AT command.............................................................................................................................................................102.1. AT command set..........................................................................................................................................102.2. AT command details.................................................................................................................................. 11

2.2.1.AT+ENTM............................................................................................................................................ 112.2.2.AT+E......................................................................................................................................................112.2.3.AT+Z......................................................................................................................................................112.2.4.AT+CFGTF...........................................................................................................................................122.2.5.AT+RELD............................................................................................................................................. 122.2.6.AT+MAC...............................................................................................................................................122.2.7.AT+SEARCH........................................................................................................................................122.2.8.AT+MID............................................................................................................................................... 122.2.9.AT+PLANG..........................................................................................................................................132.2.10.AT+VER............................................................................................................................................. 132.2.11.AT+WSCAN......................................................................................................................................132.2.12.AT+WMODE.....................................................................................................................................132.2.13.AT+WSTA..........................................................................................................................................142.2.14.AT+WANN........................................................................................................................................ 142.2.15.AT+WSLK..........................................................................................................................................142.2.16.AT+WAP............................................................................................................................................152.2.17.AT+LANN..........................................................................................................................................152.2.18.AT+CHANNEL..................................................................................................................................152.2.19.AT+UART.......................................................................................................................................... 152.2.20.AT+UARTTE..................................................................................................................................... 162.2.21.AT+SLPTYPE....................................................................................................................................162.2.22.AT+WKMOD.....................................................................................................................................172.2.23.AT+SERVER..................................................................................................................................... 172.2.24.AT+SSLVC.........................................................................................................................................172.2.25.AT+SSLOC........................................................................................................................................172.2.26.AT+SOCKLKA.................................................................................................................................. 18

Page 4: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 4 / 22 h.usriot.com

2.2.27.AT+HTPTP........................................................................................................................................182.2.28.AT+HTPHEAD..................................................................................................................................182.2.29.AT+HTPURL.....................................................................................................................................182.2.30.AT+HTPCHD.................................................................................................................................... 192.2.31.AT+HTPTO........................................................................................................................................192.2.32.AT+MQTTSUB..................................................................................................................................192.2.33.AT+MQTTID.....................................................................................................................................192.2.34.AT+MQTTU.......................................................................................................................................202.2.35.AT+MQTTPT.....................................................................................................................................202.2.36.AT+PING...........................................................................................................................................202.2.37.AT+MDCH.........................................................................................................................................20

3. Contact........................................................................................................................................................................224. Disclaimer..................................................................................................................................................................225. Update History.........................................................................................................................................................22

Page 5: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 5 / 22 h.usriot.com

1.Product functions

1.1. SSL Client

1.1.1.IntroductionSSL(Secure Socket Layer) and its successor TLS(Transport Layer Security) are security protocols to providesecurity and data integrity for network communication. TLS and SSL will encrypt the network connection atthe transport layer.

Module supports multiple SSL/TLS version as follow: SSL V3.0 TLS V1.0 TLS V1.1 TLS V1.2

1.1.2.Burn certificate and private keyThis step is not necessary and user can do it according to own needs. By burning certificate and private key,server and client can realize directly mutual authentication to make connection more secure.

User can burn certificate and private key by OTA tool and file size should be less than 4KB(Delete contentbefore BEGIN is recommended).

To distinguish different types certificate/private key, the suffix of certificate/private key should follow theserules: CA certificate: ca.crt Client certificate: cli.crt Client private key: pk.key

User can burn certificate and private key by OTA tool as follow:

Page 6: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 6 / 22 h.usriot.com

Figure 1 Burn certificate and private key

1.1.3.ConfigurationSSL Client related AT commands as follows:

Command FunctionWKMOD Query/Set module work modeSERVER Query/Set server address and portSSLVC Query/Set whether verifying server certificateSSLOC Query/Set whether providing client certificate

SOCKLKA Query connection statusFigure 2 SSL Client mode AT commands

User can configure SSL Client mode by following steps(* is unnecessary step):1.Configure C210 in STAmode and connect to router:User can refer to 2.AT command WMODE/WSTA command to achieve.2.Configure C210 work mode to SSL Client.AT+WKMOD=SSLC3.Configure server address and port.AT+SERVER=10.1.1.88,88994.*Configure whether verifying server certificate.AT+SSLVC=ON5.*Configure whether providing client certificate.AT+SSLOC=ON6.Reset module. After resetting successfully, user can send AT+SOCKLKA to query connection status(Ifmodule returns +OK=CONNECTED, connection between client and server has been establishedsuccessfully; otherwise, module will return +OK=DISCONNECTED)

Page 7: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 7 / 22 h.usriot.com

1.2. HTTPS

1.2.1.IntroductionIn this mode, module can package serial data into HTTP format and transmit HTTP format requesting data toHTTPS server, then module will receive and parse data from HTTPS server and transmit to serial device.

1.2.2.ConfigurationHTTPS related AT commands as follows:

Command FunctionWKMOD Query/Set work modeSERVER Query/Set HTTPS server address and portHTPTP Query/Set HTTPS requesting method

HTPHEAD Query/Set HTTPS header dataHTPURL Query/Set HTTPS URLHTPCHD Query/Set filtering HTTPS header data of response data function

enable/disableHTPTO Query/Set requesting timeout timeSSLVC Query/Set whether verifying server certificateSSLOC Query/Set whether providing client certificate

Figure 3 HTTPS AT commandsUser can configure HTTPS mode by following steps(* is unnecessary step and user can refer to 1.1.2.Burncertificate and private key to burn certificate and private key according to own needs):1.Configure C210 in STAmode and connect to router:User can refer to 2.AT command WMODE/WSTA command to achieve.2.Configure C210 work mode to HTTPS.AT+WKMOD=HTTPS3.Configure requesting method to GET.AT+HTPTP=GET4.Configure HTTP server address and port.AT+SERVER=10.1.1.88,4435.Configure URL.AT+HTPURL=/index6.Configure requesting timeout time.AT+HTPTO=107.Configure header data.AT+HTPHEAD=Accept:text/html[0D][0A]Accept-Language:zh-CN[0D][0A]User-Agent:Mozilla/5.0[0D][0A]Connection: Keep-Alive[0D][0A]([0D] and [0A] are escape character which represent carriage return and line feed)8.Disable filtering HTTPS header data of response data function.AT+HTPCHD=OFF

Page 8: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 8 / 22 h.usriot.com

9.*Configure whether verifying server certificate.AT+SSLVC=ON10.*Configure whether providing client certificate.AT+SSLOC=ON11.Reset module.

1.3. MQTT/MQTTS

1.3.1.IntroductionMQTT(Message Queuing Telemetry Transport) is a light-weight level communication protocol which based onpublish/subscribe mode. The most important advantage of MQTT is it can provide real-time and reliablemessage service for accessing remote device with few codes and limited bandwidth. MQTTS is based onMQTT and transmits data by SSL way to improve security of data transmission.

In this mode, module can publish/subscribe message, configure Client ID, user authentication, heartbeatpacket, certificate authentication functions.

1.3.2.ConfigurationMQTT/MQTTS related AT commands as follows:

Command FunctionWKMOD Query/Set work modeSERVER Query/Set server address and portMQTTSUB Query/Set subscribed topicMQTTU Query/Set username and passwordMQTTID Query/Set client IDMQTTPT Query/Set keep-alive intervalSOCKLKA Query connection status

MQTTS modeSSLVC Query/Set whether verifying server certificateSSLOC Query/Set whether providing client certificate

Figure 4 MQTT/MQTTS AT commandsUser can configure MQTT/MQTTS mode by following steps(user can refer to 1.1.2.Burn certificate andprivate key to burn certificate and private key according to own needs):1.Configure C210 in STAmode and connect to router:User can refer to 2.AT command WMODE/WSTA command to achieve.2.Configure C210 work mode to MQTT.AT+WKMOD=MQTT(User can configure to MQTTS by AT+WKMOD=MQTTS if user needs certificateservice)3.Configure server address and port.AT+SERVER=10.1.1.88,18834.Configure keep-alive interval.

Page 9: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 9 / 22 h.usriot.com

AT+MQTTPT=105.Add second subscribed topic.AT+MQTTSUB=add,2,mytopic6.Reset. After module connecting to server, subscribing first and second topic.7.Send message ‘hello’ to ‘mytopic’. Serial port side send mytopic,hello directly.

After module receiving subscribed message, module will send transparent data as following format(Takemessage www.usr.cn from mytopic as example):

Format TopicID(1byte) Message length(4 bytes) Data(n bytes)Example 02 0A 00 00 00 77 77 77 2E 75 73 72 2E 63 6E

Figure 5 MQTT/MQTTS serial data format

Page 10: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 10 / 22 h.usriot.com

2.AT command

In work mode, user can enter AT command mode and send AT commands to module to configure the module.For entering AT command mode, please refer to this FAQ:http://www.usriot.com/enter-serial-command-mode/.

2.1. AT command set

Command FunctionBasic command

ENTM Exit serial AT command mode and enter work modeE Query/Set AT command echo function enable/disableZ Reset the module

CFGTF Save the current setting as the user default settingsRELD Restore user default settingsMAC Query MAC address

SEARCH Query/Set search port and keyword in LANMID Query/Set module namePLANG Query/Set language of Web ServerVER Query firmware version

WSCAN Search surrounding APWIFI settings command

WMODE Query/Set WIFI modeWSTA Query/Set SSID and password of connected APWANN Query/Set module WAN interface parametersWSLK Query the status and RSSI in STA modeWAP Query/Set AP mode parameters(SSID and password)LANN Query/Set module LAN interface parameters

CHANNEL Query/Set the channel of module in AP modeSerial port command

UART Query/Set serial port parametersUARTTE Query/Set serial port Free-Frame mode intervalSLPTYPE Query/Set sleep mode

SSL Client/HTTPS/MQTT/MQTTS commandWKMOD Query/Set work modeSERVER Query/Set server address and portSSLVC Query/Set whether verifying server certificate(MQTT don’t need this command)SSLOC Query/Set whether providing client certificate(MQTT don’t need this command)

SOCKLKA Query connection status

Page 11: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 11 / 22 h.usriot.com

HTTPS mode commandHTPTP Query/Set HTTPS requesting method

HTPHEAD Query/Set HTTPS headerHTPURL Query/Set HTTPS URLHTPCHD Query/Set filtering HTTPS header of response data function enable/disableHTPTO Query/Set HTTPS requesting timeout time

MQTT/MQTTS commandMQTTSUB Query/Set subscribed topicMQTTID Query/Set client IDMQTTU Query/Set username and passwordMQTTPT Query/Set keep-alive interval

Other commandPING Network PING functionMDCH Query/Set WIFI exception handling status

2.2. AT command details

2.2.1.AT+ENTMFormat

Set AT+ENTM<CR>Return <CR><LF>+OK<CR><LF>

2.2.2.AT+EParameter Description Default Value Range<Status> AT command Echo function ON ON/OFF

FormatQuery AT+E<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+E=<Status><CR>

Return <CR><LF>+OK<CR><LF>

2.2.3.AT+ZFormat

Set AT+Z<CR>Return <CR><LF>+OK<CR><LF>

Page 12: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 12 / 22 h.usriot.com

2.2.4.AT+CFGTFParameter Description Range

<Status>Results of saving the currentsettings as the default settings

SAVED: Saving successfullyNON-SAVED: Saving unsuccessfully

FormatSet AT+CFGTF<CR>

Return <CR><LF>+OK=<Status><CR><LF>

2.2.5.AT+RELDFormat

Set AT+RELD<CR>Return <CR><LF>+OK=REBOOTING...<CR><LF>

2.2.6.AT+MACParameter Description<MAC> MAC address of the module.

FormatQuery AT+MAC<CR>Return <CR><LF>+OK=<MAC><CR><LF>

2.2.7.AT+SEARCHParameter Description Default Value Range<Port> UDP port for searching 48899 1~65535

<Keyword> Searching keyword www.usr.cn 1~20 bytesFormat

Query AT+SEARCH<CR>Return <CR><LF>+OK=<Port>,<Keyword><CR><LF>Set AT+SEARCH=<Port>,<Keyword><CR>

Return <CR><LF>+OK<CR><LF>

2.2.8.AT+MIDParameter Description Default Value Range<MID> Module name USR-C210 1~20 Bytes

FormatQuery AT+MID<CR>Return <CR><LF>+OK=<MID><CR><LF>Set AT+MID=<MID><CR>

Return <CR><LF>+OK<CR><LF>

Page 13: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 13 / 22 h.usriot.com

2.2.9.AT+PLANGParameter Description Default Value Range

<Language> Language of Web Server CNEN: EnglishCN: Chinese

FormatQuery AT+PLANG<CR>Return <CR><LF>+OK=<Language><CR><LF>Set AT+PLANG=<Language><CR>

Return <CR><LF>+OK<CR><LF>

2.2.10.AT+VERParameter Description<VER> Firmware version of the module

FormatQuery AT+VER<CR>Return <CR><LF>+OK=<VER><CR><LF>

2.2.11.AT+WSCANParameter Description<SSID> SSID that be searched by module<BSSID> MAC address of SSID that be searched by module<Security> Encryption security mode of SSID that searched by module<Indicator> RSSI of SSID that be searched by module

FormatQuery AT+WSCAN<CR>

Return

<CR><LF>+OK=<LF><CR>SSID,BSSID,SECURITY,INDICATOR<LF><CR><SSID1>,<BSSID1>,<Security1>,<Indicator1><LF><CR><SSID2>,<BSSID2>,<Security2>,<Indicator2><LF><CR>.....<LF><CR><SSIDN><BSSIDN><SecurityN><IndicatorN><CR><LF>

2.2.12.AT+WMODEParameter Description Default Value Range<Status> WIFI mode of module AP AP/STA/AP+STA

FormatQuery AT+WMODE<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+WMODE=<Status><CR>

Return <CR><LF>+OK<CR><LF>

Page 14: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 14 / 22 h.usriot.com

2.2.13.AT+WSTAParameter Description Range<SSID> SSID of connected AP 1~32 bytes and can’t be“,”

<PASSWORD> Password of connected AP Can’t be“,”

FormatQuery AT+WSTA<CR>Return <CR><LF>+OK=<SSID>,<PASSWORD ><CR><LF>Set AT+WSTA=<SSID>,<PASSWORD ><CR>

Return <CR><LF>+OK<CR><LF>

2.2.14.AT+WANNParameter Description Default Value Range

<Mode>How to get IP

addressDHCP

STATIC: Getting IP manuallyDHCP: Getting IP automatically

<IP address> IP address 10.10.100.254 0.0.0.0~255.255.255.255<Mask> Subnet mask 255.255.255.0 0.0.0.0~255.255.255.255

<Gateway> Gateway 10.10.100.254 0.0.0.0~255.255.255.255<DNS> DNS address 208.67.222.222 0.0.0.0~255.255.255.255

FormatQuery AT+WANN<CR>

Return<CR><LF>+OK=<Mode>,<IP

address>,<Mask>,<Gateway>,<DNS><CR><LF>

SetAT+WANN=<Mode>,<IP address>,<Mask>,<Gateway>,<DNS><CR> use

Static IP method/AT+WANN=DHCP<CR> use DHCP methodReturn <CR><LF>+OK<CR><LF>

2.2.15.AT+WSLKParameter Description Range

<Status>Connection status ofmodule in STA mode

DISCONNECTED: No connection with any APSSID of connected AP if connected

<RSSI> RSSI 0-100Format

Query AT+WSLK<CR>Return <CR><LF>+OK=<Status>,<RSSI><CR><LF>

Page 15: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 15 / 22 h.usriot.com

2.2.16.AT+WAPParameter Description Default Value Range

<SSID>SSID of module in AP

modeUSR-C210 Can’t have “,”

<PASSWORD>Password of module

in AP modeNONE

>=8 bytes and can’t have “,”NONE: No password

FormatQuery AT+WAP<CR>Return <CR><LF>+OK=<SSID>,<PASSWORD><CR><LF>Set AT+WAP=<SSID>,<PASSWORD><CR>

Return <CR><LF>+OK<CR><LF>

2.2.17.AT+LANNParameter Description Default Value Range

<IP address>IP address of module in AP

mode10.10.100.254 0.0.0.0~255.255.255.255

<Mask>Subnet mask of module in

AP mode255.255.255.0 0.0.0.0~255.255.255.255

FormatQuery AT+LANN<CR>Return <CR><LF>+OK=<IP address>,<Mask><CR><LF>Set AT+LANN=<IP address>,<Mask><CR>

Return <CR><LF>+OK<CR><LF>

2.2.18.AT+CHANNELParameter Description Default Value Range<NUM> Channel of module in AP mode 6 1-11

FormatQuery AT+CHANNEL<CR>Return <CR><LF>+OK=<NUM><CR><LF>Set AT+CHANNEL=<NUM><CR>

Return <CR><LF>+OK<CR><LF>

2.2.19.AT+UARTParameter Description Default Value Range

<Baud rate> Baud rate 1152001200, 2400, 4800, 9600, 14400, 19200,38400, 57600, 115200, 128000, 230400,

460800<Data bits> Data bits 8 7, 8<Stop bits> Stop bits 1 1, 2

Page 16: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 16 / 22 h.usriot.com

<Parity> Parity NONE NONE, EVEN, ODD, MARK, SPACE

<FlowControl>

Flow Control NFCNFC: No flow control

FC: Hardware flow control(RTS/CTS)485: Enabling RS485

FormatQuery AT+UART<CR>

Return<CR><LF>+OK=<Baud rate>,<Data bits>,<Stop bits>,<Parity><Flow

Control><CR><LF>

SetAT+UART=<Baud rate>,<Data bits>,<Stop bits>,<Parity><Flow

Control><CR>Return <CR><LF>+OK<CR><LF>

2.2.20.AT+UARTTEParameter Description Default Value Range

<Interval>

Interval ofadjacent bytesin serial portFree-Frame

mode

20ms

20-250ms. And time interval willautomatically change according to

baud rate.(Baud rate<=1200,time=250ms; Baud rate>=20000,

time=20ms; 1200<Baud rate<20000,time=265-Baudrate*0.01223, time isinteger) So user should set baud rate

before set Time interval.Format

Query AT+UARTTE<CR>Return <CR><LF>+OK=<Interval><CR><LF>Set AT+UARTTE=<Interval><CR>

Return <CR><LF>+OK<CR><LF>

2.2.21.AT+SLPTYPEParameter Description Default Value Range

<Mode> Sleep Mode 0(Active Mode)0: Active mode1: Sleep mode

2: Deepsleep mode

<Time>

Module without communicationlast time. When no data

transmission for this time,module will enter sleep mode

No DefaultValue

5-240 s

FormatQuery AT+SLPTYPE<CR>Return <CR><LF>+OK=<Mode>,<Time><CR><LF>

Page 17: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 17 / 22 h.usriot.com

SetAT+SLPTYPE=<Mode>,<Time><CR>/AT+SLPTYPE=0<CR> to set active

modeReturn <CR><LF>+OK<CR><LF>

2.2.22.AT+WKMODParameter Description Range<Mode> Work mode SSLC/HTTPS/MQTT/MQTTS

FormatQuery AT+WKMOD<CR>Return <CR><LF>+OK=<Mode><CR><LF>Set AT+WKMOD=<Mode><CR>

Return <CR><LF>+OK<CR><LF>

2.2.23.AT+SERVERParameter Description Default Value Range<Address> Server address test.usr.cn IP address or domain name<Port> Server port 80 0~65535

FormatQuery AT+SERVER<CR>Return <CR><LF>+OK=<Address>,<Port><CR><LF>Set AT+SERVER=<Address>,<Port><CR>

Return <CR><LF>+OK<CR><LF>

2.2.24.AT+SSLVCParameter Description Range<Status> Status of verifying server certificate ON/OFF

FormatQuery AT+SSLVC<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+SSLVC=<Status><CR>

Return <CR><LF>+OK<CR><LF>

2.2.25.AT+SSLOCParameter Description Range<Status> Status of providing client certificate ON/OFF

FormatQuery AT+SSLOC<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+SSLOC=<Status><CR>

Return <CR><LF>+OK<CR><LF>

Page 18: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 18 / 22 h.usriot.com

2.2.26.AT+SOCKLKAParameter Description Range<Status> Status of TCP connection CONNECT/DISCONNECTED

FormatQuery AT+SOCKLKA<CR>Return <CR><LF>+OK=<Status><CR><LF>

2.2.27.AT+HTPTPParameter Description Default Value Range<Method> HTTPS requesting method GET GET/POST

FormatQuery AT+HTPTP<CR>Return <CR><LF>+OK=<Method><CR><LF>Set AT+HTPTP=<Method><CR>

Return <CR><LF>+OK<CR><LF>

2.2.28.AT+HTPHEADParameter Description Default Value Range

<Header>HTTPS header

data

Connection:Keep-Alive[0D][0A]([0D][0A]

mean Carriage Return and LineFeed, [ ] used to transfer meaningby HEX. And parameters must be

end with [0D][0A])

Length: 0~200bytes

FormatQuery AT+HTPHEAD<CR>Return <CR><LF>+OK=<Header><CR><LF>Set AT+HTPHEAD=<Header><CR>

Return <CR><LF>+OK<CR><LF>

2.2.29.AT+HTPURLParameter Description Default Value Range<URL> HTTPS URL /1.php[3F]([3F] means ?) Length: 1~64 bytes

FormatQuery AT+HTPURL<CR>Return <CR><LF>+OK=<URL><CR><LF>Set AT+HTPURL=<URL><CR>

Return <CR><LF>+OK<CR><LF>

Page 19: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 19 / 22 h.usriot.com

2.2.30.AT+HTPCHDParameter Description Default Value Range

<Status>Status of filtering HTTPS header

data of response dataOFF ON/OFF

FormatQuery AT+HTPCHD<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+HTPCHD=<Status><CR>

Return: <CR><LF>+OK<CR><LF>

2.2.31.AT+HTPTOParameter Description Default Value Range<Time> HTTPS requesting timeout time 10s 1-30s

FormatQuery AT+HTPTO<CR>Return <CR><LF>+OK=<Time><CR><LF>Set AT+HTPTO=<Time><CR>

Return <CR><LF>+OK<CR><LF>

2.2.32.AT+MQTTSUBFormat

Query AT+MQTTSUBReturn <CR><LF>+OK=<ID1:topic1,ID2:topic2…><CR><LF>

Add topic AT+MQTTSUB=<ADD,ID,TOPIC><CR>Return <CR><LF>+OK<CR><LF>

Delete specified topic AT+MQTTSUB=<DEL,ID><CR>Return <CR><LF>+OK<CR><LF>

Delete all topics AT+MQTTSUB=<DEL ><CR>Return <CR><LF>+OK<CR><LF>

Note: ID range from 1~10. User should keep at least one topic. Therefor topic with ID 1 can’t be deleted. Topic should less than 64 bytes.

2.2.33.AT+MQTTIDParameter Description Range

<ID> Client ID Less than 23 bytesFormat

Query AT+MQTTID<CR>Return <CR><LF>+OK=<ID><CR><LF>

Page 20: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 20 / 22 h.usriot.com

Set AT+MQTTID=<ID><CR>Return <CR><LF>+OK<CR><LF>

2.2.34.AT+MQTTUParameter Description Range<Username> Username Less than 32 bytes, NONE means no username<Password> Password Less than 64 bytes, NONE means no password

FormatQuery AT+MQTTU<CR>Return <CR><LF>+OK=<Username>,<Password><CR><LF>Set AT+MQTTU=<Username>,<Password><CR>

Return <CR><LF>+OK<CR><LF>

2.2.35.AT+MQTTPTParameter Description Range<Interval> Keep-alive interval 0~1080 minutes

FormatQuery AT+MQTTPT<CR>Return <CR><LF>+OK=<Interval><CR><LF>Set AT+MQTTPT=<Interval><CR>

Return <CR><LF>+OK<CR><LF>

2.2.36.AT+PINGParameter Description Range

<Address>Default IP address or

domain name of moduleCan be IP address 10.10.100.254 or

domain name www.usr.cn<Status> Status of ping Success/Timeout/Unknown host

FormatQuery AT+PING=<Address><CR>Return <CR><LF>+OK=<Status><CR><LF>

2.2.37.AT+MDCHParameter Description Default Value Range

<Status>

Status ofWIFI

exceptionhandling

10 minutes

OFF: Closing WIFI exception handlingON: Opening WIFI mode switching

function. Switching to AP+STA modeautomatically when connectingunsuccessfully in STA mode2-240 minutes: WIFI exception

detection intervalFormat

Page 21: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 21 / 22 h.usriot.com

Query AT+MDCH<CR>Return <CR><LF>+OK=<Status><CR><LF>Set AT+MDCH=<Status><CR>

Return <CR><LF>+OK<CR><LF>

Page 22: USR-C210-SSL-MQTT-Firmware-Manual - USRIOT€¦ · USR-C210-SSL-MQTT-Firmware-Manual JinanUSRIOTTechnologyLimited 5/22 h.usriot.com 1.Productfunctions 1.1.SSLClient 1.1.1.Introduction

USR-C210-SSL-MQTT-Firmware-Manual www.usriot.com

Jinan USR IOT Technology Limited 22 / 22 h.usriot.com

3.Contact

Company: Jinan USR IOT Technology LimitedAddress: Floor 11, Building No.1, No.1166, Xinluo Street, Gaoxin District, Jinan city, Shandong province,250101 ChinaTel: 86-531-88826739Web: www.usriot.comSupport: h.usriot.comEmail: [email protected]

4.Disclaimer

This document provide the information of USR-C210 products, it hasn’t been granted any intellectual propertylicense by forbidding speak or other ways either explicitly or implicitly. Except the duty declared in sales termsand conditions, we don’t take any other responsibilities. We don’t warrant the products sales and useexplicitly or implicitly, including particular purpose merchant-ability and marketability, the tort liability of anyother patent right, copyright, intellectual property right. We may modify specification and description at anytime without prior notice.

5.Update History

2017-11-23 V1.0.0 created.


Recommended