51

Odp: Reconnect połączenia automatyczny

I pytasz się jak? Ja Ci napiszę a ty powiedź co to robi

UPTIME=$(awk '{printf "%d", $1}' /proc/uptime)
[ $UPTIME -le  240 ] && exit 0
Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

52

Odp: Reconnect połączenia automatyczny

Cezary napisał/a:

I pytasz się jak? Ja Ci napiszę a ty powiedź co to robi

UPTIME=$(awk '{printf "%d", $1}' /proc/uptime)
[ $UPTIME -le  240 ] && exit 0

240 to sekundy nie uruchomienia , a co dalej smile
W jakiej formie i gdzie to wkleić?

53 (edytowany przez Cezary 2022-12-18 15:49:58)

Odp: Reconnect połączenia automatyczny

Dokładnie. Jeżeli uptime routera jest mniejszy niż 240 to wychodzi ze skryptu. Umieść to jako drugą i trzecią linię:

#!/bin/sh
UPTIME=$(awk '{printf "%d", $1}' /proc/uptime)
[ $UPTIME -le  240 ] && exit 0
i tu dalej kod

To skrypt nie wykona się jeżeli uptime routera będzie mniejszy niż te 240sekund.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

54 (edytowany przez pazdzioch 2022-12-18 15:58:18)

Odp: Reconnect połączenia automatyczny

#!/bin/sh
UPTIME=$(awk '{printf "%d", $1}' /proc/uptime)
[ $UPTIME -le  240 ] && exit 0
logger "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
logger "|| Monitor WAN / WWAN / LTE    ||"
logger "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
if ! ping -q -c 1 -W 10 google.com > /dev/null; then
        (ifup wwan) &
fi


o tak ?

55

Odp: Reconnect połączenia automatyczny

Spacja pomiędzy 240 a nawiasem powinna być. Ja poprawiłem to w poprzednim poście.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

56

Odp: Reconnect połączenia automatyczny

Wszystko działa jak nalezy, zapisuje wszystko na dysku onedrive na przyszlosc smile

57

Odp: Reconnect połączenia automatyczny

A czy jest mozliwość aby monitorowac radio wifi w zakresie 2.4 ostatnio cos mi świruje, tak jak by sie zawiesza, znika z dostepnych sieci wifi, dodam że przez 2.4 Ghz mam tryb klienta wwan, i on dziala, bo internet po kablu normalnie dziala, znika dostepność 2,4 Ghz

58

Odp: Reconnect połączenia automatyczny

Jeżeli klient jest rozłączony to ap też nie bedzie. Jak to działa. I to może przyczyną że nie widzisz ap.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

59

Odp: Reconnect połączenia automatyczny

Jednak na radiu 5Ghz mam wwan, nie wiem dlaczego mi sie ubzdurało że na 2.4.
mam kamerke na 2.4 i tutaj pojawia sie problem, czy da sie to monitorowac

60

Odp: Reconnect połączenia automatyczny

logread - patrz co się dzieje
iw dev - pokazuje uruchomione sieci

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

61

Odp: Reconnect połączenia automatyczny

Tue Dec 20 20:30:23 2022 daemon.notice netifd: wwan (19578): udhcpc: sending dis                                                                                                                                                             cover
Tue Dec 20 20:30:23 2022 daemon.notice netifd: wwan (19578): udhcpc: sending sel                                                                                                                                                             ect for 192.168.2.106
Tue Dec 20 20:30:23 2022 daemon.notice netifd: wwan (19578): udhcpc: lease of 19                                                                                                                                                             2.168.2.106 obtained, lease time 1814400
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: Connected to system UBus
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: started, version 2.85 cache                                                                                                                                                             size 150
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: DNS service limited to loca                                                                                                                                                             l subnets
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: compile time options: IPv6                                                                                                                                                              GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack n                                                                                                                                                             o-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: UBus support enabled: conne                                                                                                                                                             cted to system bus
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq-dhcp[19911]: DHCP, IP range 192.168                                                                                                                                                             .10.100 -- 192.168.10.249, lease time 12h
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain test
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain onion
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain localhost
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain local
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain invalid
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain bind
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain lan
Tue Dec 20 20:30:23 2022 daemon.warn dnsmasq[19911]: no servers found in /tmp/re                                                                                                                                                             solv.conf.d/resolv.conf.auto, will retry
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: read /etc/hosts - 4 address                                                                                                                                                             es
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: read /tmp/hosts/odhcpd - 1                                                                                                                                                              addresses
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: read /tmp/hosts/dhcp.cfg014                                                                                                                                                             11c - 16 addresses
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq-dhcp[19911]: read /etc/ethers - 0 a                                                                                                                                                             ddresses
Tue Dec 20 20:30:23 2022 daemon.notice netifd: Interface 'wwan' is now up
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: reading /tmp/resolv.conf.d/                                                                                                                                                             resolv.conf.auto
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain test
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain onion
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain localhost
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain local
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain invalid
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain bind
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using only locally-known ad                                                                                                                                                             dresses for domain lan
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using nameserver 1.1.1.1#53
Tue Dec 20 20:30:23 2022 daemon.info dnsmasq[19911]: using nameserver 8.8.8.8#53
Tue Dec 20 20:30:23 2022 user.info adblock-4.1.3[19644]: adblock is currently di                                                                                                                                                             sabled, please set the config option 'adb_enabled' to '1' to use this service
Tue Dec 20 20:30:23 2022 user.notice firewall: Reloading firewall due to ifup of                                                                                                                                                              wwan (wlan1)
Tue Dec 20 20:30:29 2022 daemon.info dnsmasq[19911]: exiting on receipt of SIGTE                                                                                                                                                             RM
Tue Dec 20 20:30:29 2022 user.notice dnsmasq: DNS rebinding protection is active                                                                                                                                                             , will discard upstream RFC1918 responses!
Tue Dec 20 20:30:29 2022 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Tue Dec 20 20:30:29 2022 user.notice dnsmasq: Allowing RFC1918 responses for dom                                                                                                                                                             ain free.aero2.net.pl
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: Connected to system UBus
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: started, version 2.85 cache                                                                                                                                                             size 150
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: DNS service limited to loca                                                                                                                                                             l subnets
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: compile time options: IPv6                                                                                                                                                              GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack n                                                                                                                                                             o-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: UBus support enabled: conne                                                                                                                                                             cted to system bus
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq-dhcp[20498]: DHCP, IP range 192.168                                                                                                                                                             .10.100 -- 192.168.10.249, lease time 12h
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain test
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain onion
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain localhost
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain local
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain invalid
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain bind
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain lan
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: reading /tmp/resolv.conf.d/                                                                                                                                                             resolv.conf.auto
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain test
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain onion
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain localhost
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain local
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain invalid
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain bind
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using only locally-known ad                                                                                                                                                             dresses for domain lan
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using nameserver 1.1.1.1#53
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: using nameserver 8.8.8.8#53
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: read /etc/hosts - 4 address                                                                                                                                                             es
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: read /tmp/hosts/odhcpd - 1                                                                                                                                                              addresses
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq[20498]: read /tmp/hosts/dhcp.cfg014                                                                                                                                                             11c - 16 addresses
Tue Dec 20 20:30:33 2022 daemon.info dnsmasq-dhcp[20498]: read /etc/ethers - 0 a                                                                                                                                                             ddresses
Tue Dec 20 20:30:33 2022 user.info adblock-4.1.3[20232]: adblock is currently di                                                                                                                                                             sabled, please set the config option 'adb_enabled' to '1' to use this service
Tue Dec 20 20:30:35 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 68:c6                                                                                                                                                             :3a:ef:43:2c
Tue Dec 20 20:30:35 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: disassociated
Tue Dec 20 20:30:36 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:30:42 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED d8:b0                                                                                                                                                             :53:32:b3:b2
Tue Dec 20 20:30:42 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 1c:cc                                                                                                                                                             :d6:b8:fe:44
Tue Dec 20 20:30:44 2022 daemon.info hostapd: wlan1-1: STA 1c:cc:d6:b8:fe:44 IEE                                                                                                                                                             E 802.11: authenticated
Tue Dec 20 20:30:44 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              1c:cc:d6:b8:fe:44 1
Tue Dec 20 20:30:44 2022 daemon.info hostapd: wlan1-1: STA 1c:cc:d6:b8:fe:44 IEE                                                                                                                                                             E 802.11: associated (aid 1)
Tue Dec 20 20:30:44 2022 daemon.notice hostapd: wlan1-1: AP-STA-CONNECTED 1c:cc:                                                                                                                                                             d6:b8:fe:44
Tue Dec 20 20:30:44 2022 daemon.info hostapd: wlan1-1: STA 1c:cc:d6:b8:fe:44 WPA                                                                                                                                                             : pairwise key handshake completed (RSN)
Tue Dec 20 20:30:44 2022 daemon.info dnsmasq-dhcp[20498]: DHCPREQUEST(br-lan) 19                                                                                                                                                             2.168.10.124 1c:cc:d6:b8:fe:44
Tue Dec 20 20:30:44 2022 daemon.info dnsmasq-dhcp[20498]: DHCPACK(br-lan) 192.16                                                                                                                                                             8.10.124 1c:cc:d6:b8:fe:44 Redmi-Note-8
Tue Dec 20 20:30:45 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: authenticated
Tue Dec 20 20:30:45 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              d8:b0:53:32:b3:b2 2
Tue Dec 20 20:30:45 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: associated (aid 2)
Tue Dec 20 20:30:45 2022 daemon.notice hostapd: wlan1-1: AP-STA-CONNECTED d8:b0:                                                                                                                                                             53:32:b3:b2
Tue Dec 20 20:30:45 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 WPA                                                                                                                                                             : pairwise key handshake completed (RSN)
Tue Dec 20 20:30:45 2022 daemon.info dnsmasq-dhcp[20498]: DHCPREQUEST(br-lan) 19                                                                                                                                                             2.168.10.124 1c:cc:d6:b8:fe:44
Tue Dec 20 20:30:45 2022 daemon.info dnsmasq-dhcp[20498]: DHCPACK(br-lan) 192.16                                                                                                                                                             8.10.124 1c:cc:d6:b8:fe:44 Redmi-Note-8
Tue Dec 20 20:30:45 2022 daemon.info dnsmasq-dhcp[20498]: DHCPREQUEST(br-lan) 19                                                                                                                                                             2.168.10.146 d8:b0:53:32:b3:b2
Tue Dec 20 20:30:45 2022 daemon.info dnsmasq-dhcp[20498]: DHCPACK(br-lan) 192.16                                                                                                                                                             8.10.146 d8:b0:53:32:b3:b2 PocoF3
Tue Dec 20 20:32:53 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:33:00 2022 cron.err crond[2895]: USER root pid 20561 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:33:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:33:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:33:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:34:11 2022 user.info : luci: accepted login on /admin/dashboard fo                                                                                                                                                             r root from 10.147.17.119
Tue Dec 20 20:35:48 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 04:cf                                                                                                                                                             :8c:9c:7b:d2
Tue Dec 20 20:35:48 2022 daemon.info hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEEE                                                                                                                                                              802.11: disassociated due to inactivity
Tue Dec 20 20:35:49 2022 daemon.info hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:36:00 2022 cron.err crond[2895]: USER root pid 20654 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:36:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:36:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:36:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:36:09 2022 user.info : luci: accepted login on /admin/network/netw                                                                                                                                                             ork for root from 192.168.10.134
Tue Dec 20 20:36:30 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:36:56 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:36:58 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:36:58 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:36:58 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:37:16 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:37:26 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:37:30 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 8a:b3                                                                                                                                                             :5d:41:b4:89
Tue Dec 20 20:37:30 2022 daemon.info hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEEE                                                                                                                                                              802.11: disassociated due to inactivity
Tue Dec 20 20:37:31 2022 daemon.info hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:37:47 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:37:50 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:37:53 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:38:43 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:38:43 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:38:44 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:38:50 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:39:00 2022 cron.err crond[2895]: USER root pid 20830 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:39:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:39:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:39:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:40:19 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:40:40 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:40:40 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:40:40 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:41:58 2022 daemon.info hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:42:00 2022 cron.err crond[2895]: USER root pid 20845 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:42:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:42:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:42:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:43:49 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:49 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:50 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:50 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:43:51 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:51 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:52 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:52 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:43:53 2022 daemon.notice hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:44:53 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:45:00 2022 cron.err crond[2895]: USER root pid 20860 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:45:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:45:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:45:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:45:22 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:46:00 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:46:05 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:46:44 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:47:02 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:48:00 2022 cron.err crond[2895]: USER root pid 20911 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:48:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:48:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:48:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:48:49 2022 daemon.info hostapd: wlan0: STA 8a:b3:5d:41:b4:89 IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:49:21 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:49:53 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:50:00 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:50:03 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:51:00 2022 cron.err crond[2895]: USER root pid 20925 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:51:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:51:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:51:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:51:20 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:51:54 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:53:30 2022 daemon.notice hostapd: wlan1-1: AP-STA-DISCONNECTED d8:                                                                                                                                                             b0:53:32:b3:b2
Tue Dec 20 20:53:30 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              d8:b0:53:32:b3:b2 1
Tue Dec 20 20:53:30 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: authenticated
Tue Dec 20 20:53:30 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              d8:b0:53:32:b3:b2 2
Tue Dec 20 20:53:30 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: associated (aid 2)
Tue Dec 20 20:53:30 2022 daemon.notice hostapd: wlan1-1: AP-STA-CONNECTED d8:b0:                                                                                                                                                             53:32:b3:b2
Tue Dec 20 20:53:30 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 WPA                                                                                                                                                             : pairwise key handshake completed (RSN)
Tue Dec 20 20:53:30 2022 daemon.info dnsmasq-dhcp[20498]: DHCPREQUEST(br-lan) 19                                                                                                                                                             2.168.10.146 d8:b0:53:32:b3:b2
Tue Dec 20 20:53:30 2022 daemon.info dnsmasq-dhcp[20498]: DHCPACK(br-lan) 192.16                                                                                                                                                             8.10.146 d8:b0:53:32:b3:b2 PocoF3
Tue Dec 20 20:54:00 2022 cron.err crond[2895]: USER root pid 20941 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:54:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:54:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:54:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:55:00 2022 daemon.info hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEEE                                                                                                                                                              802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Dec 20 20:55:25 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:56:48 2022 daemon.notice hostapd: wlan1-1: AP-STA-DISCONNECTED d8:                                                                                                                                                             b0:53:32:b3:b2
Tue Dec 20 20:56:48 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              d8:b0:53:32:b3:b2 1
Tue Dec 20 20:56:48 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: authenticated
Tue Dec 20 20:56:48 2022 daemon.notice hostapd: wlan1-1: STA-OPMODE-N_SS-CHANGED                                                                                                                                                              d8:b0:53:32:b3:b2 2
Tue Dec 20 20:56:48 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 IEE                                                                                                                                                             E 802.11: associated (aid 2)
Tue Dec 20 20:56:48 2022 daemon.notice hostapd: wlan1-1: AP-STA-CONNECTED d8:b0:                                                                                                                                                             53:32:b3:b2
Tue Dec 20 20:56:48 2022 daemon.info hostapd: wlan1-1: STA d8:b0:53:32:b3:b2 WPA                                                                                                                                                             : pairwise key handshake completed (RSN)
Tue Dec 20 20:56:48 2022 daemon.info dnsmasq-dhcp[20498]: DHCPREQUEST(br-lan) 19                                                                                                                                                             2.168.10.146 d8:b0:53:32:b3:b2
Tue Dec 20 20:56:48 2022 daemon.info dnsmasq-dhcp[20498]: DHCPACK(br-lan) 192.16                                                                                                                                                             8.10.146 d8:b0:53:32:b3:b2 PocoF3
Tue Dec 20 20:57:00 2022 cron.err crond[2895]: USER root pid 20964 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 20:57:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:57:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 20:57:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 20:57:19 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:57:19 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:57:20 2022 daemon.notice hostapd: wlan0: STA 04:cf:8c:9c:7b:d2 IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:58:02 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 20:59:03 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 21:00:00 2022 cron.err crond[2895]: USER root pid 20981 cmd /bin/test                                                                                                                                                             er.sh
Tue Dec 20 21:00:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 21:00:00 2022 user.notice root: ##  Monitor polaczenia WAN / WWAN / L                                                                                                                                                             TE    ##
Tue Dec 20 21:00:00 2022 user.notice root: #####################################                                                                                                                                                             ##
Tue Dec 20 21:00:04 2022 authpriv.info dropbear[20987]: Child connection from 19                                                                                                                                                             2.168.10.134:56997
Tue Dec 20 21:00:07 2022 daemon.notice hostapd: wlan0: STA 68:c6:3a:ef:43:2c IEE                                                                                                                                                             E 802.11: did not acknowledge authentication response
Tue Dec 20 21:00:09 2022 authpriv.notice dropbear[20987]: Password auth succeede                                                                                                                                                             d for 'root' from 192.168.10.134:56997

62

Odp: Reconnect połączenia automatyczny

root@OpenWRT:~# iw dev
phy#1
        Interface wlan1-1
                ifindex 20
                wdev 0x100000007
                addr b2:39:56:1e:02:6c
                ssid 5
                type AP
                channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcolt                                                                                                                                                             x-bytes tx-packets
                        0       0       43      0       0       0       0      1                                                                                                                                                             3440            44
        Interface wlan1
                ifindex 19
                wdev 0x100000006
                addr b0:39:56:1e:02:6c
                ssid WLAN-628848
                type managed
                channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcolt                                                                                                                                                             x-bytes tx-packets
                        0       0       0       0       0       0       0      0                                                                                                                                                             0
phy#0
        Interface wlan0
                ifindex 16
                wdev 0x3
                addr b0:39:56:1e:02:68
                ssid 2.4
                type AP
                channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcolt                                                                                                                                                             x-bytes tx-packets
                        0       0       559     164     0       33      1202   1                                                                                                                                                             77494           1124

63

Odp: Reconnect połączenia automatyczny

I po co to pokazałeś? Jak teraz działa to działa, chciałeś monitorować co się dzieje to... monitoruj. Tak, masz pełno rozłączania w logach.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

64

Odp: Reconnect połączenia automatyczny

bez restartu sam sie naprawił

65

Odp: Reconnect połączenia automatyczny

Cezary jak to zmodyfikować:

#!/bin/sh
    if ! ping -q -c 1 -W 10 google.com > /dev/null; then
        (ifup wan) &
    fi


żeby osiągnąć cel w którym założenie jest takie, że komenda ifup wan wykona się jeśli ping będzie wyższy niż np 300ms?

66

Odp: Reconnect połączenia automatyczny

#!/bin/sh
A=$(ping -q -c 3 -W 10 google.com)
if echo "$A" | grep -q "round-trip"; then
  AVG=$(echo "$A" | awk -F[/] '/round-trip/ {print $4*1000}')
  if [ "$AVG" -gt 300000 ]; then
    (ifup wan) &
  else
     echo "Ok, mniej niż 300ms"
  fi 
else 
 (ifup wan) &
fi
Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

67 (edytowany przez smereka 2024-09-20 09:14:17)

Odp: Reconnect połączenia automatyczny

Dziękuję działa. Ta wartość 300000 w jakich jednostkach jest wyrażona? W sensie jakbym chciał np żeby to fizycznie były 3ms to co tam wpisać?

Ok podzielić przez 1000 już zrozumiałem. Dzięki jeszcze raz smile

68

Odp: Reconnect połączenia automatyczny

Bo ping daje w ms z trzema miejscami po przecinku a shell nie umie operacji zmiennoprzecinkowych, wiec mnożone jest to * 1000 żeby przecinka się pozbyć.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.