linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unable to run a user program on usb device connection
@ 2007-10-05 12:30 shankoo77
  2007-10-08  4:10 ` shankoo77
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: shankoo77 @ 2007-10-05 12:30 UTC (permalink / raw)
  To: linux-hotplug

Hi,
    I'm a newbie to Linux hotplug sub-system. I want
to hook a user space application with the hot plug
sub-system in such a way that the application is
executed on attaching a specific USB device. I've
explained what all I tried, please let me know where
I'm going wrong.

My linux kernel version is 2.6.10 and it uses the
“udev” mechanism to support hot plug.  Our application
should be executed when a device with a specific
vendor id and product id is plugged in the USB bus.
I’ve enabled the hot plug support in the kernel; in
fact by default CONFIG_HOTPLUG was enabled. I included
a test.rules file in the /etc/udev/rules.d/ directory
in which I have included the above mentioned vendor
id, product id and in the PROGRAM parameter the name
of the application to be run. To start with, this
program is just a shell script that prints “Hello
World” on the console. After this, when we plug in the
above mentioned device I’m sure that the kernel has
detected it because I’m seeing the device’s
information in /proc/bus/usb/devices. But our shell
script is not getting called at all. Can some one let
me know what I'm missing here? The test.rules file
contains the following line only

ATTR{idVendor}="0451", ATTR{idProduct}="97fb",
SYMLINK+="hello-%k", MODE="666",
PROGRAM="/home/shankar/usb_disp.sh"

Thanks in Advance,
Shankar










       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-19  4:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 12:30 Unable to run a user program on usb device connection shankoo77
2007-10-08  4:10 ` shankoo77
2007-10-08 13:16 ` shankoo77
2007-10-09  4:59 ` Nazim Khan
2007-10-10  5:38 ` shankoo77
2007-10-11  3:42 ` Greg KH
2007-10-19  4:20 ` shankoo77

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).