Rig Xml Howto
This document describes the contents of the rig definition file “rig.xml”.
A number of transceivers have rig defintion files written and tested
which you may use. These are found in the xmls directory on this
site: xml archives.
You will find subdirectories by manufacturer which contain files named
by rig type, ie: TS-850.xml. If you create, test and verify the proper
operation for a transceiver not yet posted please share that with
others by sending it as an attachment to w1hkj@w1hkj.com and I will
post it on the web site. You are encouraged to study the various rig
definition files to learn more about how they are organized.
Comments are contained within the tag pair
<!-
-->
and may appear anywhere in the rig definition file The entire rig definition must be contained within the tag pair
<RIGDEF>
</RIGDEF>
The text within the tag pair <RIG></RIG> specifies the transceiver to which this file applies, as in:
<RIG>Icom 746 PRO</RIG>
The text within the tag pair <PROGRAMMER></PROGRAMMER>
is not used by the parser, but should as a minimum say who created and
who tested the definition file, as in:
<PROGRAMMER>
Dave Freese W1HKJ Tested by: W1HKJ, Dave
</PROGRAMMER>
The text within the tag pair
<STATUS>
</STATUS>
is not used by the parser, but should as a minimum state whether the
definition file has been “Verifed”, is “Alpha”,
what the Version and Date of creation or update, as in:
<STATUS> Verified Version: 1.0 Date: 2007 Jan 5 </STATUS>
The
<TITLE>
</TITLE>
tag pair contains the text which will be displayed on the window decoration bar, as in:
<TITLE>Rig Control - IC-746 PRO</TITLE>
The
<PORT>
</PORT>
tag pair contains multiple tag pair entries that specify the serial port and its configuration as used by fldigi:
| BAUD |
normal baud rate that transceiver operates at for CAT |
| DEVICE |
full path to the serial device |
| ECHO |
set to true for CI-V type of interface in which a h/w loop back sends
all outgoing data from Tx to Rx, or if the transceiver echos the data
stream |
| STOPBITS |
number of stopbits in the RS232 stream |
| RETRIES |
# times that the computer tries to send a command sequence before failure |
| TIMEOUT |
time in milliseconds between retries |
| WAIT |
time in milliseconds to wait between sending a command and receiving a response |
| DTRINIT |
inititialized state of the DTR pin, +/- 12 are valid entries.
This is the voltage level that will be available at the DTR pin. For
some CI-V type of interfaces this voltage may be used to power the serial converter |
| DTRPTT |
logic true or false designating whether the DTR pin is used
for PTT. PTT ON will toggle the DTRINIT state, ie: if +12 it goes
to -12, if -12 it changes to +12. |
| RTSINIT |
inititialized state of the RTS pin, same as for DTR |
| RTSPTT |
specifies whether the RTS pin is used for PTT, same logic as with DTR. |
| RTSCTS |
specifies whether hardware flow control is used with the
radio. Many of the Kenwood rigs require RTS/CTS flow control. Set
to true to enable this type of control |
|
NOTE:
you cannot use both RTSCTS and RTSPTT. If you set both to true
the RTSCTS flow control will have priority. |
Example:
<PORT>
<BAUD>19200</BAUD>
<DEVICE>/dev/ttyS0</DEVICE>
<ECHO>true</ECHO>
<RETRIES>8</RETRIES>
<TIMEOUT>20</TIMEOUT>
<WAIT>0</WAIT>
<DTRINIT>+12</DTRINIT>
<DTRPTT>false</DTRPTT>
<RTSINIT>-12</RTSINIT>
<RTSPTT>false</RTSPTT>
<RTSCTS>false</RTSCTS>
</PORT>
The transceiver modes are specified within the
<MODES></MODES> tag pair. Each entry or element associated
with a mode has a symbol name (text) and a way to specifiy what the
data transfer consists of. The data transfer might be a single byte,
multiple bytes, or aa string
Example 1, for the Icom-746PRO
<MODES>
<ELEMENT><SYMBOL>LSB</SYMBOL><BYTE>00</BYTE></ELEMENT>
<ELEMENT><SYMBOL>USB</SYMBOL><BYTE>01</BYTE></ELEMENT>
<ELEMENT><SYMBOL>AM</SYMBOL><BYTE>02</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW</SYMBOL><BYTE>03</BYTE></ELEMENT>
<ELEMENT><SYMBOL>RTTY</SYMBOL><BYTE>04</BYTE></ELEMENT>
<ELEMENT><SYMBOL>FM</SYMBOL><BYTE>05</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW-R</SYMBOL><BYTE>07</BYTE></ELEMENT>
<ELEMENT><SYMBOL>RTTY-R</SYMBOL><BYTE>08</BYTE></ELEMENT>
</MODES>
Example 2, for the Kenwood 850
<MODES>
<ELEMENT><SYMBOL>LSB</SYMBOL><BYTE>31</BYTE></ELEMENT>
<ELEMENT><SYMBOL>USB</SYMBOL><BYTE>32</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW</SYMBOL><BYTE>33</BYTE></ELEMENT>
<ELEMENT><SYMBOL>FM</SYMBOL><BYTE>34</BYTE></ELEMENT>
<ELEMENT><SYMBOL>AM</SYMBOL><BYTE>35</BYTE></ELEMENT>
<ELEMENT><SYMBOL>FSK</SYMBOL><BYTE>36</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW-R</SYMBOL><BYTE>37</BYTE></ELEMENT>
<ELEMENT><SYMBOL>FSK-R</SYMBOL><BYTE>39</BYTE></ELEMENT>
</MODES>
Example 3, for the FT-100
<MODES>
<ELEMENT><SYMBOL>LSB</SYMBOL><BYTE>00</BYTE></ELEMENT>
<ELEMENT><SYMBOL>USB</SYMBOL><BYTE>01</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW</SYMBOL><BYTE>02</BYTE></ELEMENT>
<ELEMENT><SYMBOL>CW-R</SYMBOL><BYTE>03</BYTE></ELEMENT>
<ELEMENT><SYMBOL>AM</SYMBOL><BYTE>04</BYTE></ELEMENT>
<ELEMENT><SYMBOL>DIG</SYMBOL><BYTE>05</BYTE></ELEMENT>
<ELEMENT><SYMBOL>FM</SYMBOL><BYTE>06</BYTE></ELEMENT>
<ELEMENT><SYMBOL>W-FM</SYMBOL><BYTE>07</BYTE></ELEMENT>
</MODES>
The modes which are supported by lower sideband in the transceiver are
specified in the <LSBMODES></LSBMODES> tar pair. The string
data for the lsb modes must match those given in the modes id specifier
For example in the Icom 746 Pro:
<LSBMODES>
<STRING>LSB</STRING>
<STRING>RTTY</STRING>
<STRING>CW-R</STRING>
</LSBMODES>
If the transceiver data stream uses identically the same format for the
bandwidth data then it is specified in
the <BANDWIDTHS></BANDWIDTHS> tag pair
Example for the Icom 746 Pro:
<BANDWIDTHS>
<ELEMENT><SYMBOL>50</SYMBOL><BYTE>00</BYTE></ELEMENT>
<ELEMENT><SYMBOL>100</SYMBOL><BYTE>01</BYTE></ELEMENT>
<ELEMENT><SYMBOL>150</SYMBOL><BYTE>02</BYTE></ELEMENT>
<ELEMENT><SYMBOL>200</SYMBOL><BYTE>03</BYTE></ELEMENT>
<ELEMENT><SYMBOL>250</SYMBOL><BYTE>04</BYTE></ELEMENT>
<ELEMENT><SYMBOL>300</SYMBOL><BYTE>05</BYTE></ELEMENT>
<ELEMENT><SYMBOL>350</SYMBOL><BYTE>06</BYTE></ELEMENT>
<ELEMENT><SYMBOL>400</SYMBOL><BYTE>07</BYTE></ELEMENT>
<ELEMENT><SYMBOL>450</SYMBOL><BYTE>08</BYTE></ELEMENT>
<ELEMENT><SYMBOL>500</SYMBOL><BYTE>09</BYTE></ELEMENT>
<ELEMENT><SYMBOL>600</SYMBOL><BYTE>10</BYTE></ELEMENT>
<ELEMENT><SYMBOL>700</SYMBOL><BYTE>11</BYTE></ELEMENT>
<ELEMENT><SYMBOL>800</SYMBOL><BYTE>12</BYTE></ELEMENT>
<ELEMENT><SYMBOL>900</SYMBOL><BYTE>13</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1000</SYMBOL><BYTE>14</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1100</SYMBOL><BYTE>15</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1200</SYMBOL><BYTE>16</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1300</SYMBOL><BYTE>17</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1400</SYMBOL><BYTE>18</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1500</SYMBOL><BYTE>19</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1600</SYMBOL><BYTE>20</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1700</SYMBOL><BYTE>21</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1800</SYMBOL><BYTE>22</BYTE></ELEMENT>
<ELEMENT><SYMBOL>1900</SYMBOL><BYTE>23</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2000</SYMBOL><BYTE>24</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2100</SYMBOL><BYTE>25</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2200</SYMBOL><BYTE>26</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2300</SYMBOL><BYTE>27</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2400</SYMBOL><BYTE>28</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2500</SYMBOL><BYTE>29</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2600</SYMBOL><BYTE>30</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2700</SYMBOL><BYTE>31</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2800</SYMBOL><BYTE>32</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2900</SYMBOL><BYTE>33</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3000</SYMBOL><BYTE>34</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3100</SYMBOL><BYTE>35</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3200</SYMBOL><BYTE>36</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3300</SYMBOL><BYTE>37</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3400</SYMBOL><BYTE>38</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3500</SYMBOL><BYTE>39</BYTE></ELEMENT>
<ELEMENT><SYMBOL>3600</SYMBOL><BYTE>40</BYTE></ELEMENT>
</BANDWIDTHS>
If the bandwidth data stream is unique for send and receive data
streams then they are specified separately with the
<BW-CMD></BW-CMD> tag pair for data sent to the
transceiver, and the <BW-REPLY></BW-REPLY> tag pair for
data returned to the computer.
Example: FT-100:
<BW-CMD>
<ELEMENT><SYMBOL>300</SYMBOL><BYTE>00</BYTE></ELEMENT>
<ELEMENT><SYMBOL>500</SYMBOL><BYTE>01</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2400</SYMBOL><BYTE>02</BYTE></ELEMENT>
<ELEMENT><SYMBOL>6000</SYMBOL><BYTE>03</BYTE></ELEMENT>
</BW-CMD>
<BW-REPLY>
<ELEMENT><SYMBOL>300</SYMBOL><BYTE>03</BYTE></ELEMENT>
<ELEMENT><SYMBOL>500</SYMBOL><BYTE>02</BYTE></ELEMENT>
<ELEMENT><SYMBOL>2400</SYMBOL><BYTE>01</BYTE></ELEMENT>
<ELEMENT><SYMBOL>6000</SYMBOL><BYTE>00</BYTE></ELEMENT>
</BW-REPLY>
Fldigi can parse and decode message returned from the transceiver that define 4 aspects of the transceiver operation:
| OK |
data accepted by the transceiver |
| BAD |
data rejected by the transceiver |
| MODE |
current operating mode of the transceiver |
| BW |
current bandwidth setting of the transceiver |
| FREQ |
frequency of the active vfo (might be either A or B for example) |
These are all contained within multiple <REPLY></REPLY> tag
pairs. This is an example of a fixed format message with no
variable fields. It is the OK message sent back by the Icom-746 PRO:
<REPLY>
<SYMBOL>OK</SYMBOL>
<SIZE>6</SIZE>
<BYTES>FE FE E0 66</BYTES>
<BYTE>FB</BYTE>
<BYTE>FD</BYTE>
</REPLY>
The <SYMBOL></SYMBOL> pair and the command defnition are
mandatory. The <SIZE></SIZE> field is mandatory and
specifies the number of bytes contained in this reply. The above
definition could also have been coded as:
<REPLY>
<SYMBOL>OK</SYMBOL>
<SIZE>6</SIZE>
<BYTES>FE FE E0 66 FB FD</BYTES>
</REPLY>
When the reply contains variable data it is specified in a contained
tag pair <DATA></DATA>. This data field contains specifiers
that describe the kind and size of the data. The
<DTYPE></DTYPE> tag pair may be one of:
BINARY or
DECIMAL
This is an example for the reply to a mode query that is returned by the Icom-746 PRO:
<REPLY>
<SYMBOL>MODE</SYMBOL> specifies the response name
<SIZE>8</SIZE>
8 bytes of data returned
<BYTES>FE FE E0 66</BYTES> 4 bytes of preamble
<BYTE>04</BYTE> 1
additional byte for preample
<DATA>
<DTYPE>BINARY</DTYPE> binary data field of
1 byte
<SIZE>1</SIZE>
</DATA>
<FILL>1</FILL>
a variable field (data) not used
<BYTE>FD</BYTE> 1
byte postamble
</REPLY>
Fldigi rigcat will check for both the preample and postamble to insure that a valid reply has been sent by the transceiver.