Copyright © 2008-2014 Future Technology Devices International Limited
10
Document Reference No.: FT_000073
Advanced Driver Options AN_107 Application Note
AN_107 Version 2.53
Clearance No.: FTDI# 63
In addition to the modifications made to the FTDIBUS.INF file to accommodate driver matching,
the following entries in the FTDIPORT.INF file show text in bold that must be changed to match
the VID and PID combination:
[FtdiHw]
%VID_0403&PID_6001.DeviceDesc%=FtdiPort,FTDIBUS\COMPORT&VID_0403&PID_6001
[FtdiHw.NTamd64]
%VID_0403&PID_6001.DeviceDesc%=FtdiPort,FTDIBUS\COMPORT&VID_0403&PID_6001
In the case of the FTDIPORT.INF file, separate entries are not needed for each interface of FT2232
and FT4232 devices as each port of these is supported by the same entry:
[FtdiHw]
%VID_0403&PID_6010.DeviceDesc%=FtdiPort,FTDIBUS\COMPORT&VID_0403&PID_6010
[FtdiHw.NTamd64]
%VID_0403&PID_6010.DeviceDesc%=FtdiPort,FTDIBUS\COMPORT&VID_0403&PID_6010
The device description string may be modified to display a custom device port name in the device
manager if so desired in the section listed below:
[Strings]
Ftdi=”FTDI”
VID_0403&PID_6001.DeviceDesc="
USB Serial Port"
Note: The values shown here are the default values already certified by FTDI. When changing
FTDIBUS.INF to match a new VID and PID combination, all references to these default values must
be removed from the file. See Technical Note
OEM Technical Support
Requirements for FTDI
Products and Application Note
Using Microsoft's WHQL Process for Certifying Customer Modified
FTDI Driver Files
for more details
A sample FTDIPORT.INF file is included in the
appendix
.
Copyright © 2008-2014 Future Technology Devices International Limited
11
Document Reference No.: FT_000073
Advanced Driver Options AN_107 Application Note
AN_107 Version 2.53
Clearance No.: FTDI# 63
5
FTDIBUS.INF Options
Some default configuration options are configurable through FTDIBUS.INF. This section describes
the options available and how to implement them.
5.1
Adjusting the Reset Pipe Retry Count
In some rare cases, it may be necessary to increase the number of times the driver tries to reset a
USB pipe on which an error has occurred, for example in noisy environments where USB errors
can occur.
The default value for the reset pipe request retry count is 50. This default value may be changed
in the FTDIBUS.INF file by editing or including the following fragment.
[FtdiBus.NT.AddService]
AddReg = FtdiBus.NT.AddService.AddReg
[FtdiBus.NT.AddService.AddReg]
HKR,Parameters,"RetryResetCount",0x00010001,100
In this example fragment, the reset pipe request is set to 100.
This value is held in the registry key located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTDIBUS\Parameters\RetryResetCoun
t
5.2
Using Location IDs
In some application areas it may be desirable to install devices by physical location rather than
serial number. In these instances, this may be accomplished by using the LocIds entry in the
driver INF file.
The driver uses LocIds to define the set of USB ports supported. It can be used in systems that
require only certain USB ports to be available, perhaps in conjunction with
MaxDevs
. The default
behaviour is that all USB ports are supported. The default can be overridden by including LocIds in
the FTDIBUS.INF service key section.
[FtdiBus.NT.AddService]
AddReg = FtdiBus.NT.AddService.AddReg
[FtdiBus.NT.AddService.AddReg]
HKR,Parameters,"LocIds",1,21,00,00,00,32,00,00,00,11,00,00,00,00
In this example INF file fragment, three USB ports are supported. Location ID 0x00000021
represents host controller 1 port 1. Location ID 0x00000032 represents host controller 2 port 2.
Location ID 0x00000011 represents host controller 0 port 1.
This value is held in the registry key located at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTDIBUS\Parameters\LocIds
Note that setting LocIds will radically alter the behaviour of the driver; please contact
FTDI
if you think you have to change LocIds.
Location IDs can be obtained using the latest version of the USBView utility available from the
Utilities
section of the
FTDI website
. An application note on location IDs
AN232B-07 Configuring
FTDI's VCP Drivers to use Location ID's
is also available.
Copyright © 2008-2014 Future Technology Devices International Limited
12
Document Reference No.: FT_000073
Advanced Driver Options AN_107 Application Note
AN_107 Version 2.53
Clearance No.: FTDI# 63
USBView can be configured to show location IDs by selecting Options > Location IDs. The screen
shot below shows a PC with a hub connected to location 0x0000002A and devices connected at
locations 0x00000019 and 0x00002A3.
Figure 5.1 USB View
The INF entries for the devices connected to these ports would be
[FtdiBus.NT.AddService.AddReg]
HKR,Parameters,"LocIds",1,19,00,00,00,03,2A,00,00,00
Please note that the INF entry must end with an additional 00 entry to terminate the location ID list.
If an attempt is made to install a device at a location that is not supported, a Code 10 error ("This
device cannot start") is generated for the new device.
Note that Location IDs are represented in the LocIds field as 4 hexadecimal bytes and in byte
reversed
order.
Note also that although on USB host controllers are indexed from 0 and ports from 1, Location IDs
are calculated by adjusting the host controller number so that it is indexed from 1