CableGuide FTDI OEM Cables

Version 7 (Robert Terzi, 03/24/2013 05:10 pm)

1 1 Robert Terzi
h1. CableGuide FTDI OEM Cables
2 1 Robert Terzi
3 2 Robert Terzi
_Note: this page is currently a work in progress_
4 2 Robert Terzi
5 4 Robert Terzi
Some cable vendors use the FTDI serial chip in their USB radio cables, but have changed the chip's ID codes so that the cable will not be recognized as a generic serial communications port.  By default CHIRP (and some other software) will not be able to use these cables because CHIRP needs a serial port.  Most notably RT Systems sells such cables.  There are also some Icom cables that are sold this way.  Using a vendor specific code on the USB chip allows software that is specifically written for that cable, usually under Microsoft Windows, to identify the cable and eliminates the guessing about which port the radio is connected to.
6 1 Robert Terzi
7 1 Robert Terzi
There use such a cable with CHIRP there are two options.  You can either get your computer to recognize the OEM cable as a generic serial port by tweaking the driver setup, or you can change the cable to use the default FTDI codes, so the standard FTDI driver present in most operating systems will recognize the cable and create a standard serial port.
8 1 Robert Terzi
9 4 Robert Terzi
A little more background maybe helpful in understanding the information here:
10 1 Robert Terzi
11 4 Robert Terzi
USB devices have a Vendor ID (VID) and a Product ID (PID) that identifies the device so the operating system can figure out what driver to load, "plug-and-play" style.  While your system likely already has the FTDI USB Serial driver, the problem is that driver won't be used, because the VID/PID on your cable has been changed to the one set by your cable's vendor.
12 1 Robert Terzi
13 4 Robert Terzi
FTDI's driver has two components.  The first is a direct I/O driver that allows software written to use the FTDI chip to directly access the chip. The second component, called Virtual COM Port (VCP) is what makes the USB device appear to be a generic serial COM port similar to the physical ones that used to be routinely present on older computers.  Software like CHIRP that is written to do serial I/O, needs the VCP driver to make the FTDI chip look like a regular serial port.
14 4 Robert Terzi
15 4 Robert Terzi
16 4 Robert Terzi
17 1 Robert Terzi
h2. Get your OS to recognize the cable as a generic FTDI USB Serial Cable
18 1 Robert Terzi
19 1 Robert Terzi
h3. Windows
20 1 Robert Terzi
21 4 Robert Terzi
h4. Windows 7 (possibly also Vista, and Windows 8)
22 2 Robert Terzi
23 4 Robert Terzi
With Windows 7 (and possibly other versions like Vista and Windows 8), it is possible to trick Windows into updating the driver to the latest generic FTDI driver.  Once that is done, there will be the option load the VCP (Virtual COM Port) driver that will create a generic COM port in Windows that can be used by CHIRP.
24 2 Robert Terzi
25 3 Robert Terzi
This method was originally documented by Cory, NQ1E.
26 3 Robert Terzi
27 3 Robert Terzi
# Download the VCP driver zip file and expand it to a folder http://www.ftdichip.com/FTDrivers.htm
28 3 Robert Terzi
# Open up the device manager, find your cable under USB ports, Select the cable and right click to select update the driver
29 3 Robert Terzi
# Go though the "let me choose" and "have disk" options to point it at the folder where you unzipped the FTDI driver files.
30 3 Robert Terzi
# Install the driver that shows up even if it warns about it not being compatible.
31 3 Robert Terzi
# The device now shows up as "USB Serial Converter", go to its properties/advanced tab and check the box called "Load VCP".
32 3 Robert Terzi
# Unplug the device and plug it back in
33 3 Robert Terzi
# A new COMport device will show up, but a driver will not load for it automatically.
34 3 Robert Terzi
# You need to repeat the above process of telling it to add the driver, choosing the driver from the specific location (Have Disk), to ensure that the updated VCP driver gets loaded.
35 3 Robert Terzi
# In device manager, under ports, you should now be able to find the COM port number that Windows assigned to your cable.
36 3 Robert Terzi
# When you start CHIRP use the COM port number from the previous step
37 1 Robert Terzi
38 1 Robert Terzi
h4. Windows XP
39 1 Robert Terzi
40 4 Robert Terzi
*T.B.D. The process above doesn't seem to work in Windows XP.  Windows detects the mismatch in VID/PID, but doesn't give you a chance to proceed anyway the way Windows 7 does.*
41 4 Robert Terzi
42 4 Robert Terzi
43 1 Robert Terzi
h3. Mac OS
44 4 Robert Terzi
45 5 Robert Terzi
While RT Systems software doesn't work under Mac OS, they do have a Mac OS driver on their web site, that will allow you to use their cable as a generic FTDI serial cable that will work with CHIRP and other software.  http://www.rtsystemsinc.com/kb_results.asp?ID=9 
46 4 Robert Terzi
 
47 1 Robert Terzi
48 1 Robert Terzi
h3. Linux
49 1 Robert Terzi
50 5 Robert Terzi
Linux can be easily configured to load the ftdi_sio driver by supplying the VID/PID for your cable as a parameter.  If you system uses udev, it's straightforward to add a udev rule that will cause the right driver to load automatically.  It's also possible to execute the steps manually.
51 5 Robert Terzi
52 1 Robert Terzi
h4. Manual method
53 5 Robert Terzi
54 5 Robert Terzi
modprobe can be used to get the ftdi_sio driver to load for your cable.  If the ftdi_sio driver is already loaded it must be unloaded first or the paramaters to modprobe will be ignored.  If you have any other FTDI serial cables you need to unplug them first, and not plug them in until after you've completed these steps
55 5 Robert Terzi
56 5 Robert Terzi
The steps are:
57 5 Robert Terzi
# Plug in your cable.
58 5 Robert Terzi
# use @lsusb@ and/or @dmesg@ to determine your cable's VID and PID (should be 4 hex digits)
59 5 Robert Terzi
# Unplug all FTDI cables from your system
60 5 Robert Terzi
# @rmmod ftdi_sdio@  # unload the driver if it is already loaded.
61 5 Robert Terzi
# @modprobe vendor=0x2100 product=0x9e50@  # This is the ID for the RT System's Yaesu VX-8 cable
62 5 Robert Terzi
# Plug in your cable
63 5 Robert Terzi
# Check @dmesg@ to see that the cable was recognized and that a serial (TTY) /dev entry was created.
64 5 Robert Terzi
65 1 Robert Terzi
66 1 Robert Terzi
h4. udev rule
67 1 Robert Terzi
68 6 Robert Terzi
Create/Edit a text file in your system's udev rules directory:  E.G. /etc/udev/rules.d/99-custom.rules 
69 6 Robert Terzi
70 6 Robert Terzi
Put the fullowing in the file:
71 6 Robert Terzi
# RT Systems cable for Yaesu VX-8DR
72 6 Robert Terzi
SYSFS{idVendor}=="2100", SYSFS{idProduct}=="9e50", RUN+="/sbin/modprobe -q ftdi_sio vendor=0x2100 product=0x9e50"
73 6 Robert Terzi
74 6 Robert Terzi
Tell udev to re-read the rules files:
75 6 Robert Terzi
76 6 Robert Terzi
udevadm control --reload_rules
77 6 Robert Terzi
78 6 Robert Terzi
79 6 Robert Terzi
80 6 Robert Terzi
81 1 Robert Terzi
h2. Change your cable's ID to FTDI default
82 1 Robert Terzi
83 1 Robert Terzi
FTDI has a free download of a utility for Windows that will allow changing the USB serial chip's VID and PID.  The FTDI USB serial chip has a small EEPROM built in.  Once you have reprogrammed the chip in your cable you should be able to use it under most operating systems without having to do anything special.  It should be recognized as a generic FTDI serial cable.  
84 1 Robert Terzi
85 1 Robert Terzi
*NOTE: When you change the ID, the original software for your cable will no longer recognize your cable.*
86 1 Robert Terzi
87 1 Robert Terzi
88 1 Robert Terzi
If you want to use the original software again, you'll have to reprogram the chip back to the VID/PID it had originally.  There is the ability do save a copy of the original chip's configuration.  If you plan to use both the original software that came with your cable and CHIRP, you should use the other method to get your system to load the serial driver (VCP) with your cable's OEM VID/PID.
89 1 Robert Terzi
90 1 Robert Terzi
To use this method:
91 7 Robert Terzi
# download and install the utility from the FTDI site. http://www.ftdichip.com/Support/Utilities.htm
92 1 Robert Terzi
# Use the utility to save the current configuration of your cable (Note: the software refers to this as a template)
93 1 Robert Terzi
# Determine the correct default VID and PID for the *specific* FTDI chip in your cable.  
94 1 Robert Terzi
# Change the settings and reprogram the cable.
95 1 Robert Terzi
96 1 Robert Terzi
97 1 Robert Terzi
98 1 Robert Terzi
99 1 Robert Terzi