K9JM CI-V User manual

K9JM CI-V Router User Guide
for software version 1.11
March 201
What can be supplied:
The K9JM CI-V Router is sold in two forms:
1. The CI-V interface board for the rduino Mega 2560, assembled and tested
2. Full K9JM CI-V router. ssembled and tested. Includes
CI-V interface board
rduino Mega 2560 Board
Modified rduino Case
Power Supply (9volt 1 mp)
USB male to USB male B, 6 feet
Note: International customers. The US Government requires an special export license to
ship internationally " dvanced Microprocessors". The paper work and cost to acquire this
license prohibits me from exporting "full systems".
The K9JM CI-V Router:
The K9JM CI-V router is an rduino stand alone computer, an Icom CI-V interface "shield" and
software. The CI-V rduino shield board is the board shown above. The software, both source
code and prebuilt, ready to load binary code is available on the K9JM.com website.
Page 1
Illustration 1: CI-V Router Shield for the Arduino Mega 2560

To make a complete CI-V router, the following elements are suggested. Many people may wish to
build this into their own enclosure and provide additional functionality. Below is the shopping list
that comes with the "everything" option. The "everything" option comes programmed, tested and
configured for CI-V at 9600 and the computer 38400 with "Transceive on. Read the CI-V router
configuration for details. The device will be ready to wire and operate.
Many hams have well stocked junk boxes. Some of these items may already be found.
For the "everything" CI-V Router includes the following items, assembled and tested.
Item 1: Arduino Mega 2 60 board
http://arduino.cc/en/Main/ rduinoBoardMega2560
Distributors for the rduino board are listed:
http://arduino.cc/en/Main/Buy
Prices and available vary.
http://www.nkcelectronics.com/arduino-mega-2560.html
Item 2: Arduino case: plastic case that can be easily modified to house the "stack" of the
rduino Mega board and the CI-V Router shield board.
http://www.mouser.com/ProductDetail/ rduino/ 000009/?qs=sG EpiMZZMs0PWRNvpRp0DTFs%2fiaewZY
http://www.amazon.com/ rduino-Box-for/dp/B003ZKJNVY/ref=sr_1_4?ie=UTF8&qid=1328474339&sr=8-4
ITEM 3: USB A male to B male cable – These cables are everywhere. They are available at
about any store that carries electronics in the world. If you're like me there are a dozen of them in
your cable box.
http://www.amazon.com/ mazonBasics--Male-B-Male-Cable-Meters/dp/B001TH7GU /ref=sr_1_5?ie=UTF8&qid=1328474923&sr=8-5
I would avoid the very cheap cables, but these have been know to work,
http://www.amazon.com/Black-Hi-Speed-Printer-Scanner-Lexmark/dp/B0030FP44Y/ref=sr_1_16?ie=UTF8&qid=1328474923&sr=8-16
ITEM 4: Wall power supply. OPTION L. The entire CI-V router can be powered off the USB,
or it can be powered off an external power supply. The external power supply is handy when the
router is in use when the computer is off. Note: If the CI-V router is powered down, a relay
connects all the CI-V bus together, so communications between units will still occur, without the
"protection" of the router. Must be capable of DC voltage between 7.0 and 10.0 volts at 150ma.
http://www.amazon.com/Wall- dapter-Power-Supply-650m /dp/B003XZSZWO/ref=sr_1_1?ie=UTF8&qid=1328474449&sr=8-1
ITEM : Male jumper. Used for putting the CI-V router into configuration mode. ny piece of
bare wire will work
Page 2

Wiring
Wiring is straight forward.
There is no difference between the three CI-V ports, so run a shield cable to each item.
Connect the USB cable, USB male to the computer and the USB B male rduino Board.
n optional wall mounted power supply can be connected to the CI-V router.
IMPORT NT: The router can be powered off the USB port, however when the computer is
off, the router will "bypass" and connect all the ports together. Things will still be
functional, but the router will be inactive. This is recommended ONLY when there are just
two devices connected to the CI-V port.
IMPORT NT: The router at first opportunity after reset builds a table of discovered
equipment on each port. IF you move anything from port to port of the CI-V router it is
advised to RESET the CI-V router. This is done by hitting the reset button, or turning the
router off by removing all power sources, including the USB.
Page 3

Getting started
There are six steps that are necessary to get the CI-V Router up and running:
1. Installing rduino USB Drivers (Windows only)
2. Downloading CI-V software to the rduino board
3. Configure the CI-V Router
4. Configure your ICOM Radios
5. Configure the PC Host Software
6. Configure (sync) the PW-1 mplifier (required if use with PW-1)
STEP ONE: Installing Arduino USB Driver and COM Port determination
Note: When in doubt re-boot. Whenever changing USB serial ports, it is my experience
that a Windows reboot is almost always required if **anything** is changed. Installed a
driver, change COM port number. When in doubt re-boot.
Obtain and install the rduino USB Drivers for the rduino Mega 2560. On the internet go to the
rduino software download site
http://arduino.cc/en/Main/Software
and obtain the lastest rduino released software. It must be version 1.0 or greater. The only thing
that will be required is the drivers, but you will have to download everything. If you wish to
modify the source code, you will need the full package. This site has helpful information that
details installation on installtion of drivers. Follow these instructions.
http://arduino.cc/en/Guide/Windows
I usually download the zip version. Then move (drag and drop) the arduino-1.X.X folder from the
zip file to your desk top. Where X.X is the current version number. Then when loading the driver
for the unknown device, point it
... Desktop/araudino-1.X.X/drivers and hit okay.
The rdunio board can be powered off the USB port, so no external power supply is required.
While installing the driver some versions of windows will warn you that the driver is not verified or
certified by Microsoft. This is normal, do not be alarmed, just acknowledge the "warning".
Page 4

Note: If you have a Rev3 board properly installed, on the above "Computer Management" screen
will read " rduino Mega 2560 R3 (COM#)"
If you are running Windows, and if the rduino is connected to the PC, it should be visible in your
computers "Computer Management" screen. Please note which COM port was assigned to rduino
Board. If this port is too high or if you wish to change the COM port assignment, right click on the
item (as shown above) and select "Properties" and click on the "Port Settings" tab and click on the
" dvanced..." button. The rest of the parameters are the defaults and are always over written by
the program.
Page 5

nd select the desired COM Port number in the highlighted box
If the port is marked "IN USE" and it is a "virtual" COM device that is currently not in the machine,
select it to take over that device. If you have a physical COM port that you wish to re-assign to
another number, thus freeing that COM port on your machine, select the device in the device
manager, right click on "Properties" and select the "Port Settting" tab.
Page 6

Now select the Change Port Number button. The rest of the parameters are the defaults and are
always over written by the program.
Using this technique one can organize the COM port number on the computer to hopefully make
sense and to work will all desired programs.
NOTE: REMEMBER THE COM PORT NUMBER SSIGNED TO THE RDUINO MEG 2560
BO RD
There are many YouTube.com videos that detail step by step how to install drivers for the rduino
that may be useful.
STEP TWO: Uploading CI-V Router software
If you have a complete unit, software was installed before shipping, skip this step. If you ever wish
to install the latest software, for any reason, follow this proceedure. To get the latest router software
go and download
http://www.k9jm.com/CIV_Router/download.html
On this page you will find release notes and dates so you can see what new features or bugs were
fixed since your software version.
Unzip the "prebuilt" file into a directory. In the directory there should be avrdude, avrdude.conf a
.hex file and a batch file upload.bat
Page 7

With the rduino connected to the computer and remembering the COM Port number from above,
open a Command Prompt window, navigate to this directory and run the following command
upload #
Where the # is the COM Port number for the rduino Mega board that you hopefully remembered
from the first step.
In about five seconds the task should be complete. Below is a "typical output". The name and the
size of the .hex file will be different, but eventually it should say the flash was verified and tell you
Thank you.
Note: When the software installs on a virgin rduino board, it will self configure to operate at
38000 baud for the computer and 9600 for the CI-V bus.
Typical output
C:\Users\James\DLTest>avrdude.exe -Cavrdude.conf -pm2560 -c iring -P\\.\COM9
-b115200 -D -U flash: :K9JMBasicRouter.hex:i
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
avrdude.exe: Device signature = 0x1e9801
avrdude.exe: reading input file "K9JMBasicRouter.hex"
avrdude.exe: riting flash (13500 bytes):
Writing | ################################################## | 100% 2.27s
avrdude.exe: 13500 bytes of flash ritten
avrdude.exe: verifying flash memory against K9JMBasicRouter.hex:
avrdude.exe: load data flash data from input file K9JMBasicRouter.hex:
avrdude.exe: input file K9JMBasicRouter.hex contains 13500 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 1.79s
avrdude.exe: verifying ...
avrdude.exe: 13500 bytes of flash verified
avrdude.exe: safemode: Fuses OK
avrdude.exe done. Thank you.
C:\Users\James\DLTest>
lternatively, you can download the source files, place the library files in the library and open the
sketch and build the application. To learn how to do this read up on the rduino site.
If you do not wish to configure the router, re-attach the CI-V "shield" on the rduino board.
STEP THREE: Configuring the CI-V Router
NOTE: When touching the rduino and CI-V router electronics be sure to employ anti-static
proceedures.
Page 8

On a virgin rduino board or any completed system shipped, the configuration will be in the
default state. The baud rate for the CI-V ports is 9600 and 38400 for the USB 'computer'. To
confirm or change these parameters, the following proceedure can be followed.
Configuring the CI-V Router is done by
restarting or resetting the rduino Mega
board with Pin 53 connected to ground.
t start time, it checks to see if pin 53 is
grounded. If it is, a small program is run
within the router where the user interacts
with a serial terminal program and it
permits the user to configures the
EEPROM that is internal to the tlmel
microprocessor. Parameters can be
changed at will at any time using this
method. What can be established is the
baud rates for the CI-V bus as well as the
baud rate for the computer interface, and
the "transceive" function. Described
later. To operate as a router, the board
must be restarted with pin 51 NOT
grounded, leaving it unconnected is fine.
The board may be restarted by removing
all power from the unit, including USB,
or by hitting the 'reset' button on the back center of the rduino Mega board.
Note: The full unit ships with a jumper assembly that is plugged between the two ground pins. To
jumper pin 53 to ground, simply unplug the jumper and rotate it 90 degrees, so that it shorts pin 53
to ground. When done, be sure to store the jumper in the same location as it was shipped.
Resetting or starting the rduino with pin 53 connected to ground will run the configuration
program. This program changes the content of an EEPROM and it saves the changes after each
entry has been made.
If you already have and know how to use your favorite serial terminal program, use it. If you do not
have a favorite serial terminal program, might I suggest PuTTY.
There is a version of PuTTY that runs on almost every operating system. It is free and very useful
and can be downloaded from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
There are many options here, for windows it is best use the "Windows installer for everything
except PuTTYtel" option.
You will want to configure the serial program for a baud rate of 115200 8 bits 2 stop no parity no
flow control.
In PuTTY select the 'Serial' radio button, the COM port on 'Serial line' and 'Speed' is set to 115200
and hit 'Open'
Note: The Saved Session are saved session on my computer, once you have a
Page 9
Illu
stration 1: Jum er in 53 to ground

configuration you like, give it a name in the "Save Session" line and hit save.
NOTE: This configuration program LW YS runs at 115200 baud rate regardless of the
settings configured.
Pressing the reset button on the rduino will bring up the following:
Note: These settings do not represent the default setting as shipped. The first line will tell
you the version and date of the current CI-V router software. The second line tells the
amount of free static R M available for the program to use. The board has 8K bytes.
t this point the user can input either 1 through 13 followed by "ENTER".
Selecting either 1 or 2 brings up a second 'baud rate setting' menu, where the user can select the
desired baud rate. Or if 3 through 6 is selected the boolean can be toggeled between True and
False by selecting the parameter.
Transceive, default is true, is discussed later. It is best to leave at true for single radio operation.
USB Echo, default is true, and it causes any command sent from the computer to the USB port to be
echoed back. This is required for the program DX4WIN, and perhaps others. It does, slightly slow
down polling in other programs.
Subwitch, default is true, has the router running in a passive mode, where everything is routed.
Page 10

However, when the PC controlling software switches to the sub VFO to check what frequency it is
on, then everything else (PW-1, antenna switches etc) will follow. If Subswitch is off, the
reported frequency will remain with the "main" VFO when the PC software commands a switch to
the sub VFO. This eliminates many unnecessary jumps, and it further supports SO2V operation,
however it does not support cross band split operation. This is an attempt to "fix" a short coming in
the Icom control interface. Try turning it off and see if you like the result.
Note: Free memory number shows the amount of unused R M in bytes in the tmel processor.
This number will vary with different releases of software. There is 8 * 1024 bytes of R M
available.
The computer baud rate is the baud rate at which the CI-V Router communicates with the host
computer via the USB. The value should be the highest baud rate supported by all of your PC
logging and contest programs. The default is 38400, which is supported by many programs.
The baud rate for the CI-V bus is the baud rate for each of the three CI-V ports. If using a Icom
PW-1 amplifier Icom recommends a baud rate of 9600. If your radio support "auto", baud rate, do
not run operate the radio in the "auto" mode, specify the baud rate.
Config CI-V Router
1 -Computer baud rate = 38400
2 -CI-V baud rate = 9600
3 -Transceive msg to other radios = True
4 -Transceive msg to USB = True
5 -USB Echo = True
6 -Subs itch = True
7 -Split OFF hen QSY >1MHz = False
8 -Enable driver po er level = False
9 -Enable driver po er level learn = False
10-Small po er table = False
11-Driver po er table
12-Icom radio CI-V address 0x64 hex
13-Reset all to default values
Which parameter to change? 1
1
Select baud rate:
1- 300
2- 1200
3- 2400
4- 4800
5- 9600
6- 14400
7- 19200
8- 28800
9- 38400
10- 57600
11- 115200
Which baud rate 1..11? 10
Config CI-V Router
1 -Computer baud rate = 57600
2 -CI-V baud rate = 9600
3 -Transceive msg to other radios = True
4 -Transceive msg to USB = True
5 -USB Echo = True
6 -Subs itch = True
7 -Split OFF hen QSY >1MHz = False
8 -Enable driver po er level = False
9 -Enable driver po er level learn = False
Page 11

10-Small po er table = False
11-Driver po er table
12-Icom radio CI-V address 0x64 hex
13-Reset all to default values
Which parameter to change? 2
2
Select baud rate:
1- 300
2- 1200
3- 2400
4- 4800
5- 9600
6- 14400
7- 19200
8- 28800
9- 38400
10- 57600
11- 115200
Which baud rate 1..11? 7
Config CI-V Router
1 -Computer baud rate = 57600
2 -CI-V baud rate = 19200
3 -Transceive msg to other radios = True
4 -Transceive msg to USB = True
5 -USB Echo = True
6 -Subs itch = True
7 -Split OFF hen QSY >1MHz = False
8 -Enable driver po er level = False
9 -Enable driver po er level learn = False
10-Small po er table = False
11-Driver po er table
12-Icom radio CI-V address 0x64 hex
13-Reset all to default values
Which parameter to change?
For more information about the configuration options, see the section on configuration options later
in this user guide.
Remember to remove the jumper from Pin 53 and to reseat the CI-V "shield" on the rduino. The
two pins just below pin 52 and 53 on the rduino board are ground. This is a handy place to store
the jumper when not configuring the router.
Page 12

STEP FOUR: Configure your ICOM Radios
Consult your ICOM radio manual to discover how to configure the CI-V settings. Most ICOM
radios have three setting for the CI-V bus:
1. Baud Rate
2. ddress
3. Transceive
4. CI-V with IC-731
Make sure the baud rate matches the baud rate as configured for the CI-V router. Recommend 9600
baud. Note the address. If there is more than one radio, make sure the addresses are different. The
address will be required when configuring PC client software.
Lastly, Transceive, should be ON.
Note: DO NOT SET THE R DIO B UD R TE TO UTO!
Note: The K9JM Router does not support the IC-731 CI-V frequency syntax. Many Icom
radios provide the option to operate "transceive" with the IC-731. This radio uses 4 bytes of
frequency data, as compared to the standard 5 bytes of frequency data. If your radio has a setting,
that is anything like "CI-V with IC-731", make sure this feature is turned off.
If you had to change any of these setting, you may need to re-sync your PW-1 with the radio.
STEP FIVE: Configure your PC Host Software
Unfortunately, there are nearly an infinite number of programs that run on the PC that can control
the CI-V bus. Fundamentally, the goal is to configure with the following parameters:
1. Baud Rate = Computer baud rate as configured on the CI-V router
2. RTS and DTR = OFF
3. Icom ddress / Radio Type = Radio Configuration
4. If required, number of stop bits = 2, No Parity, No Flow Control
The rduino board will reset whenever DTR is brought high. This is how the PC signals the
rduino for a sofware download. If the DTR line can not be controlled, this can be defeated by
pulling up the rduino "RESET" line with a 120 ohm resistor. This can be done easily by putting a
resistor between "5V" and "RESET" on the "POWER" pin head. If used the resistor MUST be
removed if a software upgrade is to be performed.
N1MM (Classic) Configuration:
N1MM configuration is done much like normal, except make sure the baud rate is set correctly and
that RTS and DTR are set to " lways OFF". N1MM does not require the pull up resistor on the
rduino "RESET" line.
Page 13

Make sure the Icom Code matches the ddress of your radio. PTT commands can be used over
this interface, if supported by your radio.
Page 14

In the manual and the screen shot above, N1MM states that Transceive should be set off in the
radio.
http://n1mm.hamdocs.com/tiki-index.php?page=Supported+Radios#General_Icom_Information_all_Icom_owners_please_read_
The N1MM manual states that users shall " "CI-V Transceive" to OFF - If CI-V is set to ON, the
Bandmaps will not update as the VFO is turned.
This statement is true. If N1MM gets "Transceive" messages, it really slows down the band map.
DO NOT TURN TRANSCEIVE OFF IN THE RADIO.
To fix this problem, it is advised to leave "Transceive" on in the radio, but turn off "Transceive msg
to USB" in the router configuration.
N1MM + Configuration:
N1MM+ is nearly the same as N1MM. The new version does not restrict COM ports from COM1
through 8.
s with the classic N1MM keep "transceive" messages on in the radio, and if you wish turn it off in
the configuration.
Page 15

Set the proper COM Port and radio type in the "Configurer" window, the click on "Set" for the
details.
gain DTR and RTS should be off, 8 bit, 2 stop bit. Make sure the Icom code matches the code for
the radio which is to be controlled.
Page 16

Writelog Version 10.70 and above:
First, I would like to thank the fine folks at WriteLog for loaning me a temporary copy for testing.
Versions of Writelog before 10.70 have not been tested. WriteLog does not require the resistor pull
up on the "RESET" line. DTR and RTS must be turned off in the writelog.ini file, typically located
in the Windows directory with the following addition:
[Rigs]
COM6_RTS_INIT=0
COM6_DTR_INIT=0
The number following "COM" should match the COM port number of the CI-V Router.
For Windows 7 and Windows VIST WriteLog must be started as "Run as administrator" so the
program will be able to read and modify the writelog.ini file.
Then run the program and on the menu select "Setup" and "Ports.." and the following window will
appear. gain configure the baud rate to match the CI-V computer baud rate and again select the
COM port to match the port of the CI-V Router. ll other settings can be configured as desired.
More information on .ini file settings and configurations are available in the WriteLog manual.
Page 17

When finished, remember on the menu select, "Setup" and "Save Configuration..."
N3FJP Software
N3FJP programs does not require a pull up resistor on the rduino "RESET" line. Start N3FJP
Contact Log version 4.2 and select "Settings" on the Menu, then select "Rig Interface". N3FJP
uses fairly generic control for Icom, with most modern radios being covered by the 'Icom" entry for
'Select Rig'.
gain select the COM port and baud rate for the computer port of the CI-V router. Select the
proper baud rate, 8 bits, no parity, 2 stop bits, connection power = NONE, and any polling rate.
Page 18

Hit the 'Test' button to see if it works. Test mode change and frequency change with the lower
buttons.
Once you see things working, hit the 'Done' button and you're good to go
DX4WIN
To use DX4Win you must use CI-V router software version 1.02 or higher. These tests were done
with version 8.05 of DX4WIN. There is no need for a resistor to pull up the reset line.
In the main menu go to "File" and select "Preferences". Click on the "Radio" tab.
Be sure to uncheck the 'DTR high' and 'RTS high' lines. The baud rate is not the default, so
uncheck the 'Default' and enter the router computer baud rate. Make sure the correct COM port is
present. Polling rate can be most anything reasonable.
I would like to thank Sam W4PK for his assistance with DX4WIN.
Page 19

Win-EQF
gain, turn DTR and RTS off, 8 bits, no parity, 2 stop bits.
OmniRig
OmniRig is not a program, it is an interface that programs can use to interface to a radio. This is
more complicated than the average program, so there is a special OmniRig users manual available
at the K9JM web site:
http://www.k9jm.com/CIV_Router/OmniRig.pdf
Ham Radio Deluxe
VERY IMPORTANT: For versions of Ham Radio Deluxe less than version 6.2, the max baud rate is
19200. If you plan to use this program, the computer port on the CI-V Router configuration must
be set to 19200 or below, and all other PC programs must be set to this baud rate.
In the router configuration USB Echo must be set true.
gain, uncheck DTR and RTS. There is no need for the 120 ohm reset pull up for this program.
Page 20
Table of contents