Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I create serial devices automatically?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dargosch
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 101

PostPosted: Fri Feb 02, 2007 12:09 pm    Post subject: How do I create serial devices automatically? Reply with quote

Hi,

I have a problem with automatically creating serial port devices. I used to have this problem:

Code:

theodor dev # ls ttyS* -al
lrwxrwxrwx  1 root root 5 26 jan 09.09 ttyS0 -> tts/0
lrwxrwxrwx  1 root root 5 26 jan 09.09 ttyS1 -> tts/1
lrwxrwxrwx  1 root root 5 26 jan 09.09 ttyS2 -> tts/2
lrwxrwxrwx  1 root root 5 26 jan 09.09 ttyS3 -> tts/3
theodor dev # ls tts/* -al
lrwxrwxrwx  1 root root 8 26 jan 09.09 tts/0 -> ../ttyS0
lrwxrwxrwx  1 root root 8 26 jan 09.09 tts/1 -> ../ttyS1
lrwxrwxrwx  1 root root 8 26 jan 09.09 tts/2 -> ../ttyS2
lrwxrwxrwx  1 root root 8 26 jan 09.09 tts/3 -> ../ttyS3


which is no good for syncing my old serial palm pilot. Now, I have found that I may correct the situation by doing this:

Code:

theodor ~ # rm /dev/tts/0
theodor ~ # /bin/mknod /dev/tts/0 c 4 64
theodor ~ # chmod 777 /dev/tts/0
theodor ~ # ls -al /dev/pilot0 /dev/tts/* /dev/ttyS*
lrwxrwxrwx  1 root root     5  2 feb 08.44 /dev/pilot0 -> ttyS0
crwxrwxrwx  1 root root 4, 64  2 feb 11.50 /dev/tts/0
lrwxrwxrwx  1 root root     8  2 feb 08.44 /dev/tts/1 -> ../ttyS1
crwxrwxrwx  1 root root 4, 64 30 jan 11.58 /dev/tts/10
lrwxrwxrwx  1 root root     8  2 feb 08.44 /dev/tts/2 -> ../ttyS2
lrwxrwxrwx  1 root root     8  2 feb 08.44 /dev/tts/3 -> ../ttyS3
lrwxrwxrwx  1 root root     5  2 feb 08.44 /dev/ttyS0 -> tts/0
lrwxrwxrwx  1 root root     5  2 feb 08.44 /dev/ttyS1 -> tts/1
lrwxrwxrwx  1 root root     5  2 feb 08.44 /dev/ttyS2 -> tts/2
lrwxrwxrwx  1 root root     5  2 feb 08.44 /dev/ttyS3 -> tts/3


Now everything works, and kpilot happily reports that

Code:

11:49:50 Trying to open device /dev/pilot0...
11:49:50 Device link ready.


and I can sync. Now, the problem is.. how do I do this in UDEV? I'll need to


  1. Create the device node at /dev/tts/0
  2. Change the permissions so that it is writable


How do I do this?

/Fredrik
_________________
Registered Linux user #163029 http://counter.li.org/
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Fri Feb 02, 2007 12:24 pm    Post subject: Reply with quote

do you have any ttyUSB entries in dev? you might want to try those... but in any case the file you want is /etc/udev/rules.d/50-rules-something-or-other... and you'll want to make it have either users group permission or usb users group, and add yourself to the appropriate group.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
dargosch
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2003
Posts: 101

PostPosted: Fri Feb 02, 2007 12:30 pm    Post subject: Reply with quote

bunder wrote:
do you have any ttyUSB entries in dev? you might want to try those... but in any case the file you want is /etc/udev/rules.d/50-rules-something-or-other... and you'll want to make it have either users group permission or usb users group, and add yourself to the appropriate group.

cheers


Thank you for your quikc reply.

However, I fail to see what USB has to do with it? Do you mean to say that the old-school serial ports have been misstaken for USB ports?

/Fredrik
_________________
Registered Linux user #163029 http://counter.li.org/
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/
Back to top
View user's profile Send private message
_MacBaum_
n00b
n00b


Joined: 15 Oct 2006
Posts: 17

PostPosted: Fri Feb 02, 2007 1:33 pm    Post subject: Reply with quote

You can somehow (somehow is depending on your udev-version) create nodes automatically with VendorID and ProductID (get ids with lsusb)
or Bus-topology (does the Palm somehow identify himself as a "unique item"?).

I want to write some rules to fix my USB-Devices to constant nodes.

Perhaps this helps:
http://www.reactivated.net/writing_udev_rules.html


Last edited by _MacBaum_ on Fri Feb 02, 2007 1:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
_MacBaum_
n00b
n00b


Joined: 15 Oct 2006
Posts: 17

PostPosted: Fri Feb 02, 2007 1:36 pm    Post subject: Reply with quote

Note to self: Learn to klick the mouse.

Please delete.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Feb 02, 2007 1:50 pm    Post subject: Reply with quote

dargosch wrote:
old-school serial ports

That makes it a bit more interesting. Here's my USB Palm setup.

I expect that udev "wakes up" and creates the devices only during a hotsync, as with USB. So, put udev into debugging mode and check its logs.
Back to top
View user's profile Send private message
_MacBaum_
n00b
n00b


Joined: 15 Oct 2006
Posts: 17

PostPosted: Fri Feb 02, 2007 1:56 pm    Post subject: Reply with quote

PaulBredbury wrote:

I expect that udev "wakes up" and creates the devices only during a hotsync, as with USB. So, put udev into debugging mode and check its logs.


Try udevstart
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Feb 02, 2007 2:07 pm    Post subject: Reply with quote

_MacBaum_ wrote:
Try udevstart

Why? Udev is always running as a daemon. The intention is to notice the Palm in udev's logs, so that a udev rule for it can be written.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Fri Feb 02, 2007 11:59 pm    Post subject: Reply with quote

dargosch wrote:
bunder wrote:
do you have any ttyUSB entries in dev? you might want to try those... but in any case the file you want is /etc/udev/rules.d/50-rules-something-or-other... and you'll want to make it have either users group permission or usb users group, and add yourself to the appropriate group.

cheers


Thank you for your quikc reply.

However, I fail to see what USB has to do with it? Do you mean to say that the old-school serial ports have been misstaken for USB ports?

/Fredrik


i believe they use the same driver. the s in usb does stand for serial. :wink:
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum