Skip to contentSkip to conversation

How to configure the tty with a usb serial device

DISCUSSION scott 2 participants 2 messages Nov 26, 2006 – Nov 28, 2006

lore
Share & tools
lore

scott

author
#0 lore raw

Hello,

Is hotplug the right place to set up (e.g. stty ispeed 4800) a USB serial device? I can see that after udev runs and creates the /dev/tts/USB0, the only call left to hotplug is with a type of tty. But I have no tty.agent (of course I can cp usb.agent tty.agent which I've done), but what would be the equivalent of usbmodules? Also how can hotplug "know" the /dev/tts/USBx device that was created by the udev rule, there doesn't seem to be any environment variable for that?

kernel 2.6.15.4

Here is a section of debug:

Nov 26 20:34:32 calera default.hotplug[7676]: no runnable 
/etc/hotplug/usb-serial.agent is installed
Nov 26 20:34:32 calera kernel: drivers/usb/serial/usb-serial.c: USB 
Serial support registered for pl2303
Nov 26 20:34:32 calera kernel: pl2303 1-1:1.0: pl2303 converter detected
Nov 26 20:34:32 calera kernel: usb 1-1: pl2303 converter now attached to 
ttyUSB0
Nov 26 20:34:32 calera kernel: usbcore: registered new driver pl2303
Nov 26 20:34:32 calera kernel: drivers/usb/serial/pl2303.c: Prolific 
PL2303 USB to serial adaptor driver
Nov 26 20:34:32 calera default.hotplug[7689]: testing debug
Nov 26 20:34:32 calera udev[7695]: udev_rules.c: rule applied, 'ttyUSB0' 
becomes 'tts/USB0'
Nov 26 20:34:32 calera udev[7695]: udev_add.c: creating device node 
'/dev/tts/USB0'
Nov 26 20:34:32 calera default.hotplug[7689]: arguments (tty) env 

(PHYSDEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0/ttyUSB0 SUBSYSTEM=tty OLDPWD=/ DEVPATH=/class/tty/ttyUSB0 MINOR=0 PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION­d PWD=/etc/hotplug MAJOR8 HOME=/
SHLVL=2 PHYSDEVDRIVER=pl2303 DEBUG=yes PHYSDEVBUS=usb-serial SEQNUMf1
_=/usr/bin/env)

Nov 26 20:34:32 calera default.hotplug[7689]: invoke 
/etc/hotplug/tty.agent ()
Nov 26 20:34:32 calera tty.agent[7689]: testing debug
Nov 26 20:34:32 calera tty.agent[7689]: load_drivers for tty and module
Nov 26 20:34:32 calera tty.agent[7689]: lister is /sbin/ttymodules
Nov 26 20:34:32 calera tty.agent[7689]: mapfile is /etc/hotplug/usb.usermap
Nov 26 20:34:32 calera tty.agent[7689]: device is
Nov 26 20:34:32 calera tty.agent[7689]: drivers is
Nov 26 20:34:32 calera tty.agent[7689]: ... no modules for USB product

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 4 lines · scott

Hello,

Is hotplug the right place to set up (e.g. stty ispeed 4800) a USB serial device?

Probably not, as most modern distros don't even use hotplug anymore :)

Quoted 6 lines

I can see that after udev runs and creates the /dev/tts/USB0, the only call left to hotplug is with a type of tty. But I have no tty.agent (of course I can cp usb.agent tty.agent which I've done), but what would be the equivalent of usbmodules? Also how can hotplug "know" the /dev/tts/USBx device that was created by the udev rule, there doesn't seem to be any environment variable for that?

udev can handle this properly, try that instead.

good luck,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel