Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  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

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,


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

Rep: Reputation: 50
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
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 (



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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration