LinuxQuestions.org
Review your favorite Linux distribution.
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 06-08-2009, 05:11 PM   #1
xinren
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Rep: Reputation: 0
linux kernel character driver


hi there,

I am a newbie in Linux kernel and I have a Debian 2.6.4 installed. I have compiled hello.c module, and I can install and uninstall the driver. I then create a simple character driver. I can compile it, load the module and remove the module and I can see the debug message using printk. I can write to the module using echo and then read it using cat. The problem is that open, release, read, and write functions are not called. I cannot see any debug message from these functions. Any pointer? Thanks in advance.

Xinren
 
Old 06-16-2010, 01:48 AM   #2
sukhdham
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
i too have the same problem if you have any soultions pls to let me know
 
Old 06-26-2012, 03:53 AM   #3
zaffer
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
hi check this

i believe u have mapped them properly in struct file operations
also do the following
# mknod node c major no minor no(wen u dmesg u get these major and minor no)
..........make an application like app.c and call read and write in it
then compile the application gc app.c
# ./a.out node ...........
it will work
 
  


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
How to write a character device driver to read the processor's GDT kiranshadow Linux - General 1 05-10-2008 12:28 PM
Newbie character driver questions kamputty Linux - Kernel 2 04-06-2007 02:39 AM
Character driver module: device or resource busy codenaive Linux - Kernel 0 09-15-2006 02:07 AM
Character Device driver: How to load it automatically ? shendeswanand Linux - Software 0 02-09-2006 10:59 PM
Character device driver calsoft_pg Linux - Software 0 01-03-2006 01:17 PM


All times are GMT -5. The time now is 12:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration