Closed myde2001 closed 4 months ago
@myde2001 Please check with the command ... livelog if the main service outputs lines. If not, it is not running. If it exits early, an error should be shown - maybe required packages are missing? -> opkg update; opkg install (pkgname)
I am still using the scripts and they work fine. Hardware is Xiaomi AX3600 here.
This is the output of the command:
root@Router:~# sh /root/wrtpresence livelog
2024-06-29 [20-40-41] [INFO] Service was restarted.
2024-06-29 [20-40-44] [INFO] Service was restarted.
2024-06-29 [20-42-38] [INFO] Service was restarted.
2024-06-29 [20-42-48] [INFO] BEGIN logreader_loop
2024-06-29 [20-42-48] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [20-43-44] [INFO] Service was restarted.
2024-06-29 [20-43-54] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [20-43-54] [INFO] BEGIN logreader_loop
2024-06-29 [20-46-39] [INFO] Service was restarted.
2024-06-29 [20-46-49] [INFO] BEGIN disconnectIdxBumper_loop
I installed all the packages that the wrtpresence_main.sh
show and removed logd. My hardware is an ASUS TUF-AX4200
@myde2001 looks fine to me. I guess, syslog-ng is installed, too. What are your wifi interface names? I had a problem after switching to ax3600 and WDS instead of Batman mesh ago where the interface names were not recognized by the regex in the scripts. It does not output a connect line if you e.g. disconnect and reconnect your phone to/from Wifi?
The names are: phy0-ap0 and phy1-ap0.
Where should it output the disconnect and reconnect lines? In the livelog?
Thanks
Yes. Thats fine like it is.
I am not on a big screen now, so unable to deep dive. Check the comments on top of the file. Maybe you can run it with a "debug" command line to get more log output.
You could also open a second SSH session and follow:
logread -f
Your openwrt log should show disconnect/connect lines. If not, something is different outside of my script. The script just follows your routers log and filters out the wifi driver connect and disconnect events.
Hi, this is the output I get with the command logread -f
:
Jun 29 21:21:28 PLC-Cocina hostapd: wlan0: AP-STA-CONNECTED b8:5d:0a:xx:xx:xx
Jun 29 21:21:28 PLC-Cocina hostapd: wlan0: STA b8:5d:0a:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Jun 29 21:21:28 PLC-Cocina hostapd: wlan0: EAPOL-4WAY-HS-COMPLETED b8:5d:0a:xx:xx:xx
Jun 29 19:22:02 Router hostapd: phy0-ap0: AP-STA-DISCONNECTED b8:5d:0a:xx:xx:xx
Jun 29 19:22:07 Router hostapd: phy0-ap0: STA b8:5d:0a:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request
Jun 29 19:22:48 Router hostapd: phy1-ap0: STA b8:5d:0a:xx:xx:xx IEEE 802.11: authenticated
Jun 29 19:22:48 Router hostapd: phy1-ap0: STA b8:5d:0a:xx:xx:xx IEEE 802.11: associated (aid 2)
Jun 29 19:22:48 Router hostapd: phy1-ap0: AP-STA-CONNECTED b8:5d:0a:xx:xx:xx auth_alg=open
Jun 29 19:22:48 Router hostapd: phy1-ap0: STA b8:5d:0a:xx:xx:xx RADIUS: starting accounting session 3EF2EF089B4C3889
Jun 29 19:22:48 Router hostapd: phy1-ap0: STA b8:5d:0a:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Jun 29 19:22:48 Router hostapd: phy1-ap0: EAPOL-4WAY-HS-COMPLETED b8:5d:0a:xx:xx:xx
And the livelog of the service in debug mode:
root@Router:~# sh /root/wrtpresence livelog
2024-06-29 [20-42-48] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [20-43-44] [INFO] Service was restarted.
2024-06-29 [20-43-54] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [20-43-54] [INFO] BEGIN logreader_loop
2024-06-29 [20-46-39] [INFO] Service was restarted.
2024-06-29 [20-46-49] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [21-19-00] *************
2024-06-29 [21-19-01] [INFO] Service was restarted in DEBUG_MODE.
2024-06-29 [21-19-01] [INFO] BEGIN disconnectIdxBumper_loop
2024-06-29 [21-19-01] [INFO] BEGIN logreader_loop
Also, I'm using it in another AP with the slave config, that's why "PLC-Cocina" is shown
I don't remember , but maybe i've hardcoded the router naming prefix which is in my case "WifiAP**". Look for that string in the code and adjust it - or try renaming the routers like WifiAP-01 WifiAP-02
Your syslog-ng and logd seems configured correctly if the main nodes receives events from both logs. :)
Yes, it is hardcoded! I found it, I'm going to try and change the hostname
Now the files seems to be generated. Thanks. I'll try to get it working with MQTT and I'll get back to thank you if I worked!
Hi, I followed the steps but in my device it seems the dto files are not generating.
What could it be? Thanks