libftdi Archives

Subject: c++ wraper: open(vid,pid) fails for devices with a missing iManufacturer, iProduct or iSerial

From: Matthias Janke <matthias.janke@xxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 12 May 2017 13:32:50 +0200
  Hi All,
  
  I'm using the c++ wrapper of libftdi (git co of yesterday) to
  communicate with a FT2232HL on a Lattice XO2 Eval board
  (LCMXO2-7000HE-B-EVN) this board has no programmed in iSerial.
  
  A simple c++ program which just opens and closes the device fails with
  "libusb_get_string_descriptor_ascii() failed" this is also true for
  the find_all_pp example (find_all, works). This failure originates in
  the use of the get_strings() function inside all c++ open() functions.
  This function wants all three iManufractuer, iProduct and iSerial to be
  present. The C-API allows one to pass NULL to ignore these descriptors.
  This is currently not possible with the c++ api. To properly fix this I
  suspect an api break is needed. As temporary ugly workaround I use the
  appended patch. Are there other ideas to fix this? 
  
  Cheerio,
  Matthias

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread