-   Linux - Newbie (
-   -   usb device driver using usb-skeleton.c (

mermaid2008 12-06-2008 01:46 PM

usb device driver using usb-skeleton.c

We are planing to write a usb device driver on the
host. The driver should support read and write operations.
We used the usb-skeleton.c
we removed the existing usb-storage.ko and placed
the .ko of usb-skeleton.c.
The following were the observations
1)When we plug in the usb device(mass storage)
The probe function is getting invoked and the device is
getting detected and registered.

2)A device file named skel0 gets created. Its a char file

The problems that we encounterd are:
1) The device is getting detected, but the read and write
to the device are not working. when I try to write some data
the logs say that the data is getting transferrred but I dont see
any data written in the device.
2) Is this the right approach??
3) The usb-skeleton.c Does not have any interaction with scsi,
Is it because of that the data trans fer is not working?
4) How should i know if the device is a part of MSC

Thank You.

RageAgainstTheWindows 12-07-2008 07:55 PM

Here might be some useful information...?

saurabh nigam 03-23-2010 04:53 PM

Problem testing usb-skeleton driver
So now I have a driver similar to usb-skeleton.c.But I dont know how to remove the previous usb-storage module to test my new module on my usb drive.
whnever I plug-in my usb device dmesg shows active usb-storage module.Do I need to have the device of a specific name like /dev/skeleton.
Your helps are welcome!

saurabh nigam 03-24-2010 02:32 PM

Well I blacklisted usb-storage module.Iam still having problems testing the code usb-skeleton.c.
I am inserting usb-skeleton module as

insmod usb-skeleton.ko
but then when i lsmod the module is used by 0.
that means it cannot get the device.
Do I need to craete device entry something like


# mknod -m 666 /dev/skeleton c 32 0
The usb-skeleton.c I am having is v2.6/32/drivers/usb/usb-skeleton.c"]usb-skeleton.c
Do I really need to assign a specific device >pls help

saurabh nigam 03-24-2010 02:33 PM

Problem testing usb-skeleton driver
please help me at this stage I'am clueless as I have no information how to make the usb-skeleton driver run.
Here is the ile I tried to run

All times are GMT -5. The time now is 03:44 PM.