Skip to content

Instantly share code, notes, and snippets.

@malefficient

malefficient/README.md

Last active Aug 29, 2020
Embed
What would you like to do?
FTDI, libusb, Arty-a7, and you

libusb: multiplatform generic usb library for userland applications zadig.exe: Convenient Windows driver switcher utility

'libwdi' : Some sort of zadig wrapper to work-around code signing requirements http://mirobetm.blogspot.com/2014/08/removing-libwdi-drivers.html

pnputil.exe -e > somefile.txt

  1. Then look for "libwdi" string in somefile.txt Example:

Published name : oem134.inf Driver package provider : libusbx.org Class : Urządzenia uniwersalnej magistrali szeregowej Driver date and version : 06/02/2012 6.1.7600.16385 Signer name : USB\VID_046D&PID_C019 (libwdi autogenerated)

Now all you need is the command below for reach entry found:

pnptuil.exe -d oem134.inf

... ** Success ** ! Back to a functioning serial port and JTAG

To locate the drivers you want to install for a device, select which of the driver types you wish to use (VCP or D2XX) and then locate the appropriate operating systems.

https://www.ftdichip.com/Drivers/VCP.htm https://www.ftdichip.com/Drivers/D2XX.htm

https://store.digilentinc.com/digilent-adept-2-download-only/

cd \data\xicom\cable_drivers\nt64

install_drivers_wrapper.bat \data\xicom\cable_drivers\nt64 C\install.log

FTDI CDM Diagram

libusbK: Windows specific kernel driver (libusbk.sys) and userland library (libusbk.dll) libD2XX: USERLAND library (regrettably, called a 'driver' sans air-quotes). Written/providedby FTDI ![image text](https://cloud.githubusercontent.com/assets/711743/25648417/57cd2c0c-2fe9-11e7-8753-b60ea2656faf.png)

libftdi: Opensource library - provides cross-platform support for ftdi-specific features on * FT230X - FT4232H / FT2232H - FT232R / FT245R - FT2232L / FT2232D / FT2232C - FT232BM / FT245BM (and the BL/BQ variants) - FT8U232AM / FT8U245AM

LibD2XX: FTDI developed libftd2xx primarily to aid porting Windows applications written with D2XX to Linux.asdf

##Examples

  # lsusb -d 0403:6001
  iManufacturer           1 FTDI
  iProduct                2 FT232R USB UART
  iSerial                 3 AD0JILOD
  
  libftdi1-1.5/ftdi_eeprom # cat ft233r.cfg  | head -n 3
  filename=eeprom.new                                                                     
  vendor_id="0x0403"                                                                     
  product_id="0x6001"                                                                  

  libftdi1-1.5/test/examples # ./find_all
  Number of FTDI devices found: 1
  Checking device: 0
  Manufacturer: FTDI, Description: FT232R USB UART
  
  libftdi1-1.5/ftdi_eeprom #
  ./ftdi_eeprom --read-eeprom ./ft233r.cfg

  FTDI eeprom generator v0.17
  (c) Intra2net AG and the libftdi developers <opensource@intra2net.com>
  FTDI read eeprom: 0
  EEPROM size: 128
  FTDI close: 0


./ftdi_eeprom  --build-eeprom ./jc-0001.cfg
FTDI eeprom generator v0.17
Writing to file: jc-0001.eeprom.bin


./ftdi_eeprom  --flash-eeprom ./jc-0001.eeprom.bin

FTDI eeprom generator v0.17
(c) Intra2net AG and the libftdi developers <opensource@intra2net.com>
Unable to find FTDI devices under given vendor/product id: 0x0/0x0
Retrying with default FTDI pid=0x6001.
FTDI read eeprom: 0
EEPROM size: 128
Used eeprom space: 100 bytes
FTDI write eeprom: 0
FTDI close: -1


####Woops ! Brick'd it


#Anyway, windows notes:
'CDM' -> Combined Driver Module: Win7+ feature that allows layered FTDI driver descibed below.
FTDIBUS.sys ->  provides D2XX style functionality and is always installed
FTSER2k.sys -> Virtual COM Port (VCP) layer on top of FTDIBUS
 
If the EEPROM of FTDI chip indicates so (FT232R, FT245R, FT2232D, FT2232H, FT4232H,
FT232H,..) it will be automatically exposed

'libwdi.' -> (self signed cert) : Top level 'zadig' wrapper. Presently => usbser.sys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment