[Xastir] Device closing on failure

John Wilson kc4lzn at gmail.com
Thu Sep 29 14:54:34 EDT 2011


Ironic this comes up because this happened to me this morning, outside
of Xastir. I was monitoring the output of a TinyTrak4 through Gtkterm
when I inadvertently disconnected the USB-Serial Adapter and then
plugged it back in. It associated it with ttyUSB1 when I did that. I
didn't reboot but closed the gtkterm, disconnected the adapter again,
waited a few seconds, plugged the adapter back in and restarted gtkterm
and all was well.

My point being, is there another program running that might be using
that same port to read and therefore assigning to ttyUSB1?

73 John 

On Thu, 2011-09-29 at 12:47 -0600, Tom Russo wrote:

> On Thu, Sep 29, 2011 at 09:34:50AM -0400, we recorded a bogon-computron collision of the <huston at srhuston.net> flavor, containing:
> > I'll preface this by saying I haven't looked at the code, so this is
> > mostly wondering aloud to those who have :>
> > 
> > My APRS computer is in the basement (it's the server that stays running
> > all the time anyway) so I use a USB extender to connect the TNC to it
> > from the shack.  Now and then, the device sneezes and the TNC will get
> > disconnected as ttyUSB0 and end up as ttyUSB1.  This in itself isn't
> > really avoidable I think, because while I haven't witnessed it I'm
> > guessing it happens too fast to detect and do anything about.
> > 
> > However, if I tell Xastir to close the TNC, and unplug it from the
> > computer, the program still holds ttyUSB0 open which prevents the kernel
> > from reconnecting it there.  The only way I've found to get Xastir to
> > actually close the device is to close the program, then I can reattach
> > the TNC and it will come back to USB0.  I can of course just tell Xastir
> > to look for it on USB1, and that works until I have to restart the
> > program :>
> > 
> > Any thoughts?  Some time this weekend I figured I'd look through the
> > code and see if I can find the error code, and in the mean time I've got
> > 'screen' watching for the words "Hard Fail" and emitting a beep if it's
> > seen.
> 
> Whatever is causing this, it's not unique to Xastir.  My IGate, which is
> running javAPRSSrvr on a plug computer through a TNC that is handled through 
> ax.25 networking and shared across my network, also suffers occasionally from
> this renaming of the USB/Serial dongle.  The machine does not run 
> Xastir at all.  Once every month or two it hiccups, drops the USB/serial 
> device, then immediately detects it again and attaches it to a different 
> /dev/ttyUSB* device.  Kissattach doesn't notice, and even when killed and the 
> device removed, it will not come back as /dev/ttyUSB0.  So far my ONLY 
> solution, short of rebooting the plug, is to kill kissattach and restart it 
> using the new /dev/ttyUSB* device.
> 
> I would love to find out why the device disappears sometimes, why it can't
> come back as the same device as when it was originally plugged in, and how to
> fix it.  Since I do not want to replace the low-powered embedded computer with 
> a full 24/7 desktop with real serial ports, Curt's solution won't work for me.
> 





More information about the Xastir mailing list