background image

USR-DR404 AT 指令集

1

USR Cortex-M7 Series

AT Command manual V2.0.0

Serial to Ethernet Device Server

Build a Smarter IoT world, Your Trustworthy Partner

USR-N510,USR-N520,USR-N540,USR-N580

Summary of Contents for Cortex-M7 Series

Page 1: ...USR DR404 AT 指令集 1 USR Cortex M7 Series AT Command manual V2 0 0 Serial to Ethernet Device Server Build a Smarter IoT world Your Trustworthy Partner USR N510 USR N520 USR N540 USR N580 ...

Page 2: ...5 AT CFGTF 12 2 5 6 AT RELD 13 2 5 7 AT CLEAR 13 2 5 8 AT VER 13 2 5 9 AT ENTM 13 2 5 10 AT MAC 14 2 5 11 AT WANN 14 2 5 12 AT DNSTYPE 14 2 5 13 AT DNS 15 2 5 14 AT SDNS 15 2 5 15 AT UARTN N Serial port number 1 8 15 2 5 16 AT UARTTLN 16 2 5 17 AT RFCENN 16 2 5 18 AT UARTMN 17 2 5 19 AT SOCKMN M socket number A H N Serial port number 1 8 17 2 5 20 AT SOCKLKMN 18 2 5 21 AT MAXSKN 18 2 5 22 AT TCPSE...

Page 3: ... AT HTPHEADN 25 2 5 42 AT HTPCHDN 26 2 5 43 AT HTPTON 26 2 5 44 AT MODTCPN 27 2 5 45 AT MODPOLLN 27 2 5 46 AT MODTON 27 2 5 47 AT MQTTEN 28 2 5 48 AT MQTTVER 28 2 5 49 AT MQTTCID 28 2 5 50 AT MQTTSER 29 2 5 51 AT MQTTLPORT 29 2 5 52 AT MQTTHEARTTM 29 2 5 53 AT MQTTRECTM 30 2 5 54 AT MQTTNDTRECTM 30 2 5 55 AT MQTTCS 31 2 5 56 AT MQTTAUTH 31 2 5 57 AT MQTTUSER 31 2 5 58 AT MQTTPSW 32 2 5 59 AT MQTTL...

Page 4: ...8 AT USRCLDGTOP 40 2 5 79 AT EDGEEN 41 2 5 80 AT MID 41 2 5 81 AT WEBSOCKPORT1 41 2 5 82 AT WEBPOINT 42 2 5 83 AT WEBPORT 42 2 5 84 AT WEBU 43 2 5 85 AT RSTIM 43 2 5 86 AT UARTCLBUF 43 2 5 87 AT NETPRN 44 2 5 88 AT SNMPEN 44 2 5 89 AT TELNETEN 44 2 5 90 AT TELNETPORT 45 2 5 91 AT NTPEN 45 2 5 92 AT NTPSER 46 2 5 93 AT LOG 46 2 5 94 AT P485CLT 46 2 5 95 AT PDTIME 47 2 5 96 AT SEARCH 47 2 5 97 AT PL...

Page 5: ...through local network that means the USR products must be in the same subnet with PC or any device that sends AT commands The syntax and usage of the AT command are described in details later Send WWW USR CN strings through UDP broadcast to port 48899 the remote host is set to 255 255 255 255 48899 If the module and the PC are on the same network segment the module replies As shown below Figure 1 ...

Page 6: ...ustrial IoT Partner www pusr com 5 Figure 2 Check Auto Append Bytes Figure 3 Send AT command Now you can send AT command to the module If no command is sent within 30 seconds the module will automatically exit the Network AT command mode ...

Page 7: ... Click open and click a The data window on the right receives a ok AT this point the device enters the command mode and AT command parameters can be set Figure 4 Enter Serial AT Command mode To enter the AT command mode input characters and a need to meet certain timing requirements as shown below Figure 5 Timing sequence diagram Timing sequence T1 Serial port data packaging interval T2 300ms T3 3...

Page 8: ...le brackets is a syntactical element they must be included Angle brackets do not appear on command line Yes Optional parameter of a command or an optional part of AT information response Square brackets do not appear on command line No AT AT command header Yes CMD Command code Yes OP Operator e g indicates Setting NULL indicates No operator No para n Parameters when setting No CR Carriage return c...

Page 9: ...rmware version 9 AT ENTM Exit AT command mode 10 AT MAC Query MAC address IP setting commands 11 AT WANN Query set WAN port parameters 12 AT DNSTYPE Query set DNS obtained method 13 AT DNS Query set preferred DNS Server 14 AT SDNS Query set alternate DNS Server Serial port setting commands 15 AT UARTN Query set serial port parameters of PortN 16 AT UARTTLN Query set UART packaging mechanism of Por...

Page 10: ...pport ASCII 33 AT HEARTUSERN Query set user defined heartbeat packets of PortN both ASCII and HEX are supported Registration packet setting commands 34 AT REGENN Query set registration packet type of PortN 35 AT REGTCPN Query set registration packet location of PortN 36 AT REGUSRN Query set custom registration package of PortN only support ASCII 37 AT REGUSERN Query set custom registration package...

Page 11: ...ery set whether to enable TLS SSL 62 AT MQTTPUBCU SEN Query set publishing method of message 63 AT MQTTPUB Query set predefined topic message to publish 64 AT MQTTSUB Query set topic message to subscribe AWS IOT commands 65 AT AWSEN Query set whether to enable AWS IOT service 66 AT AWSCID Query set client ID 67 AT AWSSER Query set Host address and port 68 AT AWSHEARTT M Query set keep alive interv...

Page 12: ...UARTCLBUF Query set whether the serial port cache is enabled 87 AT NETPRN Query set the network printing function of PortN 88 AT SNMPEN Query set whether SNMP is enabled 89 AT TELNETEN Query set whether TELNET is enabled 90 AT TELNETPORT Query set TELNET port NO 91 AT NTPEN Query set whether NTP is enabled 92 AT NTPSER Query set NTP server and timezone 93 AT LOG Query set the LOG level 94 AT P485C...

Page 13: ... 2 5 2 AT H Function Help Format Query AT H CR CR LF OK CR LF ver CR LF Parameter Ver all commands will be printed 2 5 3 AT Z Function Restart the module Format Execute AT Z CR CR LF OK CR LF Parameter none Note After the command is executed the module restarts 2 5 4 AT REBOOT Function Restart the module Format Execute AT REBOOT CR CR LF OK CR LF Parameter none Note After the command is executed t...

Page 14: ...ore the user default settings Format Execute AT RELD CR CR LF OK CR LF Parameter none 2 5 7 AT CLEAR Function Restore the factory default settings Format Execute AT CLEAR CR CR LF OK CR LF Parameter none 2 5 8 AT VER Function Query firmware version Format Query AT VER CR CR LF OK ver CR LF Parameter ver firmware version 2 5 9 AT ENTM Function Exit AT command mode Format Execute ...

Page 15: ...uery set WAN port parameters Format Query AT WANN CR CR LF OK mode address mask gateway CR LF Set AT WANN mode address mask gateway CR CR LF OK CR LF Parameters mode method of getting IP static static IP DHCP automatic address mask gateway omitted address IP address mask subnet mask gateway gateway E g AT WANN static 192 168 0 7 255 255 255 0 192 168 0 1 2 5 12 AT DNSTYPE Function Query set DNS ob...

Page 16: ... address CR CR LF OK CR LF Parameter address DNS server address E g AT DNS 208 67 222 222 Note you should change DNSTYPE to manual first 2 5 14 AT SDNS Function Query set alternate DNS Server Format Query AT SDNS CR CR LF OK address CR LF Set AT SDNS address CR CR LF OK CR LF Parameter address DNS server address E g AT SDNS 8 8 8 8 Note you should change DNSTYPE to manual first 2 5 15 AT UARTN N S...

Page 17: ...FCH hardware control flow only RS232 and UART TTL support E g AT UART1 115200 8 1 NONE NFC 2 5 16 AT UARTTLN Function Query set UART packaging mechanism of PortN Format Query AT UARTTLN CR CR LF OK time length CR LF Set AT UARTTLN time length CR CR LF OK CR LF Parameters time Byte interval between packets 0 255 ms length Maximum length of a packet 0 1460 byte If the interval is not reached and the...

Page 18: ...set serial port interface type of PortN N520 H7 6 Format Query AT UARTMN CR CR LF OK status CR LF Set AT UARTMN status CR CR LF OK CR LF Parameter status 232 default 485 E g AT UARTM1 485 2 5 19 AT SOCKMN M socket number A H N Serial port number 1 8 Function Query set Socket M parameters of PortN Query AT SOCKMN CR CR LF OK protocol IP port CR LF Set AT SOCKMN protocol IP port CR CR LF OK CR LF Pa...

Page 19: ...s listening for connection access CONNECTING The module is building a connection to the TCP Server CONNECTED The TCP connection to TCP server of the module has been established CONNECTED n Number of TCP clients connected to the module ERROR The module is abnormally disconnected E g AT SOCKLKA1 2 5 21 AT MAXSKN Function Query set maximum sockets no supported in TCP server mode of PortN Format Query...

Page 20: ... 23 AT SOCKPORTAN Function Query set local port of SOCKA of PortN Format Query AT SOCKPORTAN CR CR LF OK port CR LF Set AT SOCKPORTAN CR CR LF OK port CR LF Parameter port local port NO 0 65535 default 0 random E g AT SOCKPORTA1 8899 2 5 24 AT UDPONN Function Do not filter remote IP or port in UDP mode of PortN Format Query AT UDPONN CR CR LF OK sta CR LF Set AT UDPONN sta CR CR LF OK CR LF Parame...

Page 21: ... enable OFF disable default E g AT MULTIEN1 OFF 2 5 26 AT SOCKSLN Function Query set whether to enable short lived connection in TCP client mode of PortN Format Query AT SOCKSLN CR CR LF OK sta CR LF Set AT SOCKSLN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT SOCKSL1 ON 2 5 27 AT SHORTON Function Query set short lived connection timeout in Socket A of PortN Format Query...

Page 22: ...K time CR LF Set AT SOCKTONN time CR CR LF OK CR LF Parameter time range 0 99999s default 0s close reconnection E g AT SOCKTONN 86400 2 5 29 AT HEARTENN Function Query set heartbeat packet status of PortN Format Query AT HEARTENN CR CR LF OK status CR LF Set AT HEARTENN status CR CR LF OK CR LF Parameter status ON enable OFF disable default E g AT HEARTEN1 ON 2 5 30 AT HEARTTMN Function Query set ...

Page 23: ...F OK type CR LF Set AT HEARTTP type CR CR LF OK CR LF Parameter status NET send to Ethernet port COM send to serial port E g AT HEARTTP1 NET 2 5 32 AT HEARTDTN Function Query set user defined heartbeat packets of PortN only support ASCII Format Query AT HEARTDT CR CR LF OK data CR LF Set AT HEARTDT data CR CR LF OK CR LF Parameter data up to 40 characters E g AT HEARTDT1 www usr cn 2 5 33 AT HEART...

Page 24: ...ERN 01020305 HEX 2 5 34 AT REGENN Function Query set registration packet type of PortN Format Query AT REGENN CR CR LF OK status CR LF Set AT REGENN status CR CR LF OK CR LF Parameter status USR User defined registration package up to 40 characters MAC MAC address CLOUD PUSR cloud ID and password OFF disable this function E g AT REGEN1 USR 2 5 35 AT REGTCPN Function Query set registration packet l...

Page 25: ...RN CR CR LF OK data CR LF Set AT REGUSRN data CR CR LF OK CR LF Parameter data up to 40 characters E g AT REGUSR1 12345 2 5 37 AT REGUSERN Function Query set custom registration package of PortN both ASCII and HEX are supported Format Query AT REGUSERN CR CR LF OK data type CR LF Set AT REGUSERN data type CR CR LF OK CR LF Parameters data custom registration package up to 40 characters in ASCII up...

Page 26: ... 5 39 AT HTPTPN Function Query set HTTP request methods of PortN Format Query AT HTPTPN CR CR LF OK status CR LF Set AT HTPTPN status CR CR LF OK CR LF Parameter status GET request method get POST request method post E g AT HTPTP1 GET 2 5 40 AT HTPURLN Function Query set URL of PortN Format Query AT HTPURLN CR CR LF OK URL CR LF Set AT HTPURLN URL CR CR LF OK CR LF Parameter URL up to 99 character...

Page 27: ...resented by CRLF escape characters E g AT HTPHEAD1 Accept text CRLF 2 5 42 AT HTPCHDN Function Query set whether to filter packet header of PortN Format Query AT HTPCHDN CR CR LF OK sta CR LF Set AT HTPCHDN sta CR CR LF OK CR LF Parameter Sta ON enable default OFF disable E g AT HTPCHD1 ON 2 5 43 AT HTPTON Function Query set http server response timeout Query AT HTPTON CR CR LF OK time CR LF Set A...

Page 28: ... CR LF Parameter Sta ON enable OFF disable default E g AT MODTCP1 ON 2 5 45 AT MODPOLLN Function Query set whether to enable modbus poll of PortN Format Query AT MODPOLLN CR CR LF OK sta CR LF Set AT MODPOLLN sta CR CR LF OK CR LF Parameter Sta ON enable OFF disable default E g AT MODPOLL1 ON 2 5 46 AT MODTON Function Query set modbus slave response timeout of PortN Query AT MODTON CR CR LF OK tim...

Page 29: ...enable MQTT Format Query AT MQTTEN CR CR LF OK sta CR LF Set AT MQTTEN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT MQTTEN ON 2 5 48 AT MQTTVER Function Query set MQTT version Format Query AT MQTTVER CR CR LF OK ver CR LF Set AT MQTTVER ver CR CR LF OK CR LF Parameter ver 3 V3 1 0 4 V3 1 1 default E g AT MQTTVER 4 2 5 49 AT MQTTCID Function Query set client ID Format ...

Page 30: ...ost address and port Format Query AT MQTTSER CR CR LF OK address port CR LF Set AT MQTTSER address port CR CR LF OK CR LF Parameter address broker address up to 128 characters Port 1 65535 default 1883 E g AT MQTTSER mqtt eclipse org 1883 2 5 51 AT MQTTLPORT Function Query set local port Format Query AT MQTTLPORT CR CR LF OK port CR LF Set AT MQTTLPORT CR CR LF OK port CR LF Parameter port local p...

Page 31: ... 5 53 AT MQTTRECTM Function Query set MQTT connection timeout Format Query AT MQTTRECTM CR CR LF OK time CR LF Set AT MQTTRECTM time CR CR LF OK CR LF Parameter time default 1s range 1 65535s E g AT MQTTRECTM 10 2 5 54 AT MQTTNDTRECTM Function Query set MQTT reconnect period when no data flow in socket Format Query AT MQTTNDTRECTM CR CR LF OK time CR LF Set AT MQTTNDTRECTM time CR CR LF OK CR LF P...

Page 32: ...R CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT MQTTCS ON 2 5 56 AT MQTTAUTH Function Query set whether to enable user credential Format Query AT MQTTAUTH CR CR LF OK sta CR LF Set AT MQTTAUTH sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT MQTTAUTH ON 2 5 57 AT MQTTUSER Function Query set user name Format Query AT MQTTUSER CR CR LF OK user CR LF Set ...

Page 33: ...CR LF OK password CR LF Set AT MQTTPSW CR CR LF OK password CR LF Parameters password up to 128 characters can t be NULL E g AT MQTTPSW admin 2 5 59 AT MQTTLWTEN Function Query set whether to enable last will and testament Format Query AT MQTTLWTEN CR CR LF OK sta CR LF Set AT MQTTLWTEN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT MQTTLWTEN ON 2 5 60 AT MQTTLWTCFG Funct...

Page 34: ... g AT MQTTLWTCFG will 0 ON offline 2 5 61 AT MQTTSSL Function Query set whether to enable TLS SSL Query AT MQTTSSL CR CR LF OK sslen sslver sslmod CR LF Set AT MQTTSSL sslen sslver sslmod CR CR LF OK CR LF Parameter sslen ON enable OFF disable default sslver protocol version 1 TLS1 0 2 TLS1 2 sslmod 0 do not verify certificate 1 only verify server certificate 2 verify server and client certificate...

Page 35: ...et AT MQTTPUB pubnum puben topic mode symbol Qos retained comn CR CR LF OK CR LF Parameter pubnum 1 16 each serial port support maximum 16 topics puben ON enable this topic message can be published to server OFF disable default topic 0 128 characters do not support wildcards default PubTopicn mode 0 send to all topics default 1 send to specified topic format symbol payload symbol topic alias maxim...

Page 36: ...ers mode 0 only send payload to serial port default 1 topic and payload are sent to serial port Qos 0 1 2 default 0 cut separator or delimiter between topic and payload e g 44 represent comma comn serial port number 1 n E g AT MQTTSUB 1 ON SubTopic1 1 0 44 1 2 5 65 AT AWSEN Function Query set whether to enable AWS IOT service Format Query AT AWSEN CR CR LF OK sta CR LF Set AT AWSEN sta CR CR LF OK...

Page 37: ... CR CR LF OK address port CR LF Set AT AWSSER address port CR CR LF OK CR LF Parameter address broker address up to 128 characters Port 1 65535 default 8883 E g AT AWSSER amazonaws com cn 8883 2 5 68 AT AWSHEARTTM Function Query set keep alive interval Format Query AT AWSHEARTTM CR CR LF OK time CR LF Set AT AWSHEARTTM time CR CR LF OK CR LF Parameter time default 60s range 30 1200s E g AT AWSHEAR...

Page 38: ... MQTT reconnect period when no data flow in socket Format Query AT AWSNDTRECTM CR CR LF OK time CR LF Set AT AWSNDTRECTM time CR CR LF OK CR LF Parameter time default 0 means disable range 0 65535s E g AT AWSNDTRECTM 3600 2 5 71 AT AWSCS Function Query set whether to clean session Format Query AT AWSCS CR CR LF OK sta CR LF Set AT AWSCS sta CR CR LF OK CR LF Parameter sta ON enable OFF disable def...

Page 39: ...AWSPUBCUSEN Function Query set whether to enable instant topic message transparent transmission Format Query AT AWSPUBCUSEN CR CR LF OK sta CR LF Set AT AWSPUBCUSEN sta CR CR LF OK CR LF Parameter sta ON enable custom topic message transparent transform Format topic Qos retain payload OFF using predefined topic default E g AT AWSPUBCUSEN ON 2 5 74 AT AWSPUB Function Query set predefined topic mess...

Page 40: ...mn serial port number E g AT AWSPUB 1 ON PubTopic1 0 1 0 OFF 1 2 5 75 AT AWSSUB Function Query set topic message to subscribe Query AT AWSSUB CR CR LF OK subnum suben topic mode Qos cut comn CR LF Set AT AWSSUB subnum suben topic mode Qos cut comn CR CR LF OK CR LF Parameter subnum 1 16 each serial port support maximum 16 topics puben ON enable subscribe this topic message from server OFF disable ...

Page 41: ... enable OFF disable default E g AT USRCLDEN ON 2 5 77 AT USRCLDTCOM Function Query set bonding serial ports Format Query AT USRCLDTCOM CR CR LF OK com1 com2 CR LF Set AT USRCLDTCOM CR CR LF OK com1 com2 CR LF Parameter com1 com2 serial port number 1 n E g AT USRCLDTCOM 1 2 2 5 78 AT USRCLDGTOP Function Query set whether to enable edge computing of PUSR cloud Format Query AT USRCLDGTOP CR CR LF OK ...

Page 42: ...ay Format Query AT EDGEEN CR CR LF OK sta CR LF Set AT EDGEEN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT EDGEEN ON 2 5 80 AT MID Function Query set the module name Format Query AT MID CR CR LF OK name CR LF Set AT MID name CR CR LF OK CR LF Parameter name up to 32 characters can t be null E g AT MID USR N540 2 5 81 AT WEBSOCKPORT1 Function Query set WebSocket port NO ...

Page 43: ...apping direction Format Query AT WEBPOINT CR CR LF OK sta CR LF Set AT WEBPOINT sta CR CR LF OK CR LF Parameter sta OFF disable UARTn Serial port n Establish a Websocket connection LOG monitoring equipment operation log information E g AT WEBPOINT UART1 2 5 83 AT WEBPORT Function Query Set the web server port number Format Query AT WEBPORT CR CR LF OK port CR LF Set AT WEBPORT CR CR LF OK port CR ...

Page 44: ...haracters can t be NULL password up to 16 characters can t be NULL E g AT WEBU admin admin 2 5 85 AT RSTIM Function Query set the no data restart time Format Query AT RSTIM CR CR LF OK time CR LF Set AT RSTIM time CR CR LF OK CR LF Parameter time default 0 disable range 60 65535s E g AT RSTIM 3600 2 5 86 AT UARTCLBUF Function Query set whether the serial port cache is enabled Format Query AT UARTC...

Page 45: ... Query AT NETPRN CR CR LF OK sta CR LF Set AT NETPRN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable E g AT NETPR1 ON 2 5 88 AT SNMPEN Function Query set whether SNMP is enabled Format Query AT SNMPEN CR CR LF OK sta CR LF Set AT SNMPEN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g AT SNMPEN ON 2 5 89 AT TELNETEN Function Query set whether TELNET is enabled Format...

Page 46: ...N 2 5 90 AT TELNETPORT Function Query set TELNET port NO Format Query AT TELNETPORT CR CR LF OK port CR LF Set AT TELNETPORT CR CR LF OK port CR LF Parameter port port NO of TELNET default 22 E g AT TELNETPORT 8022 2 5 91 AT NTPEN Function Query set whether NTP is enabled Format Query AT NTPEN CR CR LF OK sta CR LF Set AT NTPEN sta CR CR LF OK CR LF Parameter sta ON enable OFF disable default E g ...

Page 47: ...SER cn ntp org cn 8 2 5 93 AT LOG Function Query set the LOG level Format Query AT LOG CR CR LF OK out_limit save_limit save_imm_limit CR LF Set AT LOG out_limit save_limit save_imm_limit CR CR LF OK CR LF Parameter Out_limit filtering log print level 0 7 default 6 Save_limit log stored level 0 7 default 3 Save_imm_limit log immediately stored level 0 7 default 1 E g AT LOG 6 3 1 2 5 94 AT P485CLT...

Page 48: ...time CR LF Parameter time production time e g 2021 10 18 11 20 02 2 5 96 AT SEARCH function Query Set the search keywords and UDP port Format Query AT SEARCH CR CR LF OK port keywords CR LF Set AT SEARCH port keywords CR LF CR LF OK CR LF Parameters port UDP port default 48899 keywords default WWW USR CN up to 20 characters E g AT SEARCH 48899 WWW USR CN 2 5 97 AT PLANG Function Query set the web ...

Page 49: ...ormat Query AT BTVER CR CR LF OK ver CR LF Parameter ver boot version 2 5 99 AT PING Function Test network connection Format Set AT PING ip CR CR LF OK CR LF Parameter IP Destination IP address or domain name The maximum length of domain name is 30 bytes E g AT PING www google com 2 5 100 AT UPTIME Function Query the run time Format Query AT UPTIME CR CR LF OK time CR LF Parameter time e g day 0 h...

Page 50: ...ESS IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT IN NO EVENT SHALL USR IoT AND OR ITS AFFILIATES BE LIABLE FOR ANY DIRECT INDIRECT CONSEQUENTIAL PUNITIVE SPECIAL OR INCIDENTAL DAMAGES INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS BUSINESS INTERRUPTION OR LO...

Reviews: