TTY read timeout - Closing TTY for later re-open

32 views
Skip to first unread message

Alfredo IZ7BOJ

unread,
Dec 7, 2021, 9:01:16 AM12/7/21
to Aprx software
Hi guys,
I added a KISS over TCP port in my aprx towards a LoRa software modem.
The LoRa traffic here is very low, so it happens that this port doesn't receive traffic for many hours.
In aprx log I see a disconnection every hour:

2021-12-07 09:52:19.029 TTY tcp!127.0.0.1!10001! read timeout. Closing TTY for later re-open.
2021-12-07 10:52:54.026 TTY tcp!127.0.0.1!10001! read timeout. Closing TTY for later re-open.
2021-12-07 11:53:25.451 TTY tcp!127.0.0.1!10001! read timeout. Closing TTY for later re-open.
2021-12-07 12:54:04.028 TTY tcp!127.0.0.1!10001! read timeout. Closing TTY for later re-open.

Looking in ttyreader.c , it seems to be the normal behaviour if the port is in idle for 1hour (correct me if I'm wrong).
Although it's not notified in the log, aprx establish again the connection after 30seconds.
Which is the rationale behind this behaviour? If traffic on that port starts exactly during this 30seconds, I will lose it.

Thanks in advance for clarifications.
73'
Alfredo IZ7BOJ

John

unread,
Dec 7, 2021, 9:24:33 AM12/7/21
to aprx-s...@googlegroups.com

Hi Alfredo,

 

My guess is that it’s intended to detect a stalled modem that’s not completely disconnected from the system, but is no longer behaving. The close and reopen of the port should normally re-establish the connection to the modem.

 

If you know you see virtually no traffic, perhaps you could set up a keepalive beacon somewhere on another transmitter?

 

73,

John (M5ET)

--
You received this message because you are subscribed to the Google Groups "Aprx software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aprx-softwar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aprx-software/ad6d4407-d0d0-41e2-84c5-db0115d17cf9n%40googlegroups.com.

Matti Aarnio

unread,
Dec 10, 2021, 3:58:15 AM12/10/21
to aprx-s...@googlegroups.com
Hi,

This feature exists for case of serial port interface devices that just hang up, and need to be re-opened to resume working.
Mostly such things are USB serial ports.

The timeout is default 3600 seconds, but you can configure it to value 0 to disable it.
That configuration is done on serial-device parameters:

serial-device .... timeout 0

If you never expect trouble, disable it.
If you think a re-connection after longer idle might help, adjust the timeout.
The default value works on APRS network, others may need adjusting :-)

73
Matti OH2MQK
Reply all
Reply to author
Forward
0 new messages