I think, try to see code of The USB Monitor specially file mon_main.c Try to develop your own application driver, also enable /proc interface, In case you want to check from command prompt about the status of usb device like Memory stick connected to your linux usb host. Also user space application can use /proc interface Vbus and D- or D+ are directly manipulated by USB Host drivers, that is not your requirement. So better use similar application driver which speak to Linux USB Core layer. Regards Vivek -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of V.Ravikumar Sent: Sunday, September 21, 2008 8:38 PM To: Nalajala Murali Cc: kernelnewbies@xxxxxxxxxxxx Subject: Re: Automatic USB drive detection/Disconnection in user application!!! You can find this information in syslogd message or using dmesg command. Also have a look at API klogctl() which reads kernel log message in that you can find file system mapping of usb device.But you need to parsing on the the data Take some information of newly detected sb device from /proc/usb/bus/devices,using this info search for device mapping in the buffer collected using klogctl. This is the one way. Regards, Ravikumar On 9/21/08, Nalajala Murali <nalajala.murali@xxxxxxxxx> wrote: > The file has the information which i am not interested.It does not > have any information to which it ( USB ) is mapped in the filesystem ( > sd[a-z][1-9]* ). > > On Sun, Sep 21, 2008 at 11:02 AM, V. Ravikumar > <ravikumar.vallabhu@xxxxxxxxx> wrote: >> Please look into /proc/bus/usb/devices file newly plugged in/off usb >> devices >> Also go through Documentation/usb/usbmon.txt >> >> Regards, >> Ravikumar. >> On 9/19/08, Nalajala Murali <nalajala.murali@xxxxxxxxx> wrote: >>> Hi All, >>> I need a solution for the below problem. >>> >>> When the USB got detected by the kernel ( Linux ) i am not able to >>> figure it out to where it is mapped on my dev file system. Please let >>> me know how will i come to know to where my USB is mapped using the C >>> routine!!! Is there any provision to call some kernel related >>> functions so that i cae to know where it mapped? Also how do i know ( >>> application ) the USB disconnection? >>> >>> Also i heard few solutions for the above problem like, "Query HAL over >>> Dbus" and reading information from "libsysfs" library.Though first one >>> is pretty good i don't know how to use Dbus in my application ( it bit >>> confused me ).If any one propose any better solutions that would be >>> very helpful. >>> >>> Thanks for your help. >>> >>> Murali >>> >>> -- >>> To unsubscribe from this list: send an email with >>> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx >>> Please read the FAQ at http://kernelnewbies.org/FAQ >>> >>> >> > > > > -- > Regards, > Murali N > +91-9886743171 > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ