Skip to main content

AT Command(Chn)

WIZ550S2E AT 命令集#

This section provides a list of WIZ550S2E AT commands and their functions. Users can input commands and parameters through USART line. Every command starts with “AT.” Any other initial character will cause an error in return. Commands and parameters are all ASCII characters, i.e. when you input 'AT+NSTAT', you should input ASCII characters 'A', 'T', '+', 'N', 'S', 'T', 'A', 'T' and 'Enter Key' which is CR, LF (0x0d, 0x0A).

All commands should be terminated with CR(0x0D), LF(0x0A)

Some parameters are mandatory and others are optional. Parameters must be entered in the order of format column given by the command tables. Although the optional parameter is not used, the comma delimiters must still be included in the command. In most cases, valid commands return the character [S] and invalid inputs return [F]. The possible responses sent from WIZ550S2E to the user are described as Responses. Below are examples of user input. As you can see, WIZ550S2E return “\r\n” back instead of “\r”, which means user (host system) always handle '\r\n' as the only delimiter.

Input by UserAT\r\n (0x61 0x74 0x0d 0x0a)
Output from WIZ550S2E[S]\r\n (0x5b 0x53 0x5d 0x0d 0x0a)

Responses#

Response Format#

[(Type),(Id),(Param1),(Param2),(Param3),(Param4),(Param5),(Param6)]↓(Data)↓
  • (Type): Type of response. It can be one of S, D, F, W, R and V.
  • (Id): Socket Identifier. This is the mandatory in Async mode.
  • (Param1) ~ (Param6): ): These are included in case of commands retrieving module's setting value.
  • ↓: This means 'Enter' key as delimiter and CR, LF(0x0d, 0x0a) are its real value.
  • (Data): When huge data are needed, 'Data' will be followed in case of Type of response, D and R.

Responses are listed below.

ResponseDescription
Success Response[S,(Id),(Param1),(Param2),(Param3),(Param4),(Param5),(Param6)]↓
Command Request Success, outputs with param when it's needed.
Success Dump Response[D,(Id),(Size)]↓(Data)↓
Command Request Success, Outputs large data include 'Enter key' value.
Fail Response[F,(Id),(ErrorCode),(ErrorParam)]↓
Command Request Fail, outputs with param when it's needed.
Wait Response[W,(Id)]↓
Command is started with ID in Async mode.
Data Receive Response[R,(SockId),(ReceivedSize),(SrcIP),(SrcPort)]↓(Data)↓
Outputs the received data.
Event Response[V,(Id),(EventCode)]↓
Event occurred.
\* (Id): 0 - System ID or 0\~n - Socket Number
  • (Size): Byte size of to output data
  • (ErrorCode): Error Code
  • (ErrorParam): Value of description for Error Code
  • (SockId): Socket Identifier of the socket which received data
  • (ReceivedSize): Byte size of received data
  • (SrcIP): Sender's IP address. This is mandatory in case of UDP. In case of TCP this is omitted.
  • (SrcPort): Sender socket's port number. This is mandatory in case of UDP.
  • (EventCode): Indication of which event happened.

Error Code#

General Error Code#

CodeError NameDescription
0ERR_UndefinedUndefined Error
1ERR_WrongOperatorWrong Operator
2ERR_WrongCommandSignWrong Command Sign
3ERR_WrongArgumentsWrong Arguments
4ERR_OurofRangeParameter is out of Range
5ERR_FuncDisabledThis function is disabled
6ERR_NotAllowedNot Allowed
7ERR_CommandBusyCommand Busy
8ERR_CommandTimeoutCommand Timeout

Socket Error Code#

CodeError NameDescription
10ERR_SockNotAvailSocket Not Available
11ERR_SockClosedSocket Closed
12ERR_SockPortNumNotAvailPort Not Available
13ERR_SockNotConnectedNot Connected
14ERR_SockWrongAddrWrong Address
15ERR_SockDataNotAvailableData Not Available

Other Error Code#

CodeError NameDescription
20ERR_NoFreeMemNo Free Memory

Event Code#

Socket Event Code#

CodeSocket Event NameDescription
0EVENT_SockConnectedConnected. Socket transition from Listen state to established state
1EVENT_SockDisconnectedDisconnected. Socket transition from established state to disconnected state
2EVENT_SockClosedClosed. Socket transition to closed state
3EVENT_SockDataRcvdData Received. The corresponding socket received data from its peer

Network Commands#

CommandProp.Input ParameterResponse
AT+NSETNone or ?[S,,S,(IP),(SN),(GW),(DNS)]
:::::::::[S,,D]
:::=S,(IP),(SN),(GW),(DNS)[S]
::::::D[S]
:::-num,Param[S]
AT+NSTATNone or ?[S,,S/D,(IP),(SN),(GW),(DNS)]
AT+NMACNone or ?[S,,(MAC)]
:::=(MAC)[S]
AT+NOPEN=S/C/U,(SrcPort),(DstIP),(DstPort)[W,(SockId)]
[S,(SockId)]
::::::A:::
AT+NCLOSE=(SockId)[W,(SockId)]
[S,(SockId)]
AT+NSEND=(SockId),(size),(DstIP),(DstPort)[W,(SockId)]
[S,(SockId)]
AT+NSOCKNone or ?[D,,(Size)]↓(Data)
:::=(SockId)[S,,S/C/U,(SrcPort),(DstIP),(DstPort)]

AT+NSET

* Format

AT+NSET=<DHCP>,<IP>,<SN>,<GW>
  • Meaning: Network Configuration

\<DHCP>: Static/DHCP

ParameterMeaning
SDHCP Off, Static
DDHCP On, DHCP Client

\<IP>: IP Address (Optional)
\<SN>: Subnet Mask (Optional)
\<GW>: Gateway Address (Optional)

  • Response:
[S]
  • Example 1:
AT+NSET\r\n
AT+NSET?\r\n
  • Meaning: Get Current Network Setting

    Note that \<IP>,\<SN>,\<GW> address of response are not actual addresses, but addresses stored in the memory. So when DHCP is on, they are usually different from actual addresses.

  • Response:
[S,,S,192.168.11.100,255.255.255.0,192.168.11.1,8.8.8.8]
[S,,D]
  • Example 2:

//

AT+NSET-2,192.168.11.110\r\n
  • Meaning: Update Second Parameter
  • Response:

    [S]

AT+NSTAT
  • Format:

    AT+NSTAT

    AT+NSTAT?

  • Meaning: Display Current Network Status
  • Response:
[S,,<DHCP>,<IP>,<SN>,<GW>,<DNS>]
  • Example 1:

    AT+NSTAT\r\n` `AT+NSTAT?\r\n`
  • Meaning: Display Current Network Status

  • Response:

[S,,S,192.168.11.100,255.255.255.0,192.168.11.1,8.8.8.8][S,,D]


AT+NMAC
  • Format:

    AT+NMAC

    AT+NMAC?

  • Meaning: Get MAC Address
  • Response:
[S,,<MAC>]
  • Example 1:

    AT+NMAC=00:08:dc:1d:bb:8b
  • Meaning: Set MAC Address

  • Response:

    [S]
  • Example 2:

    AT+NMAC\r\n` `AT+NMAC?
  • Meaning: Get MAC Address

  • Response:

    [S,,00:08:dc:1d:bb:8a]

AT+NOPEN
  • Format:

    AT+NOPEN=<SockType>,<SrcPort>,<DstIP>,<DstPort>

  • Meaning: Initialize Socket

\<SockType>: Socket Type

ParameterMeaning
STCP Server Socket
CTCP Client Socket
UUDP Socket

\<SrcPort>: Local Port Number
\<DstIP>: Destination IP Address
\<DstPort>: Destination Port Number

  • Response:
[W,(SockId)]
[S,(SockId)]
  • Example 1:

    AT+NOPEN=C,3000,192.168.11.100,3000
  • Meaning: Create Client Socket

  • Response:

    [W,0]
    [S,0]
    [W,0]
    [F,,1]
  • Example 2:

  • AT+NOPEN=S,5000

    • Meaning: Create Server Socket
  • Response:

    [S,,0]

AT+NCLOSE

  • Format:

    AT+NCLOSE=(SockId)

  • Meaning: Close Socket

\<SockId>: Socket ID

  • Response:
[W,(SockId)]
[S,(SockId)]
  • Example 1:

    AT+NCLOSE
  • Meaning: // Close Socket//

  • Response:

    [W,0]
    [S,0]
    [F,,11]

AT+NSEND
  • Format:

    AT+NSEND=<SockId>,<size>,<DstIP>,<DstPort>

  • Meaning: Send Data

\<SockId>: Socket ID

ParameterMeaning
STCP Server Socket
CTCP Client Socket
UUDP Socket

\<SrcPort>: Local Port Number
\<DstIP>: Destination IP Address
\<DstPort>: Destination Port Number

  • Response:
[W,(SockId)]
[S,(SockId)]
  • Example 1:

    `AT+NSEND=0,4\r\n`
    aaaa
  • Meaning: In TCP mode, Destination IP and port are not need.

  • Response:

    [W,0]
    [S,0]

Management Commands#

CommandProp.Input ParameterResponse
ATNone[S]
:::?:::[D,,(Size)]↓(Data)
AT+MSTATNone or ?[S,,(Version)]
AT+MUSARTNone or ?[S,,(BR),(W),(P),(S),(F)]
:::\=(BR),(W),(P),(S),(F)[S]
:::-num,Param[S]
AT+MSAVENone[S]
AT+MRSTNone[S]
:::\=F[S]
AT+MDATANone[S]

AT
  • Format:
    AT
  • Meaning: Terminal Check
  • Response:
[S]

AT+MSTAT
  • Format:

    AT+MSTAT

    AT+MSTAT?

  • Meaning: Get Current Version
  • Response:
[S,,<Version>]

`AT+MUSART`
  • Format:

    AT+MUSART

  • Meaning: Serial Interface Configuration

    br>: Baud rate

ParameterMeaning
300300bps
600600bps
12001200bps
24002400bps
48004800bps
96009600bps
1920019200bps
3840038400bps
5760057600bps
115200115200bps
230400230400bps

Word length

ParameterMeaning
77 bits
88 bits

Parity bit

ParameterMeaning
NNONE
OODD
EEVEN

Stop bit

ParameterMeaning
11 bits
22 bits

Flow Control

ParameterMeaning
0NONE
1RTS/CTS
2RS422
3RS485
  • Response:
[S,,<BR>,( <W>, <P>, <S> ) <F>]

  • Example1:

    AT+MUSART

    AT+MUSART?

  • Meaning: Get Serial Interface Information
  • Response:
[S,,<BR>,( <W>, <P>, <S> ) <F>]
  • Example2:
`AT+MUSART=,,E,,0`
  • Meaning: Set Serial Interface Information
  • Response:
`[S]`

`AT+MDATA`
  • Format:

    AT+MDATA

  • Meaning: Terminal Check
  • Response:

    `[S]`

Function Commands#

CommandProp.Input ParameterInput Resp.Query Response
AT+FDNSNone[D,,(Size)]↓(Data)

`AT+FDNS`
  • Format:

    AT+FDNS

  • Meaning: Do DNS Query and then return its result. Using Domain and DNS Server IP what has set via Configuration Tool.
  • Response:
[D,,13]
DNS Timeout
[D,,17]
173.194.126.180