Quantcast

open from device string

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

open from device string

Axelrod, Ben

I see a number of functions to open the ftdi interface based on various things.  How would I go about opening the ftdi interface based on a user input string such as “/dev/ttyUSB0” or similar alias?  I only need to do this on Linux, specifically Ubuntu. 

 

If I can’t do this directly through the ftdi interface, what is the easiest way to use other tools to convert “/dev/ttyUSB0” into “0403:6001” through code?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[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: open from device string

E.S. Rosenberg
// My experience with libusb/libftdi is limited so I may be sending you on a wild goose chase.

What I would think you would end up doing is opening that device node not using libftdi, extracting its' serial number and then opening it using libftdi.


2014-06-10 17:19 GMT+03:00 Axelrod, Ben <[hidden email]>:

I see a number of functions to open the ftdi interface based on various things.  How would I go about opening the ftdi interface based on a user input string such as “/dev/ttyUSB0” or similar alias?  I only need to do this on Linux, specifically Ubuntu. 

 

If I can’t do this directly through the ftdi interface, what is the easiest way to use other tools to convert “/dev/ttyUSB0” into “0403:6001” through code?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" value="+17814303315" target="_blank">(781) 430-3315

[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: open from device string

Matthias Janke-2
In reply to this post by Axelrod, Ben
Just read serial from  /sys/bus/usb-serial/devices/ttyUSB0/../../serial

Cheers,
Matthias

Am Tue, 10 Jun 2014 14:19:23 +0000
schrieb "Axelrod, Ben" <[hidden email]>:

> I see a number of functions to open the ftdi interface based on various
> things.  How would I go about opening the ftdi interface based on a user input
> string such as "/dev/ttyUSB0" or similar alias?  I only need to do this on
> Linux, specifically Ubuntu.
>
> If I can't do this directly through the ftdi interface, what is the easiest way
> to use other tools to convert "/dev/ttyUSB0" into "0403:6001" through code?
>
> Thanks,
> Ben
>
> Ben Axelrod
> Sr. Robotics Software Engineer
> iRobot Corporation
> 8 Crosby Drive, M/S 8-1
> Bedford, MA 01730
> (781) 430-3315
> [hidden email]<mailto:[hidden email]>
>
>
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to [hidden email]  
>


--
---------------------------------------------------------------------
 Dipl.-Phys. Matthias Janke

 Physikalisches Institut der Universität Heidelberg
 Im Neunheimer Feld 226
 69120 Heidelberg
 Deutschland

 Tel:    +49 (6221) 54 19 45 6
 Fax:    +49 (6221) 54 19 54 0
 E-Mail: [hidden email]

 Büro: 02.209
---------------------------------------------------------------------

--
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: open from device string

Ryan Tennill
In reply to this post by Axelrod, Ben




On Tue, 2014-06-10 at 14:19 +0000, Axelrod, Ben wrote:
I see a number of functions to open the ftdi interface based on various things.  How would I go about opening the ftdi interface based on a user input string such as “/dev/ttyUSB0” or similar alias?  I only need to do this on Linux, specifically Ubuntu. 

 

If I can’t do this directly through the ftdi interface, what is the easiest way to use other tools to convert “/dev/ttyUSB0” into “0403:6001” through code?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[hidden email]

 







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



If it's available on your system I would actually recommend /dev/serial/by-id:


$ tree /dev/serial/by-id/
/dev/serial/by-id/
├── usb-FTDI_FT232R_USB_UART_A101E3RD-if00-port0 -> ../../ttyUSB4
├── usb-FTDI_FT232R_USB_UART_AM01MJHY-if00-port0 -> ../../ttyUSB2
├── usb-FTDI_FT232R_USB_UART_AM01MJJ0-if00-port0 -> ../../ttyUSB1
├── usb-FTDI_FT232R_USB_UART_AM01MJJ5-if00-port0 -> ../../ttyUSB3
└── usb-FTDI_FT232R_USB_UART_AM01MJJ7-if00-port0 -> ../../ttyUSB0

Ryan

Distant Focus Corporation
Champaign, IL 61822
217-351-2655 x126
http://distantfocus.com/projects/


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


Loading...