-------- Original Message -------- Subject: Decoder comms Date: Mon, 19 Mar 2012 18:30:54 -0500 From: I-Lap To: ken fiallos The decoder connects through USB, but appears to the PC as a virtual serial port. No API is used, just plain ASCII strings. To put the decoder into the 7 digit mode, send the following command to the serial port 4 bytes = chr(001)chr(037)chr(013)chr(010) (all values given in decimal, 037 is "%") The decoder will ack with: <01>%<09>204<09>0<09>0<13><10> where the numbers in <> are non-printable chr codes, again in decimal. The % and numbers not in brackets are plain text. The 204 is the decoder ID, which will be 204 or greater for firmware versions that support this mode(Current is 206). This also resets the decoder clock to zero. The same command is used to reset the clock back to zero again if sent to the decoder again. Once the above is done, a transponder passing packet will be sent by the decoder as: <01>@<09>204<09>XXXXXXX<09>SECS.MSS<13><10> Where XXXXXXX is the 7 digit transponder number, valid numbers between 2097152 and 9999999. SECS is seconds and MSS is milliseconds. Trailing zeros are omitted, so 324.620 would be sent as 324.62 These times are since the clock was last reset. The 204 (or 206) is the decoder ID again, which can be ignored when using only one decoder. All comms are at 9600-8-N-1. Keep RTS off.