This commands starts transmission of telemetry data by DIGI_NED which can be used to transfer binary data read from an LPT port. You can connect your own hardware to the LPT port to give meaning to the signals.
telemetry: 20 all off,off,off,off,off,lpt2 DIGI_DEST,WIDE,TRACE4-4
This means: send telemetry data with an interval of 20 minutes to all ports with DIGI_CALL (that's the call of this DIGI_NED) to the first call in the path given in the telemetry command. The other calls in the path of the telemetry command are the digis, in this case WIDE,TRACE4-4.
Note that an interval of 0 will not cause any transmissions. This can be used to specify ports with the "telemetry:" for use with the "?tlm" query but without the automatic transmissions.
The telemetry data to send is read from the control data address of the given ports. Up to 6 sources can be specified, the first 5 are analog and the 6th port is a digital port.
In the command as shown the analog inputs are not connected to a port. "off" is a dummy port, used as placeholder.
The source for the digital port is in the above example the parallel port. The address of the used LPT port is read from DOS in case DOS is used, in Linux LPT1 (/dev/lp0) is mapped to base address 0x3BC, LPT2 (/dev/lp1) to 0x378 and LPT3 (/dev/lp2) to 0x278. This corresponds with the order used in the "lp" driver in Linux (at least with 2.0.36 kernel). Note that for example LPT1 in DOS may not be the same as port 0x3BC in Linux. DOS assigns the ports in a different order depending on the available hardware.
The telemetry data is transmitted as an APRS type 'T' identifier. The sequence number starts at 000 and is increased each transmission. When the number 999 is reached the counter restarts at 000. The LPT port data will be in the "Digital Value" part. The dummy "off" ports will give 999 as value in the analog part or all '1' when used in the binary value. You can change the telemetry command to this:
telemetry: 20 all lpt2 DIGI_DEST,WIDE,TRACE4-4
In this case the value read from lpt2 is put into the first analog field. The telemetry command will not send more data then needed.
In the future more telemetry ports can be added, currently only the dummy 'off' and the 'lpt' ports are supported.
For 'lpt' 5 bits input can be used. The value is read from the 'lpt' status port as input. The inputs are "Busy" = D7, "Ack" = D6, "Paper Out" = D5, "Select In" = D4 and "Error" = D3. The binary value in the telemetry data is send out with high byte first (do the first binary value bit is "Busy". Logical high is a '1' in the telemetry message.
For 'lpt' also a 8-bit input can be used. For multiplexing the 'strobe' signal is used. When the 'strobe' signal on the connector is logical low then the lower nibble of the 8 bytes is read from the status port (inputs "Busy" = D3, "Ack" = D2, "Paper Out" = D1, "Select In" = D0). When the 'strobe' signal on the connector is logical high then the higher nibble of the 8 bytes is read from the status port (inputs "Busy" = D7, "Ack" = D6, "Paper Out" = D5, "Select In" = D4). There is at least 1ms time between changing the strobe signal on the port and actually reading the nibble from the port.
If you want to use 8 bit input use "lpt_8",for example 8 bit input from "lpt2":
telemetry: 20 all off,off,off,off,off,lpt2_8 DIGI_DEST,WIDE,TRACE4-4
DIGI_NED contains support for multiplexing via the lpt port. When reading the port the port number (which is 0 based and runs from 0 to 5) is put on bits 1, 2 and 3 of the control port. These bits correspond with the "Auto Linefeed", "Initialize Printer" and "Select Printer" outputs of the LPT port. The association of port numbers put on the 3 bit address lines of the control port can be overruled. For example to completely reverse the numbers, so the first value is read from address 5, the next from 4 etc, you can specify:
telemetry: 20 all lpt2_8/5,lpt2_8/4,lpt2_8/3,lpt2_8/2,lpt2_8/1,lpt2_8/0...
(path truncated to be able to fit the example on 1 line...)
The 3 bit address on the control port can take values 0..7.