AT Command(Eng)
WIZ550S2E AT Command Set
This section provides a list of WIZ550S2E AT commands and their functions. Users can input commands and parameters through USART line.
Enter/Exit Command Mode
The command mode is entered by sending the "Trigger Code" (default 2B 2B 2B in Hex) to the serial port of the WIZ550S2E module. This three byte Trigger Code need to be send without any character before and after the three byte = also without CR or LF for 500ms time.
The command mode is closed by sending "AT+MDATA/r/n" The Trigger Code can be en/disabled and also changed with the config tool.
The three byte Trigger Code need to be isolated = without CR(0x0D), LF(0x0A)
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 User | AT\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.
Response | Description |
---|---|
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 the 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 & TCP Client. In case of TCP Server this is omitted.
-
(SrcPort): Sender socket's port number. This is mandatory in case of UDP & TCP Client.In case of TCP Server this is omitted.
-
(EventCode): Indication of which event happened.
Error Code
General Error Code
Code | Error Name | Description |
---|---|---|
0 | ERR_Undefined | Undefined Error |
1 | ERR_WrongOperator | Wrong Operator |
2 | ERR_WrongCommandSign | Wrong Command Sign |
3 | ERR_WrongArguments | Wrong Arguments |
4 | ERR_OurofRange | Parameter is out of Range |
5 | ERR_FuncDisabled | This function is disabled |
6 | ERR_NotAllowed | Not Allowed |
7 | ERR_CommandBusy | Command Busy |
8 | ERR_CommandTimeout | Command Timeout |
Socket Error Code
Code | Error Name | Description |
---|---|---|
10 | ERR_SockNotAvail | Socket Not Available |
11 | ERR_SockClosed | Socket Closed |
12 | ERR_SockPortNumNotAvail | Port Not Available |
13 | ERR_SockNotConnected | Not Connected |
14 | ERR_SockWrongAddr | Wrong Address |
15 | ERR_SockDataNotAvailable | Data Not Available |
Other Error Code
Code | Error Name | Description |
---|---|---|
20 | ERR_NoFreeMem | No Free Memory |