Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to differentiate a USB HDD from a USB Pen driver from my application by just reading the USB device/interface descriptors. I observed in both the cases the following are the same:
Device Class - 0x00
InterfaceClass - 0x08
InterfaceSubClass - 0x06
InterfaceProtocol - 0x50
That why I am not able to distinguish these two.
Ok, even if I use LibUSB, can you tell me how can I identify if the inserted device is Hard disk or Pen drive? Only thing I can tell that the inserted device is Mass Storage Device. That also from the Interface Class number.
Ok let me give you all the information behind my question.
I want to write an application which will identify any inserted or attached USB device without using LibUSB. From the Sysfs my applicatin can retrieve all the USB related information (i.e. device descriptors) about all the connected USB devices. From the device descriptors, the application can easily identify whether the connected device is USB mouse or USB BT Dongle or USB Mass Storage Device, but what it couldn't identify is whether the connected Mass storage device is USB HDD or USB Pen Drive as in both the cases, all the device descriptors are same.