Serial tty proxy?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,

I need to implement a kernel space module that acts like a serial port
"proxy". The idea is to access this "proxy" module from user space and
then retransmit some modified content to the ttyS device. This module
will also take care of additional (hardware specific) fuctionality
required by the modem (an EHS modem).

The problem is that I can't comunicate with the tty driver trough its
device file because of the sys_call_table race conditions.

Is there a way to do that in a separate module (a proxy module) and not
modify the serial driver (it's tty_io)?

Thanks in advance.

Best Regards,
--
Alexander Popov                    ProSyst Bulgaria Inc.
RTOS Leader                        48 Vladajska Str.
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?
Hallo Alexander,


Quoted text here. Click to load it

I didn't do that in practice, but what about writing a new line-
discipline for the serial driver?

regards, Kurt

--
PiN - Präsenz im Netz GITmbH
Kurt Harders
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?
You might want to take a look at the source of one of the terminal
server projects (e.g. http://www.ltsp.org /)

Supposedly they do "virtual tty" ports.

-Michael

Re: Serial tty proxy?

Quoted text here. Click to load it

The two easy ways to do this are:

 1) Use a user-space daemon and a pty device.

 2) Write a line-discipline module that sits between the "tty"
    device and the serial port.

--
Grant Edwards                   grante             Yow!  It's the RINSE
                                  at               CYCLE!! They've ALL IGNORED
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?

Thank you all

Quoted text here. Click to load it


--
Alexander Popov                    ProSyst Bulgaria Inc.
RTOS Leader                        48 Vladajska Str.
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?
Hi Alexander,


Quoted text here. Click to load it

What did you decide to do? :-)

Regards, Kurt

--
PiN - Präsenz im Netz GITmbH
Kurt Harders
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?

I'll implement a line discipline.
The problem is that I'm a complete newbie when it comes to kernel code
and I have trouble finding any info on how to do such thing. I guess
I'll just have to read the slip or the ppp code... :)

Best regards,
--
Alexander Popov                    ProSyst Bulgaria Inc.
RTOS Leader                        48 Vladajska Str.
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?
Quoted text here. Click to load it

The method is described in the book

W. Richard Stevens, Advanced Programming for the UNIX Environment,
Addison-Wesley, ISBN 0-201-56317-7,

see also <http://www.kohala.com/start/apue.html .

HTH

Tauno Voipio
tauno voipio @ iki fi


Re: Serial tty proxy?

Quoted text here. Click to load it

Really?  Stevens talks about how to do Linux kernel
line-discipline modules?

Quoted text here. Click to load it

The table of contents looks like it's all user-mode application
stuff.  I didn't see anything on Linux kernel modules.

--
Grant Edwards                   grante             Yow!  I request a weekend
                                  at               in Havana with Phil
We've slightly trimmed the long signature. Click to see the full one.
Re: Serial tty proxy?
AFAIK, "Understanding The Linux Kernel" is the first thing to read.

-Michael

Re: Serial tty proxy?

Thank you Michael,

Quoted text here. Click to load it

I'm currently reading it, along with Linux Device Drivers.
I'll check the urls that you gave me as well.

Quoted text here. Click to load it

Regards,
Alexander

Re: Serial tty proxy?
Quoted text here. Click to load it

I mentioned

   http://www.ltsp.org

Another implementation of a virtual TTY interface is

  http://www.linuxlots.com/~termpkg /


Both should work well as examples how it's done.

Have fun, Michael

Site Timeline