[Xastir] Device closing on failure
Tom Russo
russo at bogodyn.org
Thu Sep 29 14:47:59 EDT 2011
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.
--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM
"One man alone can be pretty dumb sometimes, but for real bona fide
stupidity, there ain't nothin' can beat teamwork." - Edward Abbey
More information about the Xastir
mailing list