RDA5981 AT

From ElectroDragon
Revision as of 05:35, 10 January 2018 by Chao (Talk | contribs) (Commands)

Jump to: navigation, search

Instruction

Notice

  • Part of the command can be used case, such as AT / at, \ r \ n end,
  • The parameter part is separated by ","
  • String part of the recommended use of quotation marks, to prevent the error contains special symbols, such as AT + WSCONN = "a", "qqqqqqqq"
  • Commands that are not specifically explained are executed orders and can be executed directly, such as AT + RST

Command type

  • Set the command: AT + <x> = <param1>, [<param2>] // [] said the parameters inside can not write
  • Query command: AT + <x> =? If AT + WSMAC =?
  • Execute command: AT + <x> such as AT + RST

return value:

  • + OK successful
  • + OK: <...> The execution was successful with a return message
  • + ERR: <errcode> Failed to execute and error code returned

errcode:

  • No such instruction: -1
  • Not allowed to perform: -2
  • Execution failed: -3
  • The parameters are wrong: -4
  • Not supported: -5

Commands

Type Commands Description Group
1 AT Test AT mode is enabled General
2 AT+H View AT Help General
3 AT+RST Restart the module General
4 AT+GMI Query vendor information General
5 AT+VER Check the software version General
6 AT+ECHO , AT+ECHO=1/0
  • Open or close the serial port echo
  • 1 means open, 0 means closed, it is enabled by default
General
7 AT+UART , AT+UART=? , AT+UART=0,115200
  • Query or set UART information, support save to flash, the default baud rate is 921600;
  • Check baud rate returns as + OK: 115200
  • Set baud rate, 0 for temporary setting, 1 for permanent setting, save to flash, load automatically on next boot, return as + OK Write or read user data
General
8 AT+USERDATA , AT+USERDATA=? , AT+USERDATA=10
  • Write or read user data
  • Read out user data and return as + OK: abcdef
  • Write user data, parameters to be written length, the length of the input data to develop
  • Return + OK
General
9 AT+SLEEP , AT+SLEEP=1/0
  • Enable / disable sleep function
  • 1 means enable, 0 means close, the default is 0 do not open
General
10 AT+RESTORE clear information saved in the flash, including serial baud rate and other network information (see follow-up commands) General
11 AT+WSMAC , AT+WSMAC=? , AT+WSMAC=3F-4D-55-DE-FA-1D
  • Query or set the MAC address
  • Query MAC address, return as + ok = 123456789adc
  • Set MAC address, return as + ok
WIFI
12 AT+WSSCAN , AT+WSSCAN=?
  • Scan the current available AP in the air, perform scanning operation
  • View the current scan results, in order to ensure timeliness, back to the scan before the query operation, if there is no scan to a specific AP can be repeated to avoid the problem of incomplete scan
WIFI
13 AT+WSCONN , AT+WSCONN=? , AT+WSCONN=0, "a", "qqqqqqqq"
  • Check the connection status or perform link operations, support the save ssid and password to flash, read and connect if there is connection operation information saved in flash, then report if not saved before
  • View the current connection status, if connected, return the AP name, signal strength and IP address to connect wifi, parameters for the user name, password, you can not enter the password when not encrypted, 0 means not save to flash, 1 means save, write word can Do not enter ssid and other information directly connected
WIFI
14 AT+WSC=0/1
  • To smartcongfig mode to connect,
  • 0 means that the connection is not saved ssid and other information
  • 1 means save
WIFI
15 AT+WSAK=0/1
  • Connect in airkiss mode
  • 0 means that the connection is not saved ssid and other information
  • 1 means save
WIFI
16 AT+WSDISCONN disconnect WIFI
17 AT+WSFIXIP , AT+WSFIXIP=0,1,192.168.1.100,255.255.255.0,192.168.1.1
  • Enable / disable fixed IP address, support saving to flash, this command is valid only when sta is not connected
  • 0 means it is not saved to flash, only this connection takes effect,
  • 1 means FIXIP function is enabled, followed by IP, subnet mask and gateway connection respectively. If FIXIP related setting is found, it is connected according to setting contents. If not, then try to read information from flash, if read failed According to DHCP processing
WIFI
18 AT+WDBG , AT+WDBG=DRV,2 , AT+WDBG=WPA,2 , AT+WDBG=DRVD,1 , AT+WDBG=WPAD,1
  • Adjust the debug level of each module
  • Adjust driver debug level, the level is 0 ~ 3, the default is 0
  • Adjust wpa debug level, level 0 ~ 3, the default is 0
  • Turn on / off driver dump will print out the data transceiver, 1 is open, 0 is off, the default is off
  • Turn on / off WPA dump, will print out some data, 1 is open, 0 is off, the default is off
WIFI
19 AT+WAP , AT+WAP=0,6,a,qqqqqqqq
  • Enable AP, read ssid and other information from the flash, error if read failed
  • Enable AP, 0 means not saving to flash, 1 means saving, rest channel, ssid and password, without password
WIFI
20 AT+WSTOPAP Stop AP, disconnect all existing connections WIFI
21 AT+WAMAC=? Query AP MAC address, there is association between STA and AP MAC, so only STA MAC can be set, the two change synchronously WIFI
22 AT+WASTA View the STAs connected to the AP WIFI
23 AT+WANET , AT+WANET=0,192.168.1.100,255.255.255.0,192.168.1.1,192.168.1.101,192.168.1.120
  • Set the AP's network information, including IP, subnet mask, gateway, and the start and end of DHCP
  • 0 means not saving to flash, 1 means saving, others are IP, subnet mask, gateway and starting and ending of DHCP When AP is set, Read the information, if the read fails according to the default parameters in the code to establish
WIFI
24 AT+NSTART , AT+NSTART=UDP,192.168.1.100,1234,4312
  • The establishment of TCP or UDP connection, the parameters returned to indicate the link number, up to now support four
  •  
  • Establish UDP connection, the parameter is SERVER IP, SERVER port, LOCAL port,
  • If you do not enter the LOCAL port, do not bind the local port, such as return + ok = 0,0 said the first 0
  • AT + NSTART = TCP, 192.168.1.100, 1234 Establish a TCP connection, the parameters for the SERVER IP, SERVER port returns as + ok = 1,
  • 1 means that the first link will not reconnect when the connection is disconnected, it will prompt "+ LINKDOWN = 0",
  • 0 means that the link number will be returned as "+ IPD = link number, data length, server address, server port, data" when receiving the data
TCPUDP
25 AT+NSTOP , AT+NSTOP=0
  • Disconnect the TCP or UDP connection, the parameter is the link number established before
  • Disconnect 0th link and return + ok
TCPUDP
26 AT+NSEND , AT+NSEND=0,10
  • Send data over some TCP or UDP
  • Sends 10 bytes of data via the 0th link, replies + ok after sending
TCPUDP
27 AT+NMODE , AT+NMODE=0
  • Set a link to transparent mode
  • The first 0 links set to transparent mode, all serial data will be sent, all received data will be output to the serial port
TCPUDP
28 AT+NLINK View the current connection, including the connection type, destination address, destination port, and local port (if set) TCPUDP
29 AT+NPING , AT+NPING=192.168.1.100,200,1,32,1
  • Trigger PING operation
  • Start PING operation, the parameters are:
  • Target IP
  • Number of executions
  • Sent time interval (in seconds, optional 1-10 seconds, greater than 10 seconds for 10 seconds, less than 1 second for 1 second);
  • Send packet length (maximum value of 14,600, more than this value by the maximum count).
  • Whether to print echoes (1 for print echo, 0 for echo off). Return value: such as + ok.
TCPUDP
30 AT+NDNS , AT+NDNS=”www.baidu.com” Query the IP address of the domain name TCPUDP, NET-MISC
31 AT+NCFG Query, set, delete automatically restart the connection server settings TCPUDP, NET-MISC
32 AT+BYUPDATE update AT TCPUDP, NET-MISC
33 AT+ZZVER check ZZ cloud version ZZ
34 AT+ZZREG
  • Register online activation device, will automatically connect to the network to get id activation device, operation
  • The AT must ensure that the device is connected to the Internet
ZZ
35 AT+ZZACT Write data offline to activate the device ZZ
36 AT+ZZAUID check device auid ZZ
37 AT+ZZQR check device qr ZZ
38 AT+ZZSTART start zz cloud ZZ
39 AT+ZZSTOP stop ZZ
40 AT+ZZSEND send binary data ZZ
41 AT+ZZSENDEX send hex data ZZ
42 +ZZDAT return the data zz cloud received ZZ
43 AT+ZZFUNC zz cloud expansion services, including recorder, file, http, positioning, sms and other services are used to achieve the second order; ZZ
44 +ZZTIME received the time ZZ
45 +ZZRHC Received RHC command, remote hardware controller, can be used to control the basic hardware resources such as modules ZZ
46 +ZZCHG Billing orders received, including start and stop ZZ
47 AT+MSTART mqtt start connect cmd MQTT
48 AT+MSTOP stop mqtt MQTT
49 AT+MSUB Mqtt subscribe MQTT
50 AT+MUSUB Mqtt unsubscribe MQTT
51 AT+MPUB Mqtt publish MQTT
52 +MDAT received data from mqtt MQTT
53 AT+MCFG Configure automatic connection MQTT server parameters MQTT
54 AT+IORD gpio write Hardware
55 AT+IOWR gpio read Hardware
56 AT+IODIR Set / query GPIO direction Hardware
57 AT+ADC ADC read Hardware
58 AT+VBAT read battery VBAT value Hardware
59 AT+PWM pwm output Hardware
60 AT+SSTART server start TCPUDP
61 AT+SSTOP server stop TCPUDP
62 AT+SSEND send data TCPUDP
63 AT+SMODE enter into data transmission mode TCPUDP
64 AT+SLINK check connection status TCPUDP
65 AT+SCFG Query / set the boot automatically start the server configuration TCPUDP
66 AT+DUVER DUEROS SDK version DuerOS
67 AT+DUSTART DUEROS start DuerOS
68 AT+DUSTOP DUEROS stop DuerOS
69 AT+DUREC start or stop dueros record DuerOS
70 AT+DUVOL set volume DuerOS
71 AT+DUPLAY play music by duores DuerOS
72 AT+DUPAUSE pause and play again DuerOS
73 AT+DUNEXT next DuerOS
74 AT+DUPRE previous DuerOS
75 AT+REP repeat play DuerOS
76 AT+DUMODE data transmission mode DuerOS
77 AT+DUCFG config restart dueros DuerOS

[[category: ]]