Lecnet software protocol – Lectrosonics UDR200c User Manual

Page 21

Advertising
background image

21

Wireless Diversity Receiver

Rio Rancho, NM – USA

LecNet SOFTWARE PROTOCOL

Note: This section is for development of custom control applications and is not necessary for general operation of the receiver

and the LecNet control software provided by the factory.

All LecNet devices use a modification of the typical one-to-one connection between two RS-232 compatible devices.
LecNet devices have both an RS-232 transmitter and receiver section. The transmitter section is “tri-stated”, or
placed in a high impedance mode, until the particular device is addressed. To facilitate the simple parallel connec-
tion of multiple devices on a single RS-232 port, an addressing scheme is employed to route commands from the
host to the proper LecNet device. When a device receives its address from the host computer, it temporarily turns
on its RS-232 transmitter long enough to send whatever data is requested by the host. In this way, multiple devices
may drive a single transmit signal back to the host, because only the addressed device will turn on its transmitter.

Valid address values are 128-254 (80 hex-FE hex). 255 (FF hex) is an invalid address and must not be used.
Because a LecNet device will interpret any single data byte whose value is greater than 127 as an address, single
byte data (as opposed to addresses) sent from the host must be in the range of 0-127. If a data value needs to be
sent from the host that exceeds 127, the host must format two bytes of output such that the first byte is the lower 7
bits of the 8 bit value, and the second byte is 1 if the MSB of the data byte is 1, or 0 if the MSB of the data byte is 0.

All interchange of commands and data with any LecNet device should be done in hex rather than ASCII. The only
exception to this is the return data on the Get Device Name command (see command description below).

Each LecNet command must be preceded by the address of the device to be controlled. If a device with the re-
quested address exists on the system, it will respond by sending a 0 (0 hex, not ASCII) back to the host. Some
serial controller devices may simply send commands and data to a LecNet device and have no need to receive data.
In this case, step 2 below is replaced by a minimum 25 millisecond wait. This wait is necessary to insure that the
addressed LecNet device is “listening” and can respond to the command. Thus, each interchange with a LecNet
device follows this pattern:

1) Host sends device address in hex (1 byte);
2) Host receives byte of 0 hex from the LecNet device as acknowledgment;
3) Host sends command (1 byte, hex) to the LecNet device;
4) Host and LecNet device exchange data based on particular command sent.

Note that some LecNet commands cause LecNet devices to return an additional acknowledgment byte of data to
confirm the end of a transaction. This is most typical of commands that cause the LecNet device to be busy for
more than a few milliseconds processing the command. The additional acknowledgment byte lets the host know
that the LecNet device is no longer busy and can receive more commands. If a command does return an additional
acknowledgment byte, this will be explicitly stated in the command description.

As an example of a specific interchange between a host and a LecNet device the following general procedure would
be used to get a name string back from a UDR200C:

Set up the communications parameters of the device which will be the host. The correct parameters for all LecNet
devices are 9600 baud, no parity, 8 data bits, 1 stop bit. This must only be done once when the host is initialized.

1) Host sends device address. For a factory default UDR200C, this would be 150, or 96 hex (1 byte);
2) Host receives byte of 0 hex from the UDR200C as acknowledgment;
3) Host sends command 1 hex (1 byte) to the UDR200C to get the name data;
4) The LecNet device sends to the host 8 bytes. The first byte is 7 hex, which is the number of bytes in the

UDR200C’s name string. The UDR200C will then send the ASCII characters “U”, “D”, “R”, “2”, “0”, “0”,
and “C” to the host.

The following section is a listing of available commands grouped based on the UDR200C function to which the
commands are related. The word “Host” in the command descriptions means the IBM PC or compatible, AMX
controller, or Crestron controller to which the UDR200C is connected. For AMX control of LecNet equipment, use
the Lectrosonics PT3 Protocol Translator. For Crestron control, you’ll find macros for LecNet equipment on the
Crestron web site, http://www.crestron.com.

The following commands are described from the perspective of the host. A “Get” command allows the host to receive
information from the receiver. A “Set” command allows the host to send information to set some parameter in the
receiver. All commands and data have both the decimal values and hex values noted in the command description.

Advertising