-
Notifications
You must be signed in to change notification settings - Fork 22
Config commands
To send config commands, you have to connect to the board to the TCP port 5111.
On this page I'll use string representations of commands. Keep in mind that this only hold, if you assume US_ASCII encoding, as TCP only sends bytes not characters.
Every config command starts with hash character (#) and ends with a semi-colon (;). If you execute multiple commands in one sitting, all commands must share the same SEQUENCE. Not all commands have an argument.
COMMAND := "#" CMD_NUMBER SEQUENCE [ "," ARGUMENT ] ";".
CMD_NUMBER := "1" | "2" | "3" | "4" | "6" | "7" | "8" | "9" | "A" | "B".
SEQUENCE := <4 digits>.
ARGUMENT := <alpha-numerical characters>.
Every answer of the board starts with a greater-than character (>) and ends with a semi-colon (;). The board usually answers with OK, or, ERR, if it does not understand the command. It can also be asked to return its current configuration.
>OK;
>ERR;
>192.168.1.100,255.255.255.0,192.168.1.1,,0,435,F449007D02E2EB000000,192.168.1.1,connect.tutuuu.com,0;
Sending the #1 command will cause the board to send its config back.
#19876;
>192.168.1.100,255.255.255.0,192.168.1.1,,0,435,F449007D02E2EB000000,192.168.1.1,connect.tutuuu.com,0;
This answer is a comma separated list of settings:
- static IP
- subnet mask
- default gateway,
- (unknown)
- persist relay state (1 = enabled, 0 = disabled)
- build number (435 becomes version 1.0.435)
- Serial number and password (are combined in one field)
- Serial number is the first 14 characters
- Cloud service password is the last 6 characters
- IP of DNS server
- cloud host name
- cloud service state (1 = enabled, 0 = disabled)
The #2 command expects the new static IP address as an argument.
#29876,192.168.0.201;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #3 command expects the new subnet mask as an argument.
#39876,255.255.0.0;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #4 command expects the new default gateway as an argument.
#49876,192.168.0.1;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #6 command expects a flag as an argument. The flag set to 1 enables the features, while 0 disables it.
#69876,0;
>OK;
or
#69876,1;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #7 command indicates the end of a communication and tells the board to apply its changes.
#79876;
>OK;
You should close the connection and start a new one to make sure that you and the board have the same state.
The #8 command expects the new IP address of the DNS server as an argument.
#89876,192.168.1.1;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #9 command expects the host name of the cloud service as an argument.
#99876,connect.tutuuu.com;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #A command expects a flag as an argument. The flag set to 1 enables the features, while 0 disables it. Also see Cloud Service.
#A9876,0
>OK;
or
#A9876,1;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.
The #B command expects the 6 byte password of the cloud service as an argument. Also see Cloud Service.
#B9876,000000;
>OK;
You should also send a #7 and close the connection for the device to restart is Ethernet connection with the new setting.