Results 1 to 10 of 13
Hi all,
does anybody know how to develop a USB Device Driver in User Space. I have already read many articles from Linux Journal.
But what I want is a ...
- 05-21-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 11
USB Device Driver Development
Hi all,
does anybody know how to develop a USB Device Driver in User Space. I have already read many articles from Linux Journal.
But what I want is a way to develop a USB Device Driver that resides partially in Kernel Space and partially in User Space. And then an application accesses this User Space Driver and then carries out some operations.
Any kind of suggestions are invited. Please do help me.
Regards
Ameya VermaLast edited by ameya.verma; 05-21-2008 at 05:44 AM. Reason: ddd
- 05-21-2008 #2Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
I am not excatly getting you. But you can implement
ioctl function in the usb driver and give commands from user space programs.
- 05-21-2008 #3Just Joined!
- Join Date
- Apr 2008
- Posts
- 11
hi Digvijay,
what i wanted to say was basically a User Space Device Driver has two part....One part resides with the kernel itself which is responsible for registering the Device and the Driver with the Kernel (Entry in devfs /dev/)....and a second part which is in User Space which interacts with the Device Entry in the devfs.....and then there is an application which interacts with this User Space part and carry out some Operations.....plz suggest whether what I am thinking is right or not and plz suggest a war around......
- 05-21-2008 #4Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
You go through last section of:-
http://lwn.net/images/pdf/LDD3/ch02.pdf
The user space driver also rely on some generic functionality which is provided by kernel drivers.
But some drivers are there which are completely user space based.
The USB scanner driver is on examaple of this.
- 05-21-2008 #5
OT,but related to USB - Do you know what's the file system used in USB
Is ext2/3 used there? or something else- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 05-21-2008 #6Just Joined!
- Join Date
- Apr 2008
- Posts
- 11
hi Digvijay,
thanx for the reply....so can there be a way of writing a USB Driver that comply to the requirements I have given above (One part residing in the Kernel and the second part residing in the User Space).....plz do reply
Regards
Ameya Verma
- 05-21-2008 #7Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
I am sure this link will help you a lot.
http://lwn.net/images/pdf/LDD3/ch13.pdf
You can write USB driver that way. But you need to be aware of Specification of the USB device you are going to program
- 05-21-2008 #8Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
I would look into the FUSE stuff. It has a kernel part, but the actual FUSE base stuff (ntfs3g, sshfs, etc) are implemented in userland. It might serve you as an example or even as a base.
You can format an usb drive on whatever format you like, just like any other block device (or even file). The only problem is that USB devices are meant to be portable amongst as many oses as possible. That's why most people format them using FAT or NTFS. But you can use any other fs if you think it's better for you.
- 05-22-2008 #9
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 05-22-2008 #10Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
I don't understand the question. Faster than __________?
In principle, USB is not the fastest thing. If you mean that it's faster than to transfer from one hard disk to another, then that amazes me, unless your hard drives are not using DMA which would surprise me nowadays because most distros can handle that out of the box.
If you copy files within the same hard disk, then it might be a filesystem or IDE/SATA controller issue. Or maybe your hard drive is ancient.
Generally, transferring data between two drives is faster than copying it from one location to another within the same drive, that's because the I/O is distributed and while one device reads the other is free to write. But it all depends on the concrete device and many other factors, generalizations are never correct 100%.


Reply With Quote
