Hi. I have a few question about USB on linux. Firstly, how do I know which file descriptor in the /dev/ section is USB? Secondly, how can I write raw code to it? Would I have to write a kernel level driver?
Hi. I have a few question about USB on linux. Firstly, how do I know which file descriptor in the /dev/ section is USB? Secondly, how can I write raw code to it? Would I have to write a kernel level driver?
USB devices begin with "s", eg storage devices are sd. Stuff like this is listed here:
http://www.kernel.org/pub/linux/docs...vices-2.6+.txt
Pretty sure there is a copy in with the kernel source.
Yep.Secondly, how can I write raw code to it? Would I have to write a kernel level driver?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
examples of writing a USB driver?
Heh-heh.
Linux Device Drivers, Third Edition [LWN.net]
Major issue will be the nature of the device itself. You communicate via "endpoints" that functional aspects of the hardware, so you almost certainly need the specifications for it. You can get the standards for such here:
USB.org - Documents
but the actual specific ones you need to get from the manufacturer. The above link will help you to understand them, once you have read up enough about (usb) drivers. So this is a fairly serious undertaking.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Actually there is something known as "scsi pass through", that uses ioctl calls to send scsi control messages to usb devices available on Linux. It gives you kernel space control over a usb device from user space.