Discussion:
Merely discovering FTDI devices using libftdi/libusb detaches them from ftdi_sio
Joe Zbiciak
2018-06-04 20:02:35 UTC
Permalink
I echo Eric's suggestion.

On my devices, I personally set the manufacturer string, description
string, and serial number in EEPROM to something I can use to directly
identify my device. I don't generally change VID/PID, so I can use
whatever stock FTDI driver is installed in the computer I plug into.

I don't remember offhand, but do you also need to set the CHANNEL_x_DRIVER
fields in EEPROM to indicate you want bitbang rather than VCP, or does that
only affect non-Linux platforms?
I have a situation where I am using two FT4232H devices for serial
communication via ftdi_sio, and a third device which I wish to use in bit
bang mode to set up some control lines in the UARTS which are downstream
from the first two FT4232Hs. These UARTS can be configured as
RS232/422/485, etc. Of course, I do not wish to disturb the first two
FT4232H devices wrt to their connection to ftdi_sio. However, I must
discover all these devices to decide which one I should use with libftdi.
Have you considered changing the Vendor/Product ID, description, and/or
serial number fields stored in the EEPROM for the FT4232H which you
will be using for BitBang mode? I use those capabilities with the
ftdi_usb_open_desc_index() method to always and easily select the
desired device irrespective of any other FTDI devices on the USB
bus. Easy, foolproof.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
--
We sell spatulas, and that's all!
http://spatula-city.org/~im14u2c/
http://spacepatrol.info/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Uwe Bonnes
2018-06-05 10:28:15 UTC
Permalink
Joe> I echo Eric's suggestion. On my devices, I personally set the
Joe> manufacturer string, description string, and serial number in
Joe> EEPROM to something I can use to directly identify my device.  I
Joe> don't generally change VID/PID, so I can use whatever stock FTDI
Joe> driver is installed in the computer I plug into.

Joe> I don't remember offhand, but do you also need to set the
Joe> CHANNEL_x_DRIVER fields in EEPROM to indicate you want bitbang
Joe> rather than VCP, or does that only affect non-Linux platforms?

Look at DS_FT2232H datasheet "4.13.1 Do I need an EEPROM?"

Bye
--
Uwe Bonnes ***@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Paul Ourada
2018-06-05 15:41:08 UTC
Permalink
Thanks so much, Eric, Joe and Uwe. I had a suspicion that this might be the case. This exercise is to reduce the time spent attaching serial devices, and setting jumpers on the UART board to configure the serial comm type when deploying dozens of systems using these devices. We manufacture (for private corporate use) boards that use these FT4232H devices, and your suggestions would minorly complicate the build process, but such a change would only require setting the eeprom once. So the tradeoff may be acceptable to mgmt.


At present, I'm using the libftdi C API to open a particular device at a particular bus address. I think I may have mentioned that the Raspberry Pi seems to enumerate the bus in the order of the hub connections. We just put the port controller FT4232H device in the last slot. Of course, if someone should unplug and replug this device, then the enumeration is updated and things don't work until reset.


Again, thanks for your suggestions!


Best Regards,

Paul

________________________________
From: Uwe Bonnes <***@elektron.ikp.physik.tu-darmstadt.de>
Sent: Tuesday, June 5, 2018 4:28:15 AM
To: ***@developer.intra2net.com
Subject: Re: Merely discovering FTDI devices using libftdi/libusb detaches them from ftdi_sio
Joe> I echo Eric's suggestion. On my devices, I personally set the
Joe> manufacturer string, description string, and serial number in
Joe> EEPROM to something I can use to directly identify my device. I
Joe> don't generally change VID/PID, so I can use whatever stock FTDI
Joe> driver is installed in the computer I plug into.

Joe> I don't remember offhand, but do you also need to set the
Joe> CHANNEL_x_DRIVER fields in EEPROM to indicate you want bitbang
Joe> rather than VCP, or does that only affect non-Linux platforms?

Look at DS_FT2232H datasheet "4.13.1 Do I need an EEPROM?"

Bye

--
Uwe Bonnes ***@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

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



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