LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-06-2008, 12:46 PM   #1
mermaid2008
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
usb device driver using usb-skeleton.c


Hi,

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.
 
Old 12-07-2008, 06:55 PM   #2
RageAgainstTheWindows
LQ Newbie
 
Registered: Dec 2008
Location: Finland
Posts: 11

Rep: Reputation: 0
Here might be some useful information...?
http://www.linuxjournal.com/article/4786
 
Old 03-23-2010, 03:53 PM   #3
saurabh nigam
Member
 
Registered: Feb 2009
Location: @ /home & @ my blog at http://saurabh-nigam.blogspot.com/
Distribution: Slackware , Fedora , Ubuntu
Posts: 35

Rep: Reputation: 15
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!
 
Old 03-24-2010, 01:32 PM   #4
saurabh nigam
Member
 
Registered: Feb 2009
Location: @ /home & @ my blog at http://saurabh-nigam.blogspot.com/
Distribution: Slackware , Fedora , Ubuntu
Posts: 35

Rep: Reputation: 15
Well I blacklisted usb-storage module.Iam still having problems testing the code usb-skeleton.c.
I am inserting usb-skeleton module as
Code:
Code:
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
Code:

Code:
# mknod -m 666 /dev/skeleton c 32 0
The usb-skeleton.c I am having is @linuxhq.com/kernel/ v2.6/32/drivers/usb/usb-skeleton.c"]usb-skeleton.c
Do I really need to assign a specific device >pls help
 
Old 03-24-2010, 01:33 PM   #5
saurabh nigam
Member
 
Registered: Feb 2009
Location: @ /home & @ my blog at http://saurabh-nigam.blogspot.com/
Distribution: Slackware , Fedora , Ubuntu
Posts: 35

Rep: Reputation: 15
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 http://www.linuxhq.com/kernel/v2.6/3...usb-skeleton.c
Help!

Last edited by saurabh nigam; 03-28-2010 at 11:30 AM.
 
  


Reply

Tags
device, driver, usb, using


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive not working properly, read only device? (USB key storage device) Arodef Linux - Hardware 14 01-01-2010 07:32 AM
Device driver for USB storage device linuxdeveloper29 Linux - Hardware 1 10-24-2008 08:30 AM
How to force kernel to use a USB 2.0-compatible device (ehci_hcd) as a USB 1.1 device eze Linux - Hardware 0 05-16-2006 05:24 AM
usb skeleton driver question infamous41md Programming 2 03-12-2004 02:34 PM
HP Deskjet (USB) & CUPS & Slackware 9.1: Unable to open USB device "usb:/dev/usb/lp0&qu arnostienen Slackware 2 01-29-2004 03:22 PM


All times are GMT -5. The time now is 05:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration