LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-18-2008, 06:31 AM   #1
Frederic PAUT
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
How a kernel module can access to a serial line (/dev/ttySn)


Hi All,

I am a software developper in charge of develop a kernel module to manage a proprietary protocol.
I am newbie with kernel modules. My english is very bad. sorry...
I work on kernel 2.6.24.7

My kernel module must open a serial line (/dev/ttySn) and send/receive frames, but I don't know how to do this.
I have searched on internet but I have just found some threads about 'sys_open()'. but I can not use this system call (not exported from kernel).
I have also read similar threads on this site, unsuccessfully.

Someone knows a solution?

Thank in advance,

Frederic

Last edited by Frederic PAUT; 11-18-2008 at 06:33 AM.
 
Old 11-18-2008, 07:43 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Quote:
develop a kernel module to manage a proprietary protocol
If your protocol use a standard serial line, why do you want to make a real driver just for the protocol. Embed it into a user library which make the job will be:
-easier than developing a driver
-easier to maintain
-less dangerous for the system stability in case of bug or error
The only one positive point I can see for developing a driver is performance purpose.
By the way, if you're thinking that a driver is the way to go, take a look here http://lwn.net/Kernel/LDD3/
 
Old 11-18-2008, 07:55 AM   #3
Frederic PAUT
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
why do you want to make a real driver just for the protocol

Dear jf.argentino,

Thank you for your response. It's correct:
1/ it's for the performance.
2/ It's to use this protocol early in the linux boot.

The step one is using a serial line, the second step is to use a SPI serial line to receive video packet with high-speed rate

Thank you for the link (http://lwn.net/Kernel/LDD3/)

Frederic
 
  


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
[Kernel Module] Accessing the serial port Moepi Programming 1 09-23-2007 04:51 PM
Slackware kernel with Serial port support as module maartenvdbent Slackware 16 06-11-2006 11:54 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 08:11 PM
remote kernel debugging over a serial line swaroop Linux - Software 0 03-24-2005 01:58 AM


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