libftdi Archives

Subject: Re: How to query the device serial number of an already opened connection

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 20 Oct 2015 09:59:54 +0200
>>>>> "Alex" == Alex Scarbro <alex.scarbro@xxxxxxxxxxxxxx> writes:

    Alex> Hello Ryan, Thank you for your reply. 

    Alex> Yes, I have already used this function - as per the "find_all"
    Alex> example.  Unfortunately, whilst it works perfectly to list all the
    Alex> available detected when used in conjunction with
    Alex> the ftdi_usb_find_all(), I'm interested in what the serial number
    Alex> is of the opened device - since the ftdi_usb_open() function could
    Alex> actually open any FTDI device with the same VID/PIDs.

    Alex> I realise I could use the ftdi_usb_open_desc() function, and In
    Alex> fact I am already, but I also want to offer the LCDproc user the
    Alex> option of just opening by VID/PID, since the
    Alex> ftdi_usb_get_strings() sometimes times out:

    Alex> " ftdi_usb_get_strings failed: -7 (error sending control message:
    Alex> Connection timed out) "

xc3sprog in ioftdi.cpp also offers an option to open with VID/PID and
serial.
      // Open device
      res = ftdi_usb_open_desc(ftdi_handle, vendor, product,
                               description, serial);

Keep description NULL and you don't need to the the description.

Bye
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

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

Current Thread