LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-16-2009, 03:29 AM   #1
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Rep: Reputation: 15
Steps to write a device driver


Hi to all,
I want to create a device driver for dummy modem in linux,

I don't know anything about creating device drivers,
can any one you please tell me that what are steps to follow to write a device driver

please tell me clearly(steps to follow) bocz i am new to linux

Thanx and regards
 
Old 11-16-2009, 03:55 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,193

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Wow, talk about jumping in at the deep end. Are you doing this just as a academic exercise, or is this "dummy modem" (?) something that you actually need to get working. Since you say you are new to Linux and know nothing about writing device drivers I think yo may be in for a really tough time.

Anyway googling "writing linux device drivers" resulted in a number of promising links. Did you read any of them yet?

Cheers,

Evo2.
 
0 members found this post helpful.
Old 11-16-2009, 05:44 AM   #3
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
Also - I'm unclear about what you are writing.

A common, dial up analog modem is something that connects to a serial port. You'd write a device driver for that, not for the modem per se. Many introductory device driver books use serial and parallel ports as simple examples, so if that's indeed what you want to do, you should be able to find that easily.

If that's not it, you should say what it is you want to accomplish. Maybe you don't need to write a device driver at all.
 
0 members found this post helpful.
Old 11-22-2009, 03:34 AM   #4
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 15
Hi sir
Actually my project is to implement communication between server and client using CDMA modem (both SMS and call)
now i have only one modem and i don't have another modem .
for that i want to create a driver for dummy modem (dev/CDMA) in the client side so that modem at the server side will send SMS commands to the client , on the other side my dummy modem has to receive that SMS
Can any one tell me to create a device driver for dummy modem on the client side , so that it has to receive SMS from server side
Please tell me the how i need to approach for my project
please help me for my project as soon as possible

Thanx and Regards
Ramakrishna
 
1 members found this post helpful.
Old 11-22-2009, 06:30 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Moved: This thread is more suitable in Programming and has been moved accordingly to help your question get the exposure it deserves.
 
0 members found this post helpful.
Old 11-22-2009, 07:48 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by trkecea View Post
please help me for my project as soon as possible
Around here, that means whenever we happen to get around to it. Sometimes you have to be patient....

What textbooks or other reference material are you using? One of the standard books is this:
http://oreilly.com/catalog/9780596005900

I think you will find it free online----just enter "linux device drivers" in Google.

I assume you have some other programming experience. Device drivers is a fairly specialized area.

Last edited by pixellany; 11-22-2009 at 08:19 AM.
 
Old 11-25-2009, 09:42 AM   #7
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 15
hii
actuall i need to create a driver for dummy modem
please can u suggest me ...
 
0 members found this post helpful.
Old 11-25-2009, 09:44 AM   #8
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 15
actually i am not getting the information about dummy modem and how to write a driver for dummy modem
 
0 members found this post helpful.
Old 11-25-2009, 06:16 PM   #9
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,062

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Quote:
Originally Posted by trkecea View Post
actually i am not getting the information about dummy modem and how to write a driver for dummy modem
How do you mean? Not in this forum or not in the book recommended by Pixellany?

It might not become apparent to you, but for such a specialized question, you might have to put some effort in yourself.

First I would recommend to read the book Linux Device Drivers, cover to cover, then write a detailed functional specification for your device driver, and eventually ask here your specific questions, for which the book did not provide you with an answer.

jlinkels
 
1 members found this post helpful.
Old 11-25-2009, 10:16 PM   #10
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 15
Actually my project is to implement communication between the two PCs by using two virtual modems. so for that i need to write the code for the virtual modem which it should understand all the AT commands exactly as physical modem and it should send/receive call and SMS
I have some basic knowledge about device drviers
please tell me how i need to approach

Last edited by trkecea; 11-25-2009 at 10:34 PM.
 
1 members found this post helpful.
Old 11-26-2009, 12:32 AM   #11
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,193

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Quote:
Originally Posted by trkecea View Post
Actually my project is to implement communication between the two PCs by using two virtual modems...
<snip>
please tell me how i need to approach
Actually... you have been given a reference. You have been asked what references you have already looked at. You have not indicated at all that you have read any of the replies to your thread. Have you actually done any research? Or perhaps you are hoping that by continuing to post here someone will do your work for you?

Evo2.
 
1 members found this post helpful.
Old 11-26-2009, 11:12 PM   #12
trkecea
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 15
I am not asking the solutions sir
just i am aksing how i need to approach for solving my problem
this is in a academic session

Thanx
trkecea
 
0 members found this post helpful.
Old 11-26-2009, 11:40 PM   #13
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Quote:
Originally Posted by trkecea
just i am aksing how i need to approach for solving my problem
As far as I know modems work through serial port, so u'll be writing a device driver for a serial port not a modem ! Check out the http://www.linuxquestions.org/questi...-linux-763595/ thread, here I have disabled the default IRQ and enabled my own for RS232. I can generate interrupts on my decided intervals. This thread will get u started and for further information if u have enough time u can read the code of the default device driver of linux systems [after reading the linux device drivers book].

Last edited by TheIndependentAquarius; 11-26-2009 at 11:44 PM.
 
  


Reply


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
Write a simple driver for a usb device abhinit Linux - Hardware 5 07-17-2009 02:24 AM
How to write a device driver in linux yogesh_bansal Linux - Newbie 2 01-25-2009 07:47 AM
how to write device driver for Irda santu432 Programming 1 07-23-2004 12:29 PM
how to write a device driver raghu mitra Linux - Software 1 07-22-2004 02:26 PM
how to write a device driver dummyagain Programming 3 10-20-2003 08:36 AM


All times are GMT -5. The time now is 01:59 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