



Todo esta funcionando ok. Gracias a Pinguino y otros. Me he dado cuenta que todos los días a las 12:35 de la mañana, el sistema deja de funcionar, el motivo es que la linea del barco (Pepephone) se queda sin internet, durante unos 5 minutos exactos, todos los dias a la misma hora, poniendo en el cliente TCP de Diavolo persist=yes, Kplex (de Casa) no para, por lo que el ttyUSB0, del Ais de casa sigue enviando datos, pero no los del barco, y poniendo persist=fromstart, Kplex se para totalmente, por lo que esta opcion la he descartado. (Vuelve a funcionar al cabo de media hora, porque Pinguino le puso un reinicio automatico cada media hora a Kplex)
He leido en el manual de Kplex que existe una opcion para poner en el servidor del barco OUT que es Keepalive=Yes, que por defecto son 2 horas, pero como esta en ingles pues no me he enterado muy bien.
kplex will detect a dropped connection if the other end closes down "cleanly", i.e. the program it is connecting to shuts down or the machine it is running on is gracefully shut down. If the "timeout" option is specified, kplex will consider a connection dropped if it receives no acknowledgment to data it is attempting to send within the number of seconds specified in the argument. It may not so easily be able to detect a failed endpoint if it is purely reading from the other end and it is not notified that the data source has gone away. This may frequently happen if connecting from behind NAT (NAT mappings are lost) or if the other computer crashes or has power removed. In these cases it is useful to specify the "keepalive=yes" option (the default is "no"). This will cause tcp to send probes to the remote end point to check that it is still "alive". The first probe is sent after <keepidle> seconds of inactivity. The default value will be system dependent but is usually 2 hours. If no reply is received to this probe, further probes are sent <keepinterval> seconds apart. If <count> probes are sent without reply, kplex considers the connection dropped and will attempt to reconnect. The default values for the interval between keepalive probes and the number sent before the connection is considered lost are system dependent, but invariably higher than desirable for kplex's purposes.
A ver si con esto soluciono el pequeño problema que tengo.
EDITO: Parece ser que tenia puesto el optional=yes en el servidor de diavolo. Puede ser este el error, mañana lo comprobaré