TCP a ess and ommands
The command set designed to provide consistent expansion and new features, they are sent over TCP/IP on port 17494
(0x4456) This is the default port, it can be changed in the configuration settings
Five connections are allowed at any one time, these are independently protected but all using the same password as
defined in the board configuration
Command Action
dec hex
16 0x10 Get Module Info - returns 3 bytes Module Id (21 for ETH8020), Hardware version, Firmware
version
32 0x20 Digital Active - follow with 1-20 to set relay on then a time for pulsed output from 1-255 (100ms
resolution) or 0 for permanent Board will return 0 for success, 1 for failure
33 0x21 Digital Inactive - follow with 1-20 to turn relay off then a time for pulsed output from 1-255 (100ms
resolution) or 0 for permanent Board will return 0 for success, 1 for failure
35 0x23 Digital Set Outputs - follow 3 bytes, first byte will set relays 1-8, All on = 255 (0xFF), All off = 0,
2nd byte for relays 9-16, 3rd byte for relays 17-20, Board will return 0 for success, 1 for failure
36 0x24 Digital Get Outputs - returns 3 bytes, the first corresponds with relays 1-8, 2nd byte for relays 9-16,
3rd byte for relays 17-20
37 0x25 Digital Get Inputs - returns 4 bytes, the first three bytes are always 0, the 4th bytes bits correspond
with the 8 digital inputs, a high bit meaning input is active (driven low)
50 0x32 Get Analogue Voltage - follow with 1-8 for channel and ETH8020 will respond with 2 bytes to form
an 16-bit integer (high byte first)
58 0x3A ASCII text commands - allows a text string to switch outputs, see section below
119 0x77 Get Serial Number - Returns the unique 6 byte MAC address of the module
120 0x78 Get Volts - returns relay supply voltage as byte, 125 being 12 5V DC
121 0x79 Password Entry - see TCP/IP password, board will return 1 for success or 2 for failure
122 0x7A Get Unlock Time - see section below
123 0x7B Log Out - immediately re-enables password protection, board will return 0 for success
Digital Active/Inactive Commands
These are 3 byte commands, The first byte is the command, 32 (active means on) or 33 (inactive)
Second byte is the output number, 1-4 for the relays, or 9 - 16 for digital outputs (marked I/O1 to I/O8 on the board)
Third byte is the on time Set this to zero for non pulsed mode, or 1-255 for a pulse in 100mS intervals (100mS to 25 5
seconds)
For example:
0x20 - turn the relay on command
0x03 - relay 3
0x32 (50) - 5 seconds (50 * 100ms)
Board will return 0 for success, 1 for failure
Note - All bytes in a command must be sent in one TCP/IP packet Digital outputs pull the output pin down to 0v when
active and pull up to 12v via a 10k resistor when inactive
Analogue input read
Four analogue inputs of 0v-5v at 10-bit resolution are provided, the conversion is performed when you send the "Get
Analogue Voltage" command 0x32 and the channel number The resulting 16 bit integer will be transmitted back in two
bytes (high byte first), combine these for the result The 10-bit conversion will be in the lower 10 bits of the 16 bit
integer with the upper 6 bits being 0
© Devantech Ltd 02/07/19 ETH8020 Documentation 9/17