LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-21-2010, 12:21 PM   #1
RogueWarrior65
Member
 
Registered: Aug 2010
Posts: 48

Rep: Reputation: 0
Question FTDI USB-to-Serial /dev naming


Is it possible to have the USB system create a /dev entry that more accurately describes the device that is connected? Take for example the FTDI USB-to-Serial device and driver. I may have several completely different devices on a USB hub but they all appear as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, etc. The problem is that today ttyUSB1 may be an RS-232 device from a given manufacturer and tomorrow it may be a USB LCD display from a totally different manufacturer.

USB diagnostic messages will show information about the hardware. Is there a way to have something like /dev/USBLCD and /dev/USBRS232 where the name is based on manufacturer data that the USB system reads?

I know the Mac OSX version of the FTDI driver does this.
 
Old 09-21-2010, 01:56 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Is it possible to have the USB system create a /dev entry that more accurately describes the device that is connected?
Yes.

This is what udev is for.
You need to write a udev rule that can identify your device, by some unique attribute and always assign it a particular symlink eg /dev/specialdevice

Search on udev rules udevadm yourdistroname because different distros use different versions of udev
 
Old 09-21-2010, 02:13 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Unfortunately some devices do not have unique attributes like a serial number. This might help:
http://www.linuxquestions.org/questi...evices-822879/
 
Old 09-21-2010, 02:48 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Originally Posted by michaelk View Post
Unfortunately some devices do not have unique attributes like a serial number. This might help:
http://www.linuxquestions.org/questi...evices-822879/
True, but I am not sure that this is the OP's problem.

And the link you posted, though relevant and interesting, remains "unresolved", with no follow-up.

Here is where I tried to explain how different USB devices that report themselves as "identical" (pl2303 comes to mind) could be differentiated by their physical location on the USB system. The downside is that you will always have to plug a particular device (that stupidly reports itself as identical to other devices, even though it isn't) into a particular, real, USB port connector.

Again, there has been no follow-up, so I do not know if the problem has been resolved.
 
Old 09-22-2010, 09:56 PM   #5
RogueWarrior65
Member
 
Registered: Aug 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Question

Okay, great, udev rules are what I'm looking for.

But can you do the same thing in mdev from Busybox?
 
Old 09-23-2010, 04:05 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Okay, great, udev rules are what I'm looking for.
But can you do the same thing in mdev from Busybox?
I don't run Busybox so I have have no idea. mdev isn't even installed on my PC.

Can't you do your own research?

Then post here with the specific problems you encounter.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino no /dev/ttyUSB* on Ubuntu 9.04 amd64 nor Arch 64 (ftdi chip) viroos Linux - Hardware 0 05-05-2009 03:21 PM
USB serial driver(ftdi): there is error in receive data plumnut Linux - Newbie 0 03-23-2009 06:30 AM
ftdi serial to usb converter rightsidedown Linux - Hardware 1 04-29-2008 04:36 PM
glcd + ftdi + usb tooly Linux - Hardware 1 09-25-2005 11:47 AM
serial to USB, trying to read from /dev/ttyUSB0 in C code newguy21 Programming 1 09-29-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration