[Xastir] KISS TNC mode via Mixw problem

n2wsg n2wsg at arrl.net
Fri Feb 13 22:19:28 EST 2004


> > > Does MixW use handshake lines?  If so, it is not per KISS
> > > specifications.  I suspect UI-View is setting your handshakes
> > > active, and then Xastir is leaving them that way.  Xastir doesn't
> > > mess with the handshake lines in KISS mode.
> >
> > MixW does not use Handshake lines. RTS and DTR are always on. I don't
know
> > if it uses XON/XOFF software handshaking. UI-View does send ^M, KISS ON,
> > RESTART into the TNC and 192, 255, 192 to exit the TNC. It also has a TX
> > delay of 400 msec, Tx Tail of 40 msec, Slot time of 100 msec and Persist
of
> > 64.
>
> You're going to be the best person to debug this as you're actually
> running it.  I haven't heard of anyone else using MixW with Xastir.
> Isn't it great to be first?
>
> It could be a few things:
>
> 1) Xastir doesn't do the KISS ON and later the kiss packet to take
> the TNC back out of KISS mode.  If you use a KISS interface, Xastir
> expects the TNC to be in KISS mode already.

I used Realterm (on COM3) instead of a MixW to watch the output from Xastir
(on COM4) via the Mixw Serial port bridge (ties COM3 to COM4) and noticed
that Xastir does not care if there is a TNC there; it is not expecting
anything back. Xastir shows it as UP. This is a mixed ASCII and Hex dump of
what Xastir sends to Realterm in one stream with no delays:

C0  01 (28  C0  00  C0  02 ?3F  C0  00  C0  03  14  C0  00  C0  04  1E  C0
00 
 C0  05  00  C0  00  C0  00  82  A0  B0 b62 f66 b62 `60  9C d64  AE  A6  8E
@40 
`60  A4  8A  98  82  B2 @40 `60  AE  92  88  8A d64 @40 e65  03  F0 =3D /2F
=3D 
t74 @40 c63 030 o6F u75 m6D R52 {7B 333 C43 >3E D44 M4D 131 232 J4A T54 ,2C
D44 
a61 v76 i69 d64 ,2C P50 a61 c63 i69 f66 i69 c63 B42 e65 a61 c63 h68 C43 A41
,2C 
X58 A41 S53 T54 I49 R52 -2D C43 y79 g67 n6E u75 s73  0D  C0  00

Next, using UI-View instead of Xastir, here is what would be sent to the
MixW:

^M
KISS ON
RESTART

0D  0D K4B I49 S53 S53  20 O4F N4E  0D R52 E45 S53 T54 A41 R52 T54  0D  C0
01 
(28  C0  C0  02 @40  C0  C0  03  0A  C0  C0  04  04  C0  C0

delay 2 seconds, then send the packet....

 05  00  C0  C0  00 
 82  A0  AA d64 j6A  94  E0  9C d64  AE  A6  8E @40 a61  03  F0 =3D /2F =3D
t74 
F46 d64 030 o6F u75 -2D R52  20  20 B42 >3E D44 M4D 131 232 J4A T54 ,2C D44
a61 
v76 i69 d64 ,2C P50 a61 c63 i69 f66 i69 c63 B42 e65 a61 c63 h68 C43 A41  20
{7B 
U55 I49 V56 333 232 N4E }7D  0D  C0

When shutting down UI-VIEW (192, 255, 192) ...

 C0  FF  C0

Xastir does cause the MixW TNC to send an xmit properly the first time,
however, after this, the Serial KISS TNC interface will be in an ERROR state
a few seconds later and cannot be restarted.

"Error opening interface 0 Hard Fail"

But if you now restart Xastir without the UI-View precursor, it will start
UP, xmit properly, and then go into the ERROR state after a few seconds
later.

Now if you have Xastir working with MixW OR Realterm, and then STOP and
START the interface, it will not come up. You need to reload Xastir. This
means that it is a Xastir problem since the interface cannot be stopped and
started with just a Realterm instead of a TNC. However, Xastir will stay UP
with the Realterm program, but not with MixW (probably because MixW is
sending something back to Xastir that it doesn't like). I used to be able to
run Xastir with Mixw OK (using UI-View precursor), but the newer release
broke it. I cannot go back and duplicate the working configuration now for
some reason :-(

Looking at the Xastir output to Realterm while STOPPING and STARTING the
interface shows no activity except for handshaking lines, DSR goes down when
STOPPING, but does not go back up when STARTING, CTS always stays on (Lock
file problem, see below).

How do you modify Xastir to include?
^M
KISS ON
RESTART

It should NOT be assumed that the TNC is in KISS mode already, and if it is,
the above sequence is redundant and is a NOP anyway with no harm done.
UI-View gives you a dialog box where you can set these parameters for each
type of TNC, in case you need to customize it.

And why does the interface go into an ERROR state?

The debug level 2 outputs are (xastir -v 2 2>&1 | tee debug_output.txt):

debug level 2


Built-in map types:
      gnis   USGS GNIS Datapoints
       map   APRSdos Maps
       map   WinAPRS/MacAPRS/X-APRS Maps
       pdb   PocketAPRS Maps

Support for these additional map types has been compiled in: 
       geo   Image Map (ImageMagick library, many formats allowed)
       geo   URL (Internet maps via libcurl library)
       shp   ESRI Shapefile Maps (Shapelib library)
       tif   USGS DRG Geotiff Topographic Maps (libgeotiff/libproj)
       xpm   X Pixmap Maps (XPM library)
Port Available 0
Opening a Serial KISS TNC device
Create lock file /var/lock/LCK..ttyS3 (Error: I had to make a lock dir, on
Cygwin, it does not exist)
*** add_device: ok: 1 ***
Start port 0 threads
*** Startup of read/write threads for port 0 ***
End port 0 threads
Port 0 write start
Port 0 read start
end of file on read, or signal interrupted the read, port 0
Checking for expired alerts...
Found device error on port 0 (What does this mean?)
alert_display_request
18:53:32  
shutdown_all_active_or_defined_port: 0

Shutting down port 0 
Delete Device start
Close a Serial KISS TNC device
Serial detach
port detach OK
Cancel threads

shutdown_all_active_or_defined_port: 0

Shutting down port 0 
Delete Device start
Close a Serial KISS TNC device
Serial detach
port detach OK
Cancel threads
Port Available 0
Opening a Serial KISS TNC device
Found an existing lockfile /var/lock/LCK..ttyS3 for this port!
Cannot open port:  Another program has the lock!
Thread for port 0 write down!
Thread for port 0 read down!
Caught 0

shutdown_all_active_or_defined_port: -1


Next I started UI-View first then Xastir:

debug level 2


Built-in map types:
      gnis   USGS GNIS Datapoints
       map   APRSdos Maps
       map   WinAPRS/MacAPRS/X-APRS Maps
       pdb   PocketAPRS Maps

Support for these additional map types has been compiled in: 
       geo   Image Map (ImageMagick library, many formats allowed)
       geo   URL (Internet maps via libcurl library)
       shp   ESRI Shapefile Maps (Shapelib library)
       tif   USGS DRG Geotiff Topographic Maps (libgeotiff/libproj)
       xpm   X Pixmap Maps (XPM library)
Port Available 0
Opening a Serial KISS TNC device
Found an existing lockfile /var/lock/LCK..ttyS3 for this port!
Lock is stale!  Removing it.
Create lock file /var/lock/LCK..ttyS3
*** add_device: ok: 1 ***
Start port 0 threads
*** Startup of read/write threads for port 0 ***
End port 0 threads
Port 0 write start
Port 0 read start
Checking for expired alerts...
TX:0<=/=t at c0oumR{3C>DM12JT,David,PacificBeachCA,XASTIR-Cygnus
>
alert_display_request
end of file on read, or signal interrupted the read, port 0

shutdown_all_active_or_defined_port: 0

Shutting down port 0 
Delete Device start
Close a Serial KISS TNC device
Serial detach
port detach OK
Cancel threads
Port Available 0
Opening a Serial KISS TNC device
Found an existing lockfile /var/lock/LCK..ttyS3 for this port! (Something is
not removing the lock file when in ERROR state or STOPPING interface)
Cannot open port:  Another program has the lock!
Thread for port 0 write down!
Thread for port 0 read down!
19:01:42  alert_display_request
19:02:12  Checking for expired alerts...
alert_display_request
19:02:42  alert_display_request
19:03:12  Checking for expired alerts...
alert_display_request
Caught 0

shutdown_all_active_or_defined_port: -1

http://realterm.sourceforge.net/

That's all for now until I have some more time to look as this.

David
N2WSG





More information about the Xastir mailing list