Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Using Location IDs
Return to Introduction  Previous page  Next page
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
MaxDevices
. 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.

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.

   usbview_locids


The INF entries for the devices connected to these ports would be

   [FtdiBus.NT.AddService.AddReg]
   HKR,Parameters,"LocIds",1,
19,00,00,00,2A,03,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.