User Tools

Site Tools


usb2comport

USB to COM Port Mapping

The Problem

When connecting our ECMLink cable to the laptop, the FTDI driver used by our cable wants to assign different COM ports to each cable. This is not practical for a laptop used by a shop or general tuner when connecting cables from multiple customer cars.

To correct this, you can tell the FTDI driver to use a fixed COM port for each physical USB port on your laptop.

The Solution

To tell the FTDI driver to always assign the same COM port to a physical USB port, you have to edit the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTDIBUS\Parameters\LocIds

In this key, you will specify the location IDs of each USB port you plan to use.

USBView

To obtain the location IDs of your physical USB ports, use the USBView application. When you run this application, you will be presented with a screen as shown below. Of course, the laptop on which you are running this application will have a different configuration.

First, select the Options→Location IDs menu item and then hit F5 to refresh the screen. The above screen will now look like the one shown below.

Notice that the Port numbers from the first screen are now shown as Loc numbers. Those are the physical location IDs of the USB ports on your PC.

To determine the location ID that corresponds to a physical USB port on your laptop, simply insert one of our ECMLink cables into the port. Once you have inserted this cable, hit F5 again to refresh USBView.

Now you will see something like the following (notice the new USB Serial Converter at Loc41).

Note that Loc41 now says DeviceConnected : USB Serial Converter where as before it simply said NoDeviceConnected. That means that the USB port into which our cable was inserted is at location ID 0x00000041. When this cable is removed from that port and installed into another port, Loc42 (in this example) shows DeviceConnected, indicating the following.

PORT A – Location ID 0x00000041
PORT B – Location ID 0x00000042

Identify these ports on your laptop (however many you want to assign) and write them down. The following examples will use these two ports. Be sure to use your OWN IDs instead of the ones used in this example as your laptop will be different.

Regedit

Now, bring up the regedit application by going to Start→Run and typing in regedit then hitting OK. Navigate to the following node:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTDIBUS\Parameters

You may need to create the Parameters node if it doesn't already exist. If so, simply highlight the FTDIBUS node and select Edit→New→Key from the regedit application. Then type Parameters as the new name. Select the Parameters key and you should see something like the following.

From here, highlight the Parameters node as shown and then select Edit→New→BinaryValue. Type in LocIds as the name of this new value. When you are done, you should see something like the following.

Double click on the new LocIds entry to bring up the edit box shown below.

Now type in the location IDs you identified earlier, but type them in reverse order! So from our example above, we want to enter 0x00000041 and 0x00000042 as our location IDs. These would be typed into the dialog box above as 41 00 00 00 42 00 00 00 to produce the following.

Use your own numbers here of course! The 41 and 42 numbers are simply our example numbers. Your numbers will be different. When done, hit OK and then close the registry window.

usb2comport.txt · Last modified: 2024/03/15 11:16 (external edit)