SW3 – Binary protocol

The sequence for communication over TCP is as follows:

The commands and responses are exchanged in the send() and receive() part of the sequence. The first octet in the command structure always defines the command ID.

The commands have a common structure in the first two octets:

Octet #Usage
0Command ID

In case of a command success, the return message as described in the commands is returned by the TCP server.

Error handling

In case of an error, the error message is returned:

Octet #Usage
0Error message ID = 0xFF
1Error code

The following error codes are defined:

Error codeUsage
0x01Message Length Error
0x02Function ID unknown
0x03Port power error, e.g. read while port disabled
0x04Port ID error, i.e. port ID >2 called
0x05Internal error, in this case octets 2..3 define the specific error code from the I-Link stack
0x06Wrong status, e.g. data exchange when power off or no connection to the device

The error codes are listed in the appendix SW-Apendix-A.