Skip to contentSkip to conversation

unix98 ptys

DISCUSSION John Ronan 2 participants 6 messages Jul 5, 2010 – Jul 6, 2010

lore
Share & tools
lore

John Ronan

author
#0 lore raw

Hi,

I just had a go at getting ax25 mkiss working on ubuntu 10.04.
I came across this message and was wondered if there is a similiar mechanism to /dev/ptmx for the receive side.

http://www.mail-archive.com/[email protected]/msg00103.html

At the moment I'm using kissattach /dev/pts/5 1200mk 44.155.6.12
etc to attach to it. I've never used Unix98 ptys before so any assistance appreciated

Regards
de John
EI7IG

#1 lore raw

Hello John,

On 2010-07-05 21:45:29 +0100, John Ronan <[email protected]> wrote in <[email protected]>:

Quoted 11 lines

Hi,

I just had a go at getting ax25 mkiss working on ubuntu 10.04. I came across this message and was wondered if there is a similiar mechanism to /dev/ptmx for the receive side.

http://www.mail-archive.com/[email protected]/msg00103.html

At the moment I'm using kissattach /dev/pts/5 1200mk 44.155.6.12 etc to attach to it. I've never used Unix98 ptys before so any assistance appreciated

Please read http://lists.debian.org/debian-hams/2010/06/msg00022.html

73,
- Thomas dl9sau

author
#2 lore raw
Quoted 10 lines · Thomas Osterried

Hello John,

On 2010-07-05 21:45:29 +0100, John Ronan <[email protected]> wrote in <[email protected]>:

Quoted 6 lines

Hi,

I just had a go at getting ax25 mkiss working on ubuntu 10.04. I came across this message and was wondered if there is a similiar mechanism to /dev/ptmx for the receive side.

Quoted 7 lines
Quoted 5 lines

http://www.mail-archive.com/[email protected]/msg00103.html

At the moment I'm using kissattach /dev/pts/5 1200mk 44.155.6.12 etc to attach to it. I've never used Unix98 ptys before so any assistance appreciated

Please read http://lists.debian.org/debian-hams/2010/06/msg00022.html

Hi Thomas,

Thanks for the reply. Ok I have it working now. However the link I quoted above indicated that kissattach finds the relevant slave pts/? devices automatically, but kissattach (from ax25-tools-0.0.10-rc2) does not. A quick diff shows some code in Bernards version seems to iterate through the ptys.

Should I be using Bernards code from 2005? Or should I just update the linux-ax25 wiki to so that anyone else searching for the information can find it.

Regards
de John
EI7IG

#3 lore raw

Hello John,

On 2010-07-06 08:41:36 +0100, John Ronan <[email protected]> wrote in <[email protected]>:

Quoted 7 lines · Thomas Osterried
Quoted 5 lines
Quoted 5 lines

I came across this message and was wondered if there is a similiar mechanism to /dev/ptmx for the receive side.

http://www.mail-archive.com/[email protected]/msg00103.html

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

At the moment I'm using kissattach /dev/pts/5 1200mk 44.155.6.12 etc to attach to it. I've never used Unix98 ptys before so any assistance appreciated

Please read http://lists.debian.org/debian-hams/2010/06/msg00022.html

Hi Thomas,

Thanks for the reply. Ok I have it working now. However the link I quoted above indicated that kissattach finds the relevant slave pts/? devices automatically, but kissattach (from ax25-tools-0.0.10-rc2) does not. A quick diff shows some code in Bernards version seems to iterate through the ptys.

# tail -1 /etc/ax25/axports
ax5     TE1ST     115200        255     7       test
# kissattach /dev/ptmx ax5
AX.25 port ax5 bound to device ax5
Awaiting client connects on
/dev/pts/32
# ifconfig ax5
ax5       Link encap:AMPR AX.25  HWaddr TE1ST  
          UP BROADCAST RUNNING  MTU:255  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B

kissattach writes out the slave pty name.
There's no reason for iterating through anything.
-> This is scriptable.

What you did reference with your URL is Bernard's script for multiplex one tnc at ttyS0 via mkiss(8) and kissattach'ing them to more than one interface.
The new mkiss does this like kissattach.

# mkiss -x 2  /dev/ttyS3

Awaiting client connects on:
/dev/pts/32 /dev/pts/40
#
This is also scriptable.

I.e. something like this:

ptys=$(mkiss -x 2 /dev/ttyS3 | tail -1)
for port in ax5 ax9; do
kissattach $port $pty
done

this is easy and secure.

Btw, please use the CVS head. Among other things, there was a bug in nrattach which has been fixd.

73,
- Thomas dl9sau

author
#4 lore raw

On 6 Jul

Quoted 5 lines

What you did reference with your URL is Bernard's script for multiplex one tnc at ttyS0 via mkiss(8) and kissattach'ing them to more than one interface.
The new mkiss does this like kissattach.

Ok, apologies, I wasn't clear enough in my original email. mkiss is what I was using (a KPC9612+)

Quoted 5 lines
# mkiss -x 2  /dev/ttyS3

Awaiting client connects on:
/dev/pts/32 /dev/pts/40
#

Yes that is what I see

Quoted 9 lines

This is also scriptable.

I.e. something like this:

ptys=$(mkiss -x 2 /dev/ttyS3 | tail -1)
for port in ax5 ax9; do
kissattach $port $pty
done

Ok, that's fine. This is my first attempt to use mkiss, so I wasn't sure if I was doing it correctly.

Quoted 4 lines

this is easy and secure.

Btw, please use the CVS head. Among other things, there was a bug in nrattach which has been fixd.

Doing it now,

Thanks.
Regards
de John
EI7IG

#5 lore raw

Hello again,

On 2010-07-06 09:37:22 +0100, John Ronan <[email protected]> wrote in <[email protected]>:

Quoted 2 lines
Quoted 1 line

The new mkiss does this like kissattach.

Ok, apologies, I wasn't clear enough in my original email. mkiss is what I was using (a KPC9612+)

[..]

Quoted 1 line

Ok, that's fine. This is my first attempt to use mkiss, so I wasn't sure if I was doing it correctly.

mkiss has support for a special operation mode of the KPC9612:
a user had the problem that he only liked to use the 1k2 port. The KPC sends 9k6 and 1k2 over the one serial line (multiport kiss). Since he did not needed to use data from the 9k6 port (which is the "first" one), he did not need like to have an interface for this at all. With the special word "none" you could tell mkiss that it should ignore that port.

From the man page:
If the pty name is the special name "none", no pty is opened. This is useful if you have multiport tnc like the KPC-9612 on i.e. /dev/ttyUSB0 and you only like to handle packets for the second port. The KPC has no option to configure the second tnc to listen on kiss port number 0. Thus, if you like to send all frames from the pty to the kiss port num- ber 1, we need to tell mkiss to tag them for port number 1. This is done by "mkiss /dev/ttyUSB0 none /dev/ptmx". Frames received with port number 0 are discarded.

73,
- Thomas dl9sau