Serial tty proxy?

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.
RTOS and JVM Dept.  	           Sofia 1606, Bulgaria
Phone:  +359 2 952 3581/204        http://www.prosyst.com
Mobile: +359 887 663 193           OSGi Technology Leaders
Reply to
Alexander Popov
Loading thread data ...

Hallo Alexander,

Alexander Popov schrieb in news:20040114110122.023a8e2b.s snipped-for-privacy@prosyst.bg:

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
http://www.pin-gmbh.com
Reply to
Kurt Harders

You might want to take a look at the source of one of the terminal server projects (e.g.

formatting link

Supposedly they do "virtual tty" ports.

-Michael

Reply to
Michael Schnell

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
                               visi.com            the RINSE CYCLE!!
Reply to
Grant Edwards

Thank you all

--
Alexander Popov                    ProSyst Bulgaria Inc.
RTOS Leader                        48 Vladajska Str.
RTOS and JVM Dept.  	           Sofia 1606, Bulgaria
Phone:  +359 2 952 3581/204        http://www.prosyst.com
Mobile: +359 887 663 193           OSGi Technology Leaders
----------------------------------------------------------

The wonderful thing about Linux is that there is always at
least one more undiscovered way to do almost anything.
             Lewin A.R.W. Edwards (comp.os.linux.embedded)
----------------------------------------------------------
Reply to
Alexander Popov

Hi Alexander,

Alexander Popov schrieb in news:20040116150148.3132115c@kuneto2:

What did you decide to do? :-)

Regards, Kurt

--
PiN - Präsenz im Netz GITmbH
Kurt Harders
http://www.pin-gmbh.com
Reply to
Kurt Harders

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. RTOS and JVM Dept. Sofia 1606, Bulgaria Phone: +359 2 952 3581/204

formatting link
Mobile: +359 887 663 193 OSGi Technology Leaders

----------------------------------------------------------

The wonderful thing about Linux is that there is always at least one more undiscovered way to do almost anything. Lewin A.R.W. Edwards (comp.os.linux.embedded)

----------------------------------------------------------

Reply to
Alexander Popov

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 .

HTH

Tauno Voipio tauno voipio @ iki fi

Reply to
Tauno Voipio

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

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
                               visi.com            Silvers!
Reply to
Grant Edwards

I mentioned

formatting link

Another implementation of a virtual TTY interface is

formatting link

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

Have fun, Michael

Reply to
Michael Schnell

AFAIK, "Understanding The Linux Kernel" is the first thing to read.

-Michael

Reply to
Michael Schnell

Thank you Michael,

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

Regards, Alexander

Reply to
Alexander Popov

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.