Control Protocol; Guidelines; Commands - Lantronix XPort Direct+ User Manual

Device server
Table of Contents

Advertisement

Control Protocol

COPIED FROM XPORT DIRECT.
The GPIO control protocol is a simple, proprietary protocol.

Guidelines

The GPIO control protocol is described from the PC side. Send means from PC to
XPort Direct+. Response comes from XPort Direct+ to PC.
The protocol allows for control of up to 32 GPIOs. How many are actually available
depends on the product. XPort Direct+ has only two.
The parameters are four bytes long and represent GPIOs 0-31, with GPIO0 in bit 0 of
the first byte (Little Endian). Parameter bits for configurable pins not configured as
GPIOs are undefined for Get commands and ignored on Set commands.
Every command consists of nine bytes: one command type of one byte and two
parameters of four bytes each.
Command
0
1
On some commands, one or all parameters are ignored.
For UDP, command type and parameters need to be in the same datagram.
Responses to valid commands are always five bytes long, consisting of the returned
command byte and as parameters in the current or updated values. In case of an
invalid command, only one byte with value 0FFh is returned.
Command
When sending a command (TCP and UDP), wait for the response before sending the
next command.

Commands

Byte 0 Command Types
10h
11h
12h
13h
19h
1Ah
1Bh
There is no Set functions command. Since the pin's function depends on the
hardware in which the XPort Direct+ is embedded, that configuration is only allowed
using 77FE. Settings changed by any of the Set commands are not stored and are
lost when the unit is powered down or rebooted.
XPort Direct+ User Guide
Parameter 1
2
3
0
1
Get functions
Get directions (input or output)
Get active levels (high active or low active)
Get current states (active or not active)
Set directions
Set active levels
Set current states
4
5
Parameter 1
2
3
9: GPIO Interface
Parameter 2
6
7
8
4
65

Advertisement

Table of Contents
loading

Table of Contents