From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
To: AA6QN <AA6QN@pacbell.net>
Cc: linux-hams@vger.kernel.org
Subject: Re: mkiss, udev and kernel 2.6
Date: Mon, 14 Mar 2005 00:25:08 +0100 [thread overview]
Message-ID: <4234CBD4.3010600@ccr.jussieu.fr> (raw)
In-Reply-To: <000601c4c852$79768360$07001aac@adminqn>
Hi,
It took me a while but I succeeded in adding Unix98 pseudo tty master
/dev/ptmx and slave /dev/pts/X into mkiss, kissattach and ax25ipd.
It was not so easy. Not for a lack of documentation, but because there
was not much sample code. So, I had to make a lot of tries and errors.
However the principle is very simple. When one opens a master pseudo
tty, the system automatically creates a slave pseudo tty.
This makes a pseudo tty couple that can be used like a tunnel. Every
character written on the master tty side is presented to the slave tty
and vice versa.
As, devfs is becoming obsolete with 2.6 kernel, udev support is needed
for AX25. However, the additional code is backward compatible and I am
also using it with 2.2.25 kernel.
As an example, here is a very simple rc.radio script I am using for
initialisation of AX25 on my 2.6 kernel machine :
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/modprobe ax25
/sbin/modprobe rose
/sbin/modprobe mkiss
/bin/sleep 4
/usr/local/sbin/mkiss -s 38400 -l /dev/ttyS0 /dev/ptmx /dev/ptmx
/bin/sleep 4
/usr/local/sbin/kissattach -l /dev/pts/0 0 44.151.75.150
/usr/local/sbin/kissattach -l /dev/pts/1 1 44.151.75.150
/usr/local/sbin/kissattach -l -m 256 /dev/ptmx 2 44.151.75.150
/bin/sleep 4
/usr/local/sbin/ax25ipd -l4
/bin/sleep 4
/usr/local/sbin/fpac/fpac.sh
/bin/sleep 4
/usr/local/sbin/dxnet/dxnet.sh &
/bin/sleep 4
/usr/local/sbin/mheardd
This script initializes two radio ports 0 and 1 on a
KPC9612 dual port TNC connected to single computer serial port.
mkiss will make an interconnexion between a serial device carrying AX25
packets (from a TNC) and a master pseudo terminal.
kissattach will connect the slave pseudo terminal side to an AX25 port
on which Linux software can write or read characters.
In the third case, kissattach opens a master /dev/ptmx that in turn
creates another /dev/pts/X device. This slave pseudo tty is then opened
by ax25ipd.
ax25ipd will connect the AXIP port (port 2 in /etc/axports) to UDP port
10093 for ROSE/FPAC Internet connexions (as declared in /etc/ax25ipd.conf).
Thus, AX25 programs can write or read characters on an AX25 port. They
are assembled into an AX25 packet that is then encapsulated into IP
frames that goes over the Internet to reach another AX25 talking station.
I don't know to whom I should submit the sources, for ax25-tools-0.0.8
and ax25-apps-0.0.6 seem to be unchanged for months.
So, for anybody wanting to share the files, sources can be found here :
http://f6bvp.free.fr/logiciels/Pseudo-TTY/
io.c is from ax25-apps-0.0.6/ax25ipd/
mkiss.c and kissattach.c are from ax25-tools-0.0.8/kiss/
73 de Bernard, f6bvp
-----------
AA6QN wrote:
> I ported my Linux over to Gentoo and started off with devfs. I did try udev
> and it did not work for me. So, back to devfs and things are working once
> again. Let us know if you get it running.
>
> 73,John AA6QN
>
> -----Original Message-----
> From: linux-hams-owner@vger.kernel.org
> [mailto:linux-hams-owner@vger.kernel.org] On Behalf Of Bernard Pidoux
> Sent: Tuesday, November 02, 2004 8:49 AM
> To: unlisted-recipients:; no To-header on input
> Cc: linux-hams@vger.kernel.org
> Subject: mkiss, udev and kernel 2.6
>
> Hi,
>
> Does someone have an experience with mkiss and udev in 2.6 kernel ?
>
> I need to use mkiss-kissattach to drive a dual port TNC 1200/9600 KPC9612.
>
> However I don't see how to set up a master-slave pseudo tty system with
> udev.
>
> Actually, I went through by instructing the kernel to load devfs at boot
> (append="devfs=mount... " in lilo.conf.
>
> But Is there any other solution with udev alone (without devfs) ?
>
> 73 de Bernard, f6bvp
next prev parent reply other threads:[~2005-03-13 23:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-29 18:36 [PATCH 2.6] convert netrom to module_param Stephen Hemminger
2004-07-29 23:02 ` David S. Miller
2004-11-02 16:48 ` mkiss, udev and kernel 2.6 Bernard Pidoux
2004-11-12 0:56 ` AA6QN
2004-11-12 4:59 ` Jeremy Utley
2005-03-13 23:25 ` Bernard Pidoux [this message]
2005-03-20 23:38 ` AX25 udev pseudo tty support Bernard Pidoux
2004-11-02 17:34 ` xfbb ports and kernel 2.6.8 Bernard Pidoux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4234CBD4.3010600@ccr.jussieu.fr \
--to=pidoux@ccr.jussieu.fr \
--cc=AA6QN@pacbell.net \
--cc=linux-hams@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox