LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-12-2009, 12:57 PM   #1
Penguin01
LQ Newbie
 
Registered: Dec 2009
Posts: 23

Rep: Reputation: 15
Arrow usb-skeleton.c help???


Hi,

I am trying to modify usb-skeleton.c so that when I enter my USB into my machine, it will detect it and display a message - like "Hello World!".
I have managed to do it using commands like:
sudo insmod ./usb-skeleton.ko
dmesg | tail
and it works, but I want the drivers to load without having to enter this. So that when I enter my USB it will display a message.

From what I know I need the ProductID and VendorID (of my USB), in order to do this and I have found http://www.linux-usb.org/usb.ids this shows the VendorID.

But by changing the VendorID and ProductID will I be able to enter my USB device and have it detected by my modified usb-skeleton.c? Or are there more configurations I need to do?

I am running Ubuntu - Linux version 2.6.28-17-generic (buildd@rothera) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #58-Ubuntu


Thanks!
 
Old 12-15-2009, 07:47 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The "hotplug" daemon can already generate any sort of response you may want, including "hello, world!" when a USB device is inserted.

Normally, "hotplug" is used to auto-load the necessary device driver modules when a removable device is added to the system.
 
  


Reply



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 device driver using usb-skeleton.c mermaid2008 Linux - Newbie 5 05-22-2016 03:15 AM
where is the skeleton directory for subdomain? koka Linux - Newbie 2 10-21-2005 05:32 PM
slackware 10 useradd skeleton.. miguetoo Slackware 2 06-25-2004 01:50 AM
Skeleton directories for new users? jungatheart Linux - Newbie 2 04-24-2004 03:44 PM
usb skeleton driver question infamous41md Programming 2 03-12-2004 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:27 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration