From 83428524ac935736b01119d87d45599f33bd041b Mon Sep 17 00:00:00 2001 From: Amin Ben Romdhane Date: Mon, 19 Jan 2026 11:06:38 +0100 Subject: [PATCH] wifimngr: Debug --- wifimngr/files/etc/init.d/wifimngr | 5 +++++ .../files/usr/bin/wifi_opclass_trigger.sh | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 wifimngr/files/usr/bin/wifi_opclass_trigger.sh diff --git a/wifimngr/files/etc/init.d/wifimngr b/wifimngr/files/etc/init.d/wifimngr index b08b01852..86105381b 100755 --- a/wifimngr/files/etc/init.d/wifimngr +++ b/wifimngr/files/etc/init.d/wifimngr @@ -14,6 +14,11 @@ start_service() { # procd_set_param stderr 1 #for debugging only procd_set_param respawn procd_close_instance + + procd_open_instance wifi_opclass + procd_set_param command /bin/sh "/usr/bin/wifi_opclass_trigger.sh" + procd_set_param respawn + procd_close_instance } reload_service() { diff --git a/wifimngr/files/usr/bin/wifi_opclass_trigger.sh b/wifimngr/files/usr/bin/wifi_opclass_trigger.sh new file mode 100755 index 000000000..ed9be8aec --- /dev/null +++ b/wifimngr/files/usr/bin/wifi_opclass_trigger.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +LOG=/tmp/wifi_opclass_preferences.log +COUNT=0 +MAX=20 + +echo "=== wifi opclass_preferences start: $(date) ===" >> "$LOG" + +while [ "$COUNT" -lt "$MAX" ]; do + echo "radio phy0 opclass_preferences[$COUNT]:" >> "$LOG" + ubus call wifi.radio.phy0 opclass_preferences >> "$LOG" + + echo "radio phy1 opclass_preferences[$COUNT]:" >> "$LOG" + ubus call wifi.radio.phy1 opclass_preferences >> "$LOG" + + COUNT=$((COUNT + 1)) + sleep 3 +done + +echo "=== wifi opclass_preferences end: $(date) ===" >> "$LOG" +exit 0 +