|
DK2CRN > LINUX 09.10.09 20:34l 127 Lines 3031 Bytes #999 (0) @ WW
BID : 9AJDB0OVN059
Read: GUEST
Subj: Re: lost pty/tty devices
Path: IZ3LSV<IK2XDE<DB0RES<DB0OVN
Sent: 091009/1932z @:DB0OVN.#NRW.DEU.EU [BCM West<>Link-Neus] obcm1.07b3
From: DK2CRN @ DB0OVN.#NRW.DEU.EU (Christoph)
To: LINUX @ WW
X-Info: No login password
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello!
My english is horrible, but I try to tell you, how to use the
ham-applications under the new unix98-pseudo-terminals.
The actually ax25-tools (0.0.10-rc2) and ax25-apps (0.0.8-rc2) packages are
compatible with the new unix98-pseudo terminals (programs: ax25ipd,
kissattach, net2kiss, kissnetd, mkiss and m6pack). There is also a new
tfkiss-version (1.25), which can work with the new pseudo-terminals.
The packages are available as source under <http://www.linux-ax25.org>
(without tfkiss).
There are also rpm-packages for opensuse
<http://download.opensuse.org/repositories/hamradio/>
The unix98-pseudo terminal has got only one master file "/dev/ptmx". If a
program open this file a corresponding client file is opened
automatically. The name of this file is "/dev/pts/NR". "NR" stands for a
number, which cannot forseen.
Every ax25-program above, who opens the file /dev/ptmx shows you the corresponding client-file on stdout screen:
dk2crn:~ # kissnetd /dev/ptmx /dev/ptmx /dev/ptmx
kissnetd V 1.5 by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project
Awaiting client connects on:
/dev/pts/2 /dev/pts/3 /dev/pts/4
You need to change your startscripts, if the ax25-apps should work with
unix98 ptys.
Example 1
Connecting kissattach and ax25ipd (axport-name and arp-call are defined
in /etc/ax25/axports):
#!/bin/sh
AXPORT=xnet
KISS_TTY=/dev/ptmx
IP_ADRESS=192.168.2.1
ARP_CALL=DK2CRN-10
PTY=$(/usr/sbin/kissattach $KISS_TTY $AXPORT $IP_ADRESS 2>&1 | tail -1)
/usr/sbin/ax25ipd --ttydevice $PTY
# and so on
BTW: the ax25ipd option "--tydevice" is new, it defines the serial
device...
Example 2
Connecting several kissattach with kissnetd (axport-names are defined
in /etc/ax25/axports):
#!/bin/sh
#
AXPORTA=ax1
AXPORTB=ax2
IP_A=192.168.7.99
IP_B=192.168.8.99
#
declare -a PORTARRAY
let count=0
#
#
PORTS=$(/usr/sbin/kissnetd /dev/ptmx /dev/ptmx | tail -1 &)
#
for i in $PORTS; do
PORTARRAY[$count]=$i
((count++))
done
#
/usr/sbin/kissattach ${PORTARRAY[0]} $AXPORTA $IP_A
/usr/sbin/kissattach ${PORTARRAY[1]} $AXPORTB $IP_B
#
Example 3 Connecting two TNCs over one serial line with linux (mkiss):
#!/bin/sh
#
TNCA=ax1
TNCB=ax2
IP_TNCA=192.168.7.99
IP_TNCB=192.168.8.99
#
declare -a PORTARRAY
let count=0
#
#
PORTS=$(/usr/sbin/mkiss -s 38400 /dev/ttyS0 /dev/ptmx /dev/ptmx | tail -1 &)
#
for i in $PORTS; do
PORTARRAY[$count]=$i
((count++))
done
#
/usr/sbin/kissattach ${PORTARRAY[0]} $TNCA $IP_TNCA
/usr/sbin/kissattach ${PORTARRAY[1]} $TNCB $IP_TNCB
#
and so on...
Could this solve your problems? I hope so...
73 de Christoph, DK2CRN
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: LinKT V0.8rc4
iEYEARECAAYFAkrPj+AACgkQOL/PIMcQqKDYSQCfb0lps2RSayv/TNygFnF+vXvx
fIsAn3rXfcHyHD6ewBOsyuFNvd6MXXVp
=MQgo
-----END PGP SIGNATURE-----
Read previous mail | Read next mail
| |