Arien, in a very related but slightly different issue on this topic weāre discussing, going to your first reply below for the morse.sh script, hereās something thatās happening when I turn the halow radio off then back on. In the morse.sh script, itās able to set the led triggers based on the current phy[n]assoc when the halow radio comes up, authenticates and associates. Our led goes green when that assoc happens, red when it goes away (the red is active low, green active high so on the same trigger, they go opposite).
Hereās the problem I found. Refer to the attached pic then continue after viewing that.
Then, click the enable button on that 2nd line to start the radio back up again. Debug log shows things starting back up, authenticating and associating. The led turns green then a few seconds later, the associated stations in luci shows the ap information.
The bad: usually the led stays green, but sometimes, after 3 seconds, the led turns red, but luci still shows the associated station.
I found something in the log using ālogreadā (which gives more info than the dmesg log which is simply the interactive output to the uart for teraterm). Right after the āwlan0: link becomes readyā line, in the following log items, whenever the line that looks like āThu Nov 14 01:29:20 2024 user.notice root: Prplmesh is disabledā is in the log at that spot below, the led goes from green to red 3 seconds after it turns green. Makes total sense when you look at the timestamps of the log items. When that line isnāt there, the led stays green.
The log:
(As reference, after this line happens, green led immediately goes on)
Thu Nov 14 01:29:17 2024 kern.info kernel: [10976.730262] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
(Then, each of these next entries are in all logs, except the prplmesh disabled ā thatās only in the one where the led turned red. Thereās some delay due to that because in the logs that green stayed on, the timestamp for all below are on the same second. Note how this happened 3 seconds after the led turned green, exactly what I counted when the led went re)
Thu Nov 14 01:29:17 2024 daemon.notice netifd: ahwlan (20405): udhcpc: started, v1.36.1
Thu Nov 14 01:29:17 2024 daemon.notice netifd: ahwlan (20405): udhcpc: broadcasting discover
Thu Nov 14 01:29:20 2024 user.notice root: Prplmesh is disabled
Thu Nov 14 01:29:20 2024 daemon.notice netifd: ahwlan (20405): udhcpc: broadcasting discover
Thu Nov 14 01:29:20 2024 daemon.notice netifd: ahwlan (20405): udhcpc: broadcasting select for 192.168.1.194, server 192.168.1.1
Thu Nov 14 01:29:20 2024 daemon.notice netifd: ahwlan (20405): udhcpc: lease of 192.168.1.194 obtained from 192.168.1.1, lease time 43200
Thu Nov 14 01:29:20 2024 daemon.notice netifd: Interface 'ahwlan' is now up
MORE INFO:
When I do āuci showā, it includes this in the output:
prplmesh.config.enable='0'
Was curious because when I did a grep for āPrplmesh is disabledā, the file ./feeds/prpl/prplmesh/files/etc/init.d/prplmesh came up and has the following routine:
start_service() {
if [ "$(uci get prplmesh.config.enable 2>/dev/null)" = "1" ]; then
start_agent_monitor
procd_open_instance
procd_set_param command /opt/prplmesh/scripts/prplmesh.init start
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
else
logger "Prplmesh is disabled"
fi
}
So, whatever is calling this start_service is then displaying that message. And it only calls this for whatever reason and because of that, turns the led red from green. And, both green and red are triggered by the phy[n]assoc itās set to, as it shows when it just happened again:
root@ep-hilink-d94cda:/# cat /sys/devices/platform/leds/leds/green:sys/trigger
none switch0 timer heartbeat default-on netdev phy0rx phy0tx phy0assoc phy0radio phy0tpt usbport mmc0 phy32rx phy32tx [phy32assoc] phy32radio
root@ep-hilink-d94cda:/# cat /sys/devices/platform/leds/leds/red:sys/trigger
none switch0 timer heartbeat default-on netdev phy0rx phy0tx phy0assoc phy0radio phy0tpt usbport mmc0 phy32rx phy32tx [phy32assoc] phy32radio
I couldnāt find where start_service was called when I did a grep on the project.
So, what is it doing that makes the led go red but still shows in luci that halow is connected with the entry in the associated stations list?
Does all that make sense?
Don
(attachments)