LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2008, 08:10 AM   #1
linuxdeveloper29
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Rep: Reputation: 0
writing driver for USB storage media


I am new to Linux. I want to customize/write a device driver for USB storage device that can manipulate on the data before writing it to the USB device. Can someone help me by providing samples or pointers to the USB source code which I can modify to my requirement.

Also please guide me through how to install the driver and get it running. Thanks in advance!!
 
Old 10-24-2008, 08:26 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by linuxdeveloper29 View Post
I am new to Linux. I want to customize/write a device driver for USB storage device that can manipulate on the data before writing it to the USB device. Can someone help me by providing samples or pointers to the USB source code which I can modify to my requirement.

Also please guide me through how to install the driver and get it running. Thanks in advance!!
The source code is available online, from many different places, all easily found through Google (like http://www.kernel.org/ and http://www.linux.org/).

Since you're already a developer, you already know how to write code, compile it, and make a working module. To load it, just type "modprobe <your module name>".
 
Old 10-24-2008, 10:19 AM   #3
linuxdeveloper29
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply. I am actually new to linux. I want to know if if it is possible to write a driver in C++ or is there already a USB storage device driver written in C++ which I can refer to. I tried searching in google but couldn't find anything relevant.
 
Old 10-24-2008, 12:31 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by linuxdeveloper29 View Post
Thanks for the reply. I am actually new to linux. I want to know if if it is possible to write a driver in C++ or is there already a USB storage device driver written in C++ which I can refer to. I tried searching in google but couldn't find anything relevant.
Yes, and I gave you two links to the source code. There is tons of source code available with an easy Google search, and you can probably find source code for your particular distro on the installation media/repositories already.

USB storage has been supported already for years.
 
Old 10-24-2008, 12:48 PM   #5
newtolinux29
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
I did some googling and found few source code for USB driver. My requirement is to enrypt/decrypt the data that is written to the USB driver. I have the code for this. I thought of plugging this in the USB driver. I read that the USB driver runs in the kernel mode. Is it possible to do the encryption/decryption from the driver code?

PS: I dont prefer to write a wrapper for the driver and use a special application to write data to the disk. I could use the legacy way of writing to the disk with encryption achieved at the device driver level.
 
  


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
Device driver for USB storage device linuxdeveloper29 Linux - Hardware 1 10-24-2008 08:30 AM
USB Storage Device Driver netwizio Programming 3 12-03-2007 01:41 AM
Writing to USB Storage is SLOOWWW njdube SUSE / openSUSE 2 04-27-2006 04:23 AM
Sony USB Storage Media USM128DS Ed_999 Slackware 1 02-28-2005 03:54 PM
Transfer and mass storage usb driver spec6635 Slackware 4 01-05-2005 05:59 AM

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

All times are GMT -5. The time now is 11:12 PM.

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