Skip to content

Config commands

Urs P. Stettler edited this page Jul 5, 2017 · 7 revisions

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;

Read current configuration

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:

  1. static IP
  2. subnet mask
  3. default gateway,
  4. (unknown)
  5. persist relay state (1 = enabled, 0 = disabled)
  6. build number (435 becomes version 1.0.435)
  7. Serial number and password (are combined in one field)
    • Serial number is the first 14 characters
    • Cloud service password is the last 6 characters
  8. IP of DNS server
  9. cloud host name
  10. cloud service state (1 = enabled, 0 = disabled)

Change the IP address

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.

Change subnet mask

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.

Change default gateway

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.

Persistent relay states

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.

Apply changes and restart

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.

Change DNS server

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.

Change cloud service host

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.

Enable cloud service

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.

Change password

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.