Results 1 to 3 of 3
Hi Everybody,
I am new to Linux. I have to write a C library which has to detect USB device such as Mass Storage devices that has been inserted/removed. And ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-06-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 2
How to detect USB drives that has been inserted/removed?
Hi Everybody,
I am new to Linux. I have to write a C library which has to detect USB device such as Mass Storage devices that has been inserted/removed. And it has to notify to a Java application with Mass Storage Device's Label, Device ID. And as well as once it has been identified, it has to mount to a location and it has to send the mounted location to Java App.
I have tried using iNotify and by reading /proc/partitions. But i didnt succeed. Because iNotify is not giving notification for /proc/partitions as well as i m unable to read /proc/partitions through File IO in C.
Or Is there any built-in library which we can register for USB notification?
Please provide me suggestion to accomplish this task.
Thanks and Regards,
Nats.
- 04-05-2010 #2Just Joined!
- Join Date
- Apr 2010
- Posts
- 1
RE: Java USB Detection
Were you able to find a solution that reports a USB device to your java application?
Chad
- 04-05-2010 #3forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Hello and welcome, Chad!

This thread is very old so please start a new one of your own if you are having issues that need to be resolved.
Thanks.oz



