no TCP connection by WLAN from

I have a TCP connection to a PLC via Wi-Fi. When night is the Wi-Fi is set up for 5 hours of the next day no TCP connection to the PLC. On the Linux side switches off irgent something.

If I turn off the Wi-Fi only briefly I get re pure connection to the PLC

Can anyone tell me how I can change this?

Does anyone have a solution for the WIFI problem?

If your Yun setup as dhcp client, then might be dhcp Address Lease Time from upstream device (router)
default time out is 120 minutes/ 2 hours.

Plan A:

route add -net gw "$i"



Plan B:

Set up Yun as static IP address.

Hello Variant 1 has not resolved my problem

setup_interface () {
        proto_init_update "*" 1
        proto_add_ipv4_address "$ip" "${subnet:-}"
        # TODO: apply $broadcast

        for i in $router; do
                proto_add_ipv4_route 0 "$i"
                route add -net gw "$i"

I try to use version 2

The problem was not resolved.
There is no automatic TCP connection to the PLC when the WLAN is for an extended period.

Where can I find the time when the WLAN is adjustable from?