WIZ-DTU AT command
AT command will use different color to represent each kind of information.
Color | Meaning |
---|---|
Bold | Default value of the AT command |
Blue | Parameters inputs for the AT command |
Green | Return value of the AT command |
Red | Special note of the AT command or Error message |
Overview of AT Command
The AT command supported by WIZ-DTU serial to Ethernet converters is a standard interface that is not case sensitive and always starts with "AT" and ends with "\r\n". The format of its commands, return values, and parameters is fixed. Generally speaking, AT commands have the following formats:
1、No parameter command
Format: AT+\r\n
Explanation: The command is followed by no parameters or symbols.
Example:
Command: AT+EXIT\r\n
Response: OK\r\n
2、Query command
Format: AT+"command"?\r\n
Description: Used to query the current configuration value of a parameter.
Example:
Command: AT+ECHO?\r\n
Response: [ECHO] Value is: 1\r\nOK\r\n
3、Command with parameters
Format: AT+"command"="parameter"\r\n
Explanation: It is the most commonly used format for setting a certain parameter (except for the DEFAULT command and RESET).
Example:
Command: AT+ECHO=1\r\n
Response: [ECHO] Value is: 1\r\n OK\r\n
AT command Return values
According to the different AT commands input by the user, WIZ-DTU will reply with the execution results of the commands, as shown in the table below.
Response type | Response | Description |
---|---|---|
Error message | Command Invalid\r\nERROR\r\n | Command error |
Error Info | Command parameter error or mismatch with current working mode | |
Correct information | OK\r\n | Parameter free command for correct configuration |
[Command] Value is: value\r\nOK\r\n | Correct configuration of query commands and parameterized commands |
Enter AT command mode
There are two operating modes for WIZ-DTU serial to Ethernet converters: AT command mode and data transmission mode. In AT command mode, users can use serial tools or configure various parameters of the converter through their MCU, and also support data transmission under AT commands.
Note: If a TCP connection is established before entering AT command mode, the connection will be closed when entering AT command mode.When WIZ-DTU is in AT command mode, input the terminal detection command "AT\r\n" to its serial port. If the converter correctly receives "AT\r\n", it will reply with "OK\r\n".
When WIZ-DTU is in data transmission mode, any AT command input to the serial port is invalid. At this point, input "+++" to its serial port, and WIZ-DTU will switch to AT command mode.
Input rule for "+++": Three "+" must be sent continuously to the serial port at once, and there must be no other characters within 1 second before and after the "+++" in order for WIZ-DTU to respond correctly and switch to AT command mode.
Note: The default operating mode of WIZ-DTU at the factory is AT command mode.AT command list
WIZ-DTU serial to Ethernet converters support serial AT command configuration parameters and also support data transmission in AT command mode. Therefore, AT commands can be roughly divided into two categories: AT configuration commands and AT data transmission commands.
All WIZSE products are using the same AT command Structure. Due to different solutions, it may have more than 1 serial channel for serial setup and communication.
The following are the information for WIZ-DTU:
WIZ-DTU
Number of Channels | Serial Type | Format | Name of Channel | Example |
---|---|---|---|---|
2 | RS232 | C[CH] | C1 | AT+C1_PORT? |
RS485 | C[CH] | C2 | AT+C2_PORT? |
Command name | Function | Attribute | Max length | Parameters |
---|---|---|---|---|
AT | Terminal detection | R | - | - |
ECHO | Feedback | RW | 1 | 0: Turn off echo display 1: Open echo (default) |
DEBUGMSGEN | Debug information | RW | 1 | 0: Close debugging information 1: Enable debugging information (default) |
NAME | Equipment name | RW | 15 | It must be a number, letter, or a combination of both |
PASS | converter password | RW | 15 | Must be a number, letter, or a combination of both. Default: admin |
DEFAULT | Restore factory settings | W | 15 | When the parameter is "converter password", factory Reset |
RESET | Save configuration and restart converter | W | 15 | When the parameter is' converter password ', restart the converter |
EXIT | Save configuration and exit AT command mode | W | - | - |
SAVE | Save Configuration | W | - | - |
START_MODE | Next time starting the running mode | RW | 1 | 0: AT command mode (default) 1: Data transparent transmission mode |
C[CH]_OP | Working mode | RW | 2 | 0: TCP Server(default) 1: TCP Client 2: UDP 16: Modbus RTU-TCP Server 17: Modbus RTU-TCP Client 18: Modbus RTU-UDP 32: Modbus ASCII-TCP Server 33: Modbus ASCII-TCP Client 34: Modbus ASCII-UDP |
IP_MODE | How to obtain IP address | RW | 1 | 0: Static retrieval (default) 1: DHCP acquisition |
IP | converter IP address | RW | 15 | Default :192.168.1.88 |
MASK | converter subnet mask | RW | 15 | Default :255.255.255.0 |
GATEWAY | converter gateway | RW | 15 | Default :192.168.1.1 |
DNS | DNS server address | RW | 15 | Default :114.114.114.114 |
C[CH]_PORT | Local port number | RW | 5 | 1 ~ 65535; Default: 5000 |
C[CH]_BIND | Bind local port number | RW | 1 | Valid for TCP client 0: Do not bind local port number (Default) 1: Bind local port number |
C[CH]_DNSEN | DNS function | RW | 1 | 0: Disable DNS function (Default) 1: Enable DNS function |
C[CH]_CLI_IP1 | Remote host IP address | RW | 15 | Default: 192.168.1.99 |
C[CH]_CLI_PP1 | Remote host port number | RW | 5 | 1~65535; Default: 5000 |
C[CH]_DOMAIN | Remote host domain name | RW | 32 | Default: www.w5500.com |
C[CH]_RECONTIME | Reconnect time | RW | 5 | Valid for TCP client The value range is: 0~60000 Unit: ms Default: 0 (reconnect immediately) |
NETBIOS | NetBIOS functionality | RW | 1 | 0: Disable NetBIOS function (default) 1: Enable NetBIOS functionality |
COM[CH] | Serial port parameters | RW | 10 | Default: 9,1,0,1,0 |
C[CH]_BAUD | Baud rate | RW | 2 | 0: 1200; 1: 2400; 2: 4800 3: 9600; 4: 14400; 5: 19200 6: 38400; 7: 56000; 8: 57600 9: 115200 (default); 10: 128000 11: 234000; 12: 256000; 13: 468000 14: 921600; 15: 1152000 |
C[CH]_DATAB | Data bits | RW | 1 | 0:7 digits 1: 8-bit (default) |
C[CH]_STOPB | stop bit | RW | 1 | 0: 0.5 1: 1 (default) 2: 1.5 3: 2 |
C[CH]_PARITY | check bit | RW | 1 | 0: No verification (default) 1: Odd verification 2: Even verification |
C[CH]_SER_C | Serial port flow control | RW | 1 | 0: No flow control (default) |
C[CH]_BUF_CLS | Clear serial port buffer | RW | 1 | Effective during TCP 0: Do not clear serial port buffer after connection (default) 1: Clear the serial port buffer after connection |
C[CH]_SER_LEN | packet length | RW | 4 | The value range is: 0~2048 bytes Default: 0 (no packet) |
C[CH]_SER_T | Serial port frame interval | RW | 5 | The value range is: 0~60000 Unit: ms Default: 0 (no packet) |
C[CH]_IT | Timeout disconnect time | RW | 5 | Effective during TCP The value range is: 0~60000 Unit: ms Default: 0 (disable this feature) |
C[CH]_TCPAT | Heartbeat detection time | RW | 3 | Effective during TCP The value range is: 0~255 Unit: 5s Default: 0 (disable this feature) |
C[CH]_LINK_P | Connection password verification | RW | 1 | Valid on TCP Server 0: Do not verify password after TCP connection is established (default) 1: Verify password after establishing TCP connection |
C[CH]_LINK_T | Connection establishment conditions | RW | 1 | Valid for TCP client 0: Establish connection immediately after power on (default) 1: Establish a connection after receiving data through the serial port |
C[CH]_LINK_M | Send a message after connecting | RW | 1 | Valid in TCP mode 0: No message sent after connection establishment (default) 1: After establishing the connection, send the converter name 2: Send converter MAC address after connection establishment 3: Send converter IP address after connection establishment |
C[CH]_SEND_NUM | The number of bytes sent by the serial port | R | - | Display range is 0 ~ 4294967295 |
C[CH]_RCV_NUM | Serial port received byte count | R | - | Display range is 0 ~ 4294967295 |
C[CH]_NETSEND | Number of bytes sent by the network port | R | - | Display range is 0 ~ 4294967295 |
C[CH]_NETRCV | Number of bytes received by the network port | R | - | Display range is 0 ~ 4294967295 |
PRE | List of default and current values | R | - | - |
LIST | All command lists | R | - | - |
RUNTIME | Equipment operation time | R | - | - |
VER | converter firmware version number | R | - | - |
MAC | converter MAC address | R | - | - |
SN | Equipment serial number | R | - | - |
TYPE | converter Type | R | - | - |
WEB_PORT | Web port number | RW | 5 | 1 ~ 65535;Default: 80 |
LINK | PHY connection status | R | - | 0: PHY not connected 1: PHY connected |
C[CH]_LISTEN | Establish TCP listening | W | - | - |
C[CH]_CONNECT | Apply for TCP connection | W | - | - |
C[CH]_TCP_STATUS | TCP connection status | R | - | 0: TCP not connected 1: TCP Connected |
C[CH]_UDP | Establish UDP communication | W | - | - |
C[CH]_SEND | The number of bytes of data to be sent | W | 4 | Range: 0~2048 Default value: 0 (any length) |
C[CH]_RLEN | Number of bytes of data to be received | R | - | - |
C[CH]_RCV | Receive Data | W | 4 | Range: 0~2048 Default value: 0 (any length) |
C[CH]_CLEAR | Clear the network port receiving cache | W | - | - |
C[CH]_DISCON | Turn off TCP/UDP | W | - | - |
AT Control commands
AT(Terminal check)
Command format | Parameters | Function Description |
---|---|---|
AT | Nil | Check the terminal |
Response | OK\r\n | |
Example | Command: AT\r\n | |
Response: OK\r\n |
Description: In AT command mode, it only provides response check to ensure it is in AT command mode.
ECHO(Enable or disable echoing)
Command format | Parameters | Function Description |
---|---|---|
AT+ECHO? | Nil | Query current value |
AT+ECHO= Parameters | 0: Disable the echo function | Set new value |
1: Enable echo function (Default) | ||
Response | [ECHO] Value is: AT+ECHO= Value\r\n OK \r\n | |
Example | Command: AT+ECHO?\r\n | |
Response: [ECHO] Value is: 1\r\n OK\r\n |
Description: The echo function refers to returning the data input from the serial channel as it is, and only exists in AT command mode. Enabling the echo function can help users configure converters more conveniently when using serial software. However, when configuring converters using embedded converters such as microcontrollers, enabling the echo function can cause trouble. It is recommended to disable it at this time.
DEBUGMSGEN(Debug message)
Command format | Parameters | Function Description |
---|---|---|
AT+ DEBUGMSGEN? | Nil | Query current value |
AT+DEBUGMSGEN=Parameters | 0: Close debugging information | Set new value |
1: Enable debugging information (Default) | ||
Response | [DEBUGMSGEN] Value is: Value\r\n OK \r\n | |
Example | Command: AT+DEBUGMSGEN=1\r\n | |
Response: [DEBUGMSGEN] Value is: 1\r\n OK\r\n |
Description: This command is used to configure whether the converter should enable debugging information. Debugging information includes basic converter information and converter status change information, which will be output through the serial channel at startup for easy user viewing. If the user does not need this information, the debugging information output can be turned off through this command.
NAME(converter name)
Command format | Parameters | Function Description |
---|---|---|
AT+NAME? | Nil | Query current value |
AT+NAME =Parameters | The total length is 15 characters, with the first character being a letter and the remaining 14 characters being any combination of letters, numbers, symbols' - 'or' _ '. | Set new value |
Default: converter P/N | ||
Response | NAME] Value is: Value\r\nOK\r\n | |
Example | Command: AT+NAME=User1\r\n | |
Response: [NAME] Value is: User1\r\nOK\r\n |
Description: Users can customize converter names through this command.
Note: This command can be used in conjunction with the NetBIOS function. If the NetBIOS function is enabled, users can access the converter through the converter name in the browser. Please refer to the "AT+NETBIOS" command.PASS(converter password)
Command format | Parameters | Function Description |
---|---|---|
AT+PASS? | Nil | Query current value |
AT+PASS=Parameters | The converter password must be a combination of numbers, letters, or both, and cannot be empty. It is case sensitive and can be up to 15 bytes long | Set new value |
Default: admin | ||
Response | [PASS] Value is:Value\r\nOK\r\n | |
Example | Command: AT+PASS=Admin1\r\n | |
Response: [PASS] Value is: Admin1\r\nOK\r\n |
Description: The converter password is used for restoring factory settings, verifying connection passwords, verifying web login passwords, and saving configurations and restarting the converter.
Note:Factory reset function:
If you need to use the AT command to restore factory settings, you must enter the correct converter password. Please refer to the "DEFAULT" command for detailed functions.
Connection password verification function:
In order to improve communication security, WIZ-DTU converters provide a "connection password verification" function. When the converter communicates with the client as a TCP Server, if the "connection password verification" function is turned on, the client needs to enter the converter password through the network port after establishing a connection with the converter. If the password is correct, communication can begin; If the password is incorrect, you will be prompted to re-enter the correct password. For detailed functions, please refer to the "C 1 _LINK-P" command.
Web login password verification function:
If you need to log in to the converter configuration webpage, you must enter the correct converter password on the login verification page.
Save configuration and restart converter functionality:
To save the current configuration and restart the converter, the correct converter password must be entered to reset. After using this command, all sockets will be automatically closed. Please refer to the "RESET" command for detailed functions.
DEFAULT(Reset to factory default)
Command format | Parameters | Function Description |
---|---|---|
AT+DEFAULT=Parameters | converter password | Set new value |
default: admin | ||
Response | OK\r\n | |
Example | Command: AT+DEFAULT=admin\r\n | |
Response: OK\r\n |
Description: The converter password must be completely correct in order to restore factory settings. The converter password can be queried and set through the "PASS" command.
RESET(Save and restart the converter)
Command format | Parameters | Function Description |
---|---|---|
AT+RESET=Parameters | converter password | Set new value |
Default: admin | ||
Response | OK\r\n | |
Example | Command: AT+RESET=admin\r\n | |
Response: OK\r\n |
Description:
1 Save the current configuration information;
2 Restart the converter to make the configuration information take effect;
3 When users need to directly enter data transmission mode during the next power on, they can configure the parameter value of the "AT+START-MODE=1\r\n" command to be 1, and then configure the "RESET" command;
4 The converter password can be queried and set through the "PASS" command.
EXIT(Save and exit command mode)
Command format | Parameters | Function Description |
---|---|---|
AT+EXIT | Nil | Execute immediately |
Response | OK\r\n | |
Example | Command: AT+EXIT\r\n | |
Response: OK\r\n |
Description:
1 Save the current configuration information
2 Make the configuration information effective
3 Exit AT command mode and enter data transmission mode
SAVE(Save settings)
Command format | Parameters | Function Description |
---|---|---|
AT+SAVE | Nil | Execute immediately |
Response | OK\r\n | |
Example | Command: AT+SAVE\r\n | |
Response: OK\r\n |
Description:
1 Save the current configuration information
2 Make the configuration information effective
Converter information configuration command
START_MODE(Start mode)
Command format | Parameters | Function Description |
---|---|---|
AT+START_MODE? | Nil | Query current value |
AT+START_MODE=Parameters | 0: AT command mode (default) | Set new value |
1: Data transparent transmission mode | ||
Response | [START_MODE] Value is: Value\r\nOK\r\n | |
Example | Command: AT+START_MODE=1\r\n | |
Response: [START_MODE] Value is: 1\r\nOK\r\n |
Description: This command configures the running mode for the next startup. When users need to directly enter data transmission mode during the next power on, they can configure the parameter value of the "START_MODE" command to be 1, and then configure the "RESET" command.
C[CH]_OP(Operating mode)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_OP? | Nil | Query current value |
AT+C[CH]_OP=Parameters | 0: TCP Server(default) 1: TCP Client 2: UDP | Set new value |
16: Modbus RTU-TCP Server 17: Modbus RTU-TCP Client 18: Modbus RTU-UDP | ||
32: Modbus ASCII-TCP Server 33: Modbus ASCII-TCP Client 34: Modbus ASCII-UDP | ||
Response | [C[CH]_OP] Value is:Value \r\nOK\r\n | |
Example | Command: AT+C1_OP=1\r\n | |
Response: [C1_OP] Value is: 1\r\nOK\r\n |
Description: When transmitting data in AT command mode, if you need to use this command to modify the operation mode, you need to first call the "DISCON" command to turn off TCP/UDP.
IP_MODE(IP configuration mode)
Command format | Parameters | Function Description |
---|---|---|
AT+IP_MODE? | Nil | Query current value |
AT+IP_MODE=Parameters | 0: Static retrieval (default) | Set new value |
1: DHCP acquisition | ||
Response | [IP_MODE] Value is: Value\r\nOK\r\n | |
Example | Command: AT+IP_MODE=1\r\n | |
Response: [IP_MODE] Value is: 1\r\nOK\r\n |
Description: When selecting the static retrieval method, users need to set their own IP address, gateway, subnet mask, DNS server address, etc., or they can choose the default settings; When selecting DHCP mode, WIZ-DTU will dynamically obtain IP information through DHCP servers in the local area network.
IP(IP address)
Command format | Parameters | Function Description |
---|---|---|
AT+IP? | Nil | Query current value |
AT+IP=Parameters | Default: 192.168.1.88 | Set new value |
Response | [IP] Value is: Value\r\nOK\r\n | |
Example | Command: AT+IP=192.168.1.88\r\n | |
Response: [IP] Value is: 1\r\nOK\r\n |
Description: The IP address is represented in IPv4 standard format, such as 192.168.1.88; Its maximum length is 15 bytes, and the range of values for each decimal number is from 0 to 255. This setting only takes effect when the IP configuration mode (IP_MODE) is set to 'Static IP Mode'.
MASK(Subnet mask)
Command format | Parameters | Function Description |
---|---|---|
AT+MASK? | Nil | Query current value |
AT+MASK=Parameters | Default: 255.255.255.0 | Set new value |
Response | [MASK] Value is: Value\r\nOK\r\n | |
Example | Command: AT+MASK=255.255.255.0\r\n | |
Response: [MASK] Value is: 255.255.255.0\r\nOK\r\n |
Description: The subnet mask is represented in IPv4 standard format, such as 255.255.255.0, with a maximum length of 15 bytes. This setting only takes effect when the IP configuration mode (IP_MODE) is set to 'Static IP Mode'.
GATEWAY(Gateway)
Command format | Parameters | Function Description |
---|---|---|
AT+GATEWAY? | Nil | Query current value |
AT+ GATEWAY =Parameters | Default: 192.168.1.1 | Set new value |
Response | [GATEWAY] Value is: Value\r\nOK\r\n | |
Example | Command: AT+GATEWAY=192.168.1.1\r\n | |
Response: [GATEWAY] Value is: 192.168.1.1\r\nOK\r\n |
Description: The gateway IP address is represented in IPv4 standard format, such as 192.168.1.1, with a maximum length of 15 bytes. This setting only takes effect when the IP configuration mode (IP_MODE) is in 'Static IP Mode'.
DNS(DNS server address)
Command format | Parameters | Function Description |
---|---|---|
AT+DNS? | Nil | Query current value |
AT+DNS=Parameters | Default: 114.114.114.114 | Set new value |
Response | [DNS] Value is: Value\r\nOK\r\n | |
Example | Command: AT+DNS=114.114.114.114\r\n | |
Response: [DNS] Value is: 114.114.114.114\r\nOK\r\n |
Description: The DNS server address is represented in IPv4 standard format, such as 114.114.114.114, with a maximum length of 15 bytes. This configuration does not accept address inputs ending in ". 0" or ". 255", for example: xxx.xxx.xxx.0 or xxx.xxx.xxx.255.
C[CH]_PORT(Local port number)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_PORT? | Nil | Query current value |
AT+C[CH]_PORT=Parameters | Range: 1~65535, Default: 5000 | Set new value |
Response | [C[CH]_PORT]Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_PORT=5000\r\n | |
Response: [C1_PORT] Value is: 5000\r\nOK\r\n |
Description: This command is used to configure the local port number. The converter operates in TCP Server and UDP mode with the corresponding number of channels, and communicates with the user converter through this port.
Note: Some protocols in the Ethernet protocol have default port numbers, which should be avoided. The default occupied port numbers are shown in the appendix.
C[CH]_BIND(Local port binding)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_BIND? | Nil | Query current value |
AT+C[CH]_BIND=Parameters | 0: Do not bind local port number (default) | Set new value |
1: Bind local port number | ||
Response | [C[CH]_BIND] Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_BIND=1\r\n | |
Response: [C1_BIND] Value is: 1\r\nOK\r\n |
Description: When the converter operates in TCP Client mode on the corresponding serial channel, after binding the port number, WIZ-DTU will always use the local port number configured by the "C[CH]_PORT" command.
C[CH]_DNSEN(DNS enable)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_DNSEN? | Nil | Query current value |
AT+C[CH]_DNSEN=Parameters | 0: Disable DNS function (default) | Set new value |
1: Enable DNS function | ||
Response | [C[CH]_DNSEN] Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_DNSEN=1\r\n | |
Response: [C1_DNSEN] Value is: 1\r\nOK\r\n |
Description: This setting takes effect only when the converter operates in TCP Client or UDP mode on the serial channel. After enabling DNS functionality, WIZ-DTU can access remote hosts using domain names. WIZ-DTU performs a DNS query upon each power-up.
Note: 1 If enabled and "C[CH]_DOMAIN" is set, the "C[CH]_CLI_IP1" command becomes invalid. The converter communicates with the host defined by "C[CH]_DOMAIN"; 2 If disabled and "C[CH]_CLI_IP1" is set, the "C[CH]_DOMAIN" command becomes invalid. The converter communicates with the IP defined by "C[CH]_CLI_IP1"; 3 To use DNS functionality, the converter IP information must be configured correctly. It is recommended to configure the converter in DHCP mode.C[CH]_CLI_IP1(Remote host IP address)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_CLI_IP1? | Nil | Query current value |
AT+C[CH]_CLI_IP1=Parameters | Default: 192.168.1.99 | Set new value |
Response | [C[CH]_CLI_IP1] Value is: Valuer\nOK\r\n | |
Example | Command: AT+C1_CLI_IP1=192.168.1.99\r\n | |
Response: [C1_CLI_IP1] Value is: 192.168.1.99\r\nOK\r\n |
Description: This command is only effective in TCP Client or UDP mode, used to configure the remote IP address for the corresponding serial channel of WIZ-DTU. The IP address must comply with IPv4 format, such as 192.168.1.99, as defined in the "IP" command.
Note: If the parameter value of the "DNSEN" command is 0, the parameters configured by the command are valid.C[CH]_CLI_PP1(Remote host port number)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_CLI_PP1? | Nil | Query current value |
AT+C[CH]_CLI_PP1=Parameters | Range: 1~65535, default: 5000 | Set new value |
Response | [C[CH]_CLI_PP1] Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_CLI_PP1=5000\r\n | |
Response: [C1_CLI_PP1] Value is: 5000\r\nOK\r\n |
Description: The converter operates in TCP Client and UDP modes with the corresponding number of channels.
Note: Some protocols in the Ethernet protocol have default port numbers, which should be avoided. The default occupied port numbers are shown in the appendix.
C[CH]_DOMAIN((Remote host name)
Command format | Parameters | Function Description |
---|---|---|
AT+DOMAIN? | Nil | Query current value |
AT+C[CH]_DOMAIN=Parameters | Default: www.w5500.com The maximum length is 32 characters | Set new value |
Response | [DOMAIN] Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_DOMAIN=www.w5500.com\r\n | |
Response: [C1_DOMAIN] Value is: www.w5500.com\r\nOK\r\n |
Description: This command configures the remote host's domain name. The setting takes effect when the corresponding converter channels operate in TCP Client or UDP mode.
Note: The command takes effect only when the "DNSEN" command's parameter value is set to 1.C[CH]_RECONTIME(Reconnection interval)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_RECONTIME? | Nil | Query current value |
AT+C[CH]_RECONTIME=Parameters | Default: 0 (immediate reconnection), value range is 0 to 60000, unit: ms | Set new value |
Response | [C[CH]_RECONTIME] Value is: Value\r\nOK\r\n | |
Example | Command: AT+C1_RECONTIME=1000\r\n | |
Response: [C1_RECONTIME] Value is: 1000\r\nOK\r\n |
Description: The number of channels corresponding to the converter is valid when running in TCP Client and transparent mode. This command sets the time interval for the next connection request between WIZ-DTU and the remote host after the TCP connection is disconnected.
NETBIOS(NetBIOS)
Command format | Parameters | Function Description |
---|---|---|
AT+NETBIOS? | Nil | Query current value |
AT+NETBIOS=Parameters | 0: Disable NetBIOS function (default) | Set new value |
1: Enable NetBIOS functionality | ||
Response | [NETBIOS] Value is:Value\r\nOK\r\n | |
Example | Command: AT+NETBIOS=1\r\n | |
Response: [NETBIOS] Value is: 1\r\nOK\r\n |
Description: The NetBIOS protocol can provide converter naming services within a local area network. After enabling the NetBIOS function, users can directly access WIZ-DTU's built-in web page by entering "http:// converter name" in the browser address bar. The converter name is configured using the "NAME" command.
Serial port information configuration command
COM[CH] (Serial parameters)
Command format | Parameters | Function Description |
---|---|---|
AT+COM[CH]? | Nil | Query current value |
AT+COM[CH]=par1,par2, par3,par4,par5 | par1: Baud rate parameter, refer to the "C[CH]_BAUD" command | Set new value |
par2: Data bit parameters, refer to the "C[CH]_DATAB" command | ||
par3: Parity bit parameter, refer to the "C[CH]_PARITY" command | ||
par4: Stop bit parameter, refer to the "C[CH]_STOPB" command | ||
par5: Serial port flow control parameters, refer to the "C[CH]_SER_C" command | ||
Response | [COM1] Value is: value1,value2,value3,value4,value5\r\nOK\r\n | |
Explain: Value1: Baud rate parameter value | ||
Value2: Data bit parameter value | ||
Value3: Parity bit parameter value | ||
Value4: Stop bit parameter value | ||
Value5: Serial port flow control parameter values | ||
Example | Command: AT+COM1=9,1,0,1,0\r\n | |
Response: [COM1] Value is: 9,1,0,1,0\r\nOK\r\n |
Description: This command is used to configure or query 5 commonly used parameters of the related serial channel at once, or it can be configured or queried separately with the corresponding command.
C[CH]_BAUD(Baud Rate)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_BAUD? | Nil | Query current value |
AT+C[CH]_BAUD=parameter | 0:1200; 1:2400; 2:4800 3:9600; 4:14400; 5:19200 6:38400; 7: 56000; 8:57600 9:115200 (default); 10:128000 11:234000; 12:256000; 13: 468000 14:921600; 15:1152000 | Set new value |
Response | [C[CH]_BAUD] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_BAUD=9\r\n | |
Response: [C1_BAUD] Value is: 9\r\nOK\r\n |
Description: This command is used to configure or query the baud rate of the related serial channel.
C[CH]_DATAB(Data bit)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_DATAB? | Nil | Query current value |
AT+C[CH]_DATAB=parameter | 0:7bit 1:8bit (default) | Set new value |
Response | [C[CH]_DATAB] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_DATAB=1\r\n | |
Response: [C1_DATAB] Value is: 1\r\nOK\r\n |
Description: This command is used to configure or query the data bits of the related serial channel.
C[CH]_STOPB(Stop bit)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_STOPB? | Nil | Query current value |
AT+C[CH]_STOPB=parameter | 0:0.5 1:1 (default) 2:1.5 3:2 | Set new value |
Response | [C[CH]_STOPB] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_STOPB=1\r\n | |
Response: [C1_STOPB] Value is: 1\r\nOK\r\n |
Description: This command is used to configure or query the stop bit of the related serial channel.
C[CH]_PARITY(Parity bit)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_PARITY? | Nil | Query current value |
AT+C[CH]_PARITY=parameter | 0:Nil (default) 1:Odd 2:Even | Set new value |
Response | [C[CH]_PARITY] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_PARITY=0\r\n | |
Response: [C1_PARITY] Value is: 0\r\nOK\r\n |
Description: This command is used to configure or query the parity of the related serial channel.
C[CH]_SER_C(serial port flow control)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_SER_C? | Nil | Query current value |
AT+C[CH]_SER_C =parameter | 0: Disable flow control (default) | Set new value |
Response | [C[CH]_SER_C] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_SER_C=0\r\n | |
Response: [C1_SER_C] Value is: 0\r\nOK\r\n |
Description: This command is used to configure or query the serial channel flow control of the related serial channel.
C[CH]_BUF_CLS(Clear Buffer if Connected)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_BUF_CLS? | Nil | Query current value |
AT+C[CH]_BUF_CLS=parameter | 0: Do not clear the serial port buffer after establishing a connection (default) | Set new value |
1: Clear the serial port buffer after establishing a connection | ||
Response | [C[CH]_BUF_CLS] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_BUF_CLS=1\r\n | |
Response: [C1_BUF_CLS] Value is: 1\r\nOK\r\n |
Description: The converter is effective when running in TCP mode and data transparent mode. If the connection suddenly disconnects during data exchange, there may be some data in the serial buffer that has not been sent. This command can be used to determine whether to send this data after the connection is reestablished.
C[CH]_SER_LEN(Serial packaging Length)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_SER_LEN? | Nil | Query current value |
AT+C[CH]_SER_LEN=parameter | The value range is: 0~2048 bytes, default: 0 (not specified Package) | Set new value |
Response | [C[CH]_SER_LEN] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_SER_LEN=10\r\n | |
Response: [C1_SER_LEN] Value is: 10\r\nOK\r\n |
Description: This command sets the package length for each data transmission.
C[CH]_SER_T(Serial data packing Nagle wait time)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_SER_T? | Nil | Query current value |
AT+C[CH]_SER_T=parameter | Value range: 0~60000, default: 0 (not subcontracted), unit: ms | Set new value |
Response | [C[CH]_SER_T] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_SER_T=1000\r\n | |
Response: [C1_SER_T] Value is: 1000\r\nOK\r\n |
Description: This command sets the serial waiting time. After the waiting time passes, it gathers all the data and transmit in one data package.
C[CH]_IT(Inactivity timeout)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_IT? | Nil | Query current value |
AT+C[CH]_IT=parameter | The time interval for timeout disconnection, with a value range of: 0~60000, unit: ms, default: 0 (disable this function) | Set new value |
Response | [C[CH]_IT] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_IT=1000\r\n | |
Response: [C1_IT] Value is: 1000\r\nOK\r\n |
Description: The command is valid in TCP mode and data transparent mode. When the converter operates in TCP mode, whether as a server or client, there may be situations where the other party has disconnected (forced disconnection or network failure), and the converter is not aware of the disconnection message and continues to maintain this invalid connection. There will be an error where data cannot be delivered when either party initiates communication.
By setting this parameter, it disconnects the TCP connection when the serial or Ethernet interface does not receive new data within a continuous timeout period during communication. When the value is set to 0, it means disable this function.
C[CH]_TCPAT(TCP keepalive interval)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_TCPAT? | Nil | Query current value |
AT+C[CH]_TCPAT=parameter | Value range: 0~255, default: 0 (disable this function), unit: 5s | Set new value |
Response | [C[CH]_TCPAT] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_TCPAT=1\r\n | |
Response: [C1_TCPAT] Value is: 1\r\nOK\r\n |
Description: The converter is effective when running in TCP mode and data transparent mode. When using TCP protocol for communication, converter will send a "heartbeat detection packet" to the other party at a fixed time period to test whether the connection exists after receiving or sending data communication. If no response is received after sending the 'heartbeat detection packet', the converter will automatically disconnect.
C[CH]_LINK_P(TCP password authentication)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_LINK_P? | Nil | Query current value |
AT+C[CH]_LINK_P=parameter | 0: Do not verify password after TCP connection is established (default) | Set new value |
1: Verify password after establishing TCP connection | ||
Response | [C[CH]_LINK_P] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_LINK_P=1\r\n | |
Response: [C1_LINK_P] Value is: 1\r\nOK\r\n |
Description: The converter's serial channel is valid when running in TCP Server mode and data transparent mode. In order to improve communication security, the converter will provide a "Connection password verification" function. When the converter communicates with the client as a TCP Server and the "Connection Password Verification" function is turned on, the client needs to send the converter password as the first packet of data after establishing a connection with the converter. If the password is correct, communication can begin; If the password is incorrect, you will be prompted to re-enter the correct password. The converter password can be queried and set through the "PASS" command.
C[CH]_LINK_T(Connection Condition)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_LINK_T? | Nil | Query current value |
AT+C[CH]_LINK_T=parameter | 0: Establish connection immediately after power on (default) | Set new value |
1: Establish a connection after receiving data through the serial port | ||
Response | [C[CH]_LINK_T] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_LINK_T=1\r\n | |
Response: [C1_LINK_T] Value is: 1\r\nOK\r\n |
Description: This command is valid in TCP Client mode and data transparent mode. This command is used to configure under what conditions the converter establishes a connection with TCP Server. When configured as Establish connection after receiving data through serial channel , the converter will not initiate a connection to the server until the converter's serial channel receives the first packet of data and immediately initiates a connection request to the server. After successful connection, the converter's serial channel will send the first packet of data to the server and start normal data transmission mode.
C[CH]_LINK_M(Send Hello Message)
Command format | Parameters | Function Description |
---|---|---|
AT+C[CH]_LINK_M? | Nil | Query current value |
AT+C[CH]_LINK_M=parameter | 0: Do not send messages (default) | Set new value |
1: Send converter name | ||
2: Send converter MAC address | ||
3: Send converter IP address | ||
Response | [C[CH]_LINK_M] Value is: value\r\nOK\r\n | |
Example | Command: AT+C1_LINK_M=1\r\n | |
Response: [C1_LINK_M] Value is: 1\r\nOK\r\n |
Description: The command is valid in TCP Client mode and is valid in both data transparent mode and AT command transmission data mode. This command is used to configure the information that the converter sends immediately after the connection is established.