Przejdź do głównej zawartości

Basic Protocol

Ta treść nie jest jeszcze dostępna w Twoim języku.

Document status: Approved (2020-02-01)

Overvis Connect is a client-server protocol. The device is always the server, the application is the client. The client sends requests, the server responds.

The connection initiator can be either party. When the server (device) initiates a connection, it’s called “backward” connection—useful for bypassing firewalls when multiple devices connect to one cloud application.

Usually, the first request is 0000 Handshake to get device type/version and supported extensions.

If there’s no exchange for a period, the server terminates the connection. To prevent this, the client must regularly send 0001 Keep Alive or other commands. The timeout is transmitted in the Handshake response (KA field).

The server must respond within 10 seconds, otherwise the client may terminate or repeat the request.

<TID> <PID> <LEN> <CMD> <DATA>

Fields are coded Big Endian (most significant byte first).

FieldLengthDescription
TID2 bytesTransaction number
PID2 bytesProtocol ID, always 0x3900
LEN2 bytesPackage length (excluding TID, PID, LEN)
CMD2 bytesCommand code
DATALEN - 2Data field

Maximum packet length is 65535 bytes, but devices may set smaller limits via FLIM field in Handshake response.

<TID> 3900 0004 <ECMD> <ERROR>

Where ECMD is the command code with MSB set (<CMD> + 0x8000) and ERROR is 2-byte error code.

CodeDescription
0001Unknown error
0002Device I/O error
0003Device busy (try again later)
0004Invalid LEN field
0005Unknown command
0006Invalid DATA field
0007No access rights

Request meta-information about the device.

Request:

<TID> 3900 0002 0000

Response:

<TID> 3900 <LEN> 0000 <IC> <HW> <FW> <FLIM> <KA> [<EXT> ...]
FieldLengthDescription
IC2 bytesDevice type category (manufacturer ID)
HW2 bytesHardware type (LSB decimal = AO version)
FW4 bytesFirmware version (MSB 2 bytes = version type)
FLIM2 bytesMax packet length in bytes
KA2 bytesKeep-alive timeout in seconds
EXT2 bytesSupported extension codes (0 or more)

Maintain connection when no other requests are needed.

Request:

<TID> 3900 0002 0001

Response:

<TID> 3900 0002 0001