Quantcast

Identifying multiple of the same FTDI devices

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Identifying multiple of the same FTDI devices

Michael Eder
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.






libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Rodney Sinclair

Use one of the GPIO pins connected to GND or power on the FTDI device as a front/back indicator.

Rodney


On 06/09/2016 08:55 AM, Michael Eder wrote:
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.






libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Michael Eder
Thanks but I actually have more than two FTDI devices

On Thu, Jun 9, 2016 at 12:07 PM, Rodney Sinclair <[hidden email]> wrote:

Use one of the GPIO pins connected to GND or power on the FTDI device as a front/back indicator.

Rodney


On 06/09/2016 08:55 AM, Michael Eder wrote:
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.






libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Rodney Sinclair

Michael,

The same general principle applies using more than one GPIO pin.

At worst, you can add an I2C I/O expander and set unique ID's using them.

Rodney


On 06/09/2016 09:15 AM, Michael Eder wrote:
Thanks but I actually have more than two FTDI devices

On Thu, Jun 9, 2016 at 12:07 PM, Rodney Sinclair <[hidden email]> wrote:

Use one of the GPIO pins connected to GND or power on the FTDI device as a front/back indicator.

Rodney


On 06/09/2016 08:55 AM, Michael Eder wrote:
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.






libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Ryan Tennill
In reply to this post by Michael Eder
On 06/09/2016 10:55 AM, Michael Eder wrote:

> I have a question related to how one can distinguish between the
> devices when there are multiples of the same FTDI devices plugged into
> a USB hub?
>
> I suspect the answer is to program the FTDI devices with a unique name
> in its EEPROM, but is there a way short of that how I can identify
> what device is plugged in where?
>
> Simple example.  I have two temperature I2C devices that have the same
> fixed I2C address.  I need to use two FTDI devices to talk to each of
> these.    One I2C device is in the front of my boat the other in the
> back.  If I always plugged the front FTDI USB device in the same port
> on the USB hub and the back one also into a particular port could I
> that way know which device is which and, if so, how can I identify the
> usb port with the libftdi?  Would this mechanism work even if I
> plugged and unplugged the devices in at different times, but always to
> their assigned port.
>
> Any suggestions how to best do this greatly appreciated.
>

Is this a Linux/Unix system? If so you should be able to use udev to do
this for you with a little bit of data collection.

The FTDI devices that I've used have a serial number stored in EEPROM
that also shows up in the USB descriptors.
Connect one device at a time and see what device it creates in /dev
Use "udevadm info --name=/dev/SOME_DEVICE --attribute-walk" to see the
udev info for your devices which should include
something like this:
> ATTRS{serial}=="FTV6IFNT"

With this information, you can write a udev rule to create a symbolic
link in /dev that makes them easily identifiable.

Here's an example that use for a system that has an FT230 and a UB232R.
SUBSYSTEM=="tty",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{product}=="UB232R",GROUP="plugdev",SYMLINK+="ttyUSB.lcd"

You could try something like this after updating the idProduct, serial,
and symlink names as appropriate.

/etc/udev/rules.d/99-i2c-temp-sensors
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNA",GROUP="plugdev",SYMLINK+="i2c.front.1"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNB",GROUP="plugdev",SYMLINK+="i2c.front.2"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNC",GROUP="plugdev",SYMLINK+="i2c.back.1"

Setting the group to plugdev is a convenient way to give your user
access without requiring root/sudo. You may need to add your user to the
group.

Ryan

--

217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Michael Eder
Thanks this seems to be a solution if I can get a unique identifier for my FTDI device.  Problem I see with this approach is that because I am using the I2C I have to unbind  the ftdi_sio driver.  Can I get the unique serial number for the FTDI device through libftdi?

On Thu, Jun 9, 2016 at 12:36 PM, Ryan Tennill <[hidden email]> wrote:
On 06/09/2016 10:55 AM, Michael Eder wrote:
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.


Is this a Linux/Unix system? If so you should be able to use udev to do this for you with a little bit of data collection.

The FTDI devices that I've used have a serial number stored in EEPROM that also shows up in the USB descriptors.
Connect one device at a time and see what device it creates in /dev
Use "udevadm info --name=/dev/SOME_DEVICE --attribute-walk" to see the udev info for your devices which should include
something like this:
ATTRS{serial}=="FTV6IFNT"

With this information, you can write a udev rule to create a symbolic link in /dev that makes them easily identifiable.

Here's an example that use for a system that has an FT230 and a UB232R.
SUBSYSTEM=="tty",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{product}=="UB232R",GROUP="plugdev",SYMLINK+="ttyUSB.lcd"

You could try something like this after updating the idProduct, serial, and symlink names as appropriate.

/etc/udev/rules.d/99-i2c-temp-sensors
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNA",GROUP="plugdev",SYMLINK+="i2c.front.1"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNB",GROUP="plugdev",SYMLINK+="i2c.front.2"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNC",GROUP="plugdev",SYMLINK+="i2c.back.1"

Setting the group to plugdev is a convenient way to give your user access without requiring root/sudo. You may need to add your user to the group.

Ryan

--

<a href="tel:217-351-2655%20ext.%20126" value="+12173512655" target="_blank">217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]   



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Identifying multiple of the same FTDI devices

Michael Eder
Yes I can get it with ftdi_usb_get_strings....Thanks.

On Thu, Jun 9, 2016 at 1:40 PM, Michael Eder <[hidden email]> wrote:
Thanks this seems to be a solution if I can get a unique identifier for my FTDI device.  Problem I see with this approach is that because I am using the I2C I have to unbind  the ftdi_sio driver.  Can I get the unique serial number for the FTDI device through libftdi?

On Thu, Jun 9, 2016 at 12:36 PM, Ryan Tennill <[hidden email]> wrote:
On 06/09/2016 10:55 AM, Michael Eder wrote:
I have a question related to how one can distinguish between the devices when there are multiples of the same FTDI devices plugged into a USB hub?

I suspect the answer is to program the FTDI devices with a unique name in its EEPROM, but is there a way short of that how I can identify what device is plugged in where?

Simple example.  I have two temperature I2C devices that have the same fixed I2C address.  I need to use two FTDI devices to talk to each of these.    One I2C device is in the front of my boat the other in the back.  If I always plugged the front FTDI USB device in the same port on the USB hub and the back one also into a particular port could I that way know which device is which and, if so, how can I identify the usb port with the libftdi?  Would this mechanism work even if I plugged and unplugged the devices in at different times, but always to their assigned port.

Any suggestions how to best do this greatly appreciated.


Is this a Linux/Unix system? If so you should be able to use udev to do this for you with a little bit of data collection.

The FTDI devices that I've used have a serial number stored in EEPROM that also shows up in the USB descriptors.
Connect one device at a time and see what device it creates in /dev
Use "udevadm info --name=/dev/SOME_DEVICE --attribute-walk" to see the udev info for your devices which should include
something like this:
ATTRS{serial}=="FTV6IFNT"

With this information, you can write a udev rule to create a symbolic link in /dev that makes them easily identifiable.

Here's an example that use for a system that has an FT230 and a UB232R.
SUBSYSTEM=="tty",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{product}=="UB232R",GROUP="plugdev",SYMLINK+="ttyUSB.lcd"

You could try something like this after updating the idProduct, serial, and symlink names as appropriate.

/etc/udev/rules.d/99-i2c-temp-sensors
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNA",GROUP="plugdev",SYMLINK+="i2c.front.1"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNB",GROUP="plugdev",SYMLINK+="i2c.front.2"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",ATTRS{serial}=="FTV6IFNC",GROUP="plugdev",SYMLINK+="i2c.back.1"

Setting the group to plugdev is a convenient way to give your user access without requiring root/sudo. You may need to add your user to the group.

Ryan

--

<a href="tel:217-351-2655%20ext.%20126" value="+12173512655" target="_blank">217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]   




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Loading...