Jump to content

* * * * * 1 votes

USB Vendor ID's - How to find manufacturer

  • Please log in to reply
No replies to this topic

#1 was_jaclaz



  • Advanced user
  • 7100 posts
  • Location:Gone in the mist

Posted 01 March 2007 - 07:24 PM

"pirates" down at msfn.org:

indirectly pointed me here:

Where a file (usb.if) containing an "official" list of USB Vendors can be found:

The list is supposedly maintained and kept up-to-date.

The format of the file usb.if is somewhat peculiar, so I wrote a small batch (Win2K/XP/2003 only) to convert it in a .csv file that can be opened/imported in any spreadsheet program, like OpenOffice.org or Excel.

@ECHO OFFSETLOCAL ENABLEEXTENSIONSSETLOCAL ENABLEDELAYEDEXPANSION:: usbif2csv.cmd small batch file to convert file usb.if found here::: [url="http://www.usb.org/developers/tools/"][url="http://www.usb.org/developers/tools/"][url="http://www.usb.org/developers/tools/"]http://www.usb.org/developers/tools/[/url][/url][/url]:: [url="http://www.usb.org/developers/tools/comp_dump"][url="http://www.usb.org/developers/tools/comp_dump"][url="http://www.usb.org/developers/tools/comp_dump"]http://www.usb.org/developers/tools/comp_dump[/url][/url][/url]:: :: that is a list of Vendor Id's (Vid) for USB devices:: into a .csv file (directly importable in a spreadsheet):::: by jaclaz [url="http://home.graffiti.net/jaclaz:graffiti.net/"][url="http://home.graffiti.net/jaclaz:graffiti.net/"][url="http://home.graffiti.net/jaclaz:graffiti.net/"]http://home.graffiti.net/jaclaz:graffiti.net/[/url][/url][/url]:: :: This file is licensed under my "CAREWARE" license:: Set OriFILE=usb.ifSet DestFILE=usb.csvIF NOT EXIST %OriFILE% (More %~fx0 | FIND "::" | Find /V "More" ECHO.ECHO File usb.if NOT found!PAUSEGOTO:EOF)IF EXIST %DestFile% (ECHO.ECHO.ECHO WARNING: File %DestFILE% will be deleted...ECHO.ECHO PRESS [CTRL+C] to keep it, any other key to go on.PAUSEdel %DestFile%)For /F "tokens=1,* delims=^|" %%A in (%OriFILE%) DO (CALL :ConvertBASE %%AECHO !HEXnum! %%BECHO "'!HEXnum!","%%B" >>%DestFile%)GOTO :EOF:ConvertBASEIF %1 gtr 65535 SET HEXnum=Out of Range &GOTO :EOFSET /A Val4096=%1 / 4096SET /A Mod4096=%1 %% 4096SET /A Val256=%Mod4096% / 256SET /A Mod256=%Mod4096% %% 256SET /A Val16=%Mod256% / 16SET /A Val1=%Mod256% %% 16FOR %%C in (4096 256 16 1) DO CALL:HEXchar Val%%CSET  HEXnum=%Val4096%%Val256%%Val16%%Val1%GOTO :EOF:HEXcharIF !%1!==10 SET %1=AIF !%1!==11 SET %1=BIF !%1!==12 SET %1=CIF !%1!==13 SET %1=DIF !%1!==14 SET %1=EIF !%1!==15 SET %1=FGOTO :EOF

For those interested in small batches, the file includes an easily reusable routine to convert from Decimal to Hex numbers.

Have fun. :P


Attached Files

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users