It is, but you will need to create the hotplug script to do the work yourself. Check the following Wiki article on how to do this: https://openwrt.org/docs/guide-user/hardware/hardware.button
It maps to BTN_0
.
It is, but you will need to create the hotplug script to do the work yourself. Check the following Wiki article on how to do this: https://openwrt.org/docs/guide-user/hardware/hardware.button
It maps to BTN_0
.
I've two hotplug scripts which are shuting down all leds by setting each brightness to 0 and otherwise reload the led deamon with the values from (l)uci when an event is triggered.
Since the only triggers defined in my configuration are for WiFi devices, the second script is in the network hotplug folder.
My LED configuration (/etc/config/system):
config led
option sysfs 'white:system'
option trigger 'none'
option default '0'
config led
option name 'WiFi 2.4GHz'
option sysfs 'green:led3'
option trigger 'netdev'
option dev 'phy0-ap0'
list mode 'link'
config led
option name 'WiFi 2.4GHz'
option sysfs 'white:led5'
option trigger 'netdev'
option dev 'phy0-ap0'
list mode 'link'
config led
option name 'WiFi 5GHz'
option sysfs 'green:led1'
option trigger 'netdev'
option dev 'phy1-ap0'
list mode 'link'
config led
option name 'WiFi 5GHz'
option sysfs 'red:system'
option trigger 'netdev'
option dev 'phy1-ap0'
list mode 'link'
The script for using the hotplug event for the button is not a big deal, /etc/hotplug.d/button/99-led:
#!/bin/sh
if [ "$BUTTON" = "BTN_0" ]; then
if [ "$ACTION" = "released" ]; then
for brightness in /sys/class/leds/*/brightness ; do
echo 0 > $brightness
done
elif [ "$ACTION" = "pressed" ]; then
/etc/init.d/led restart
fi
fi
The tricky part is reading the status of the button after a reboot or when a trigger has been fired, /etc/hotplug.d/net/99-led-off-button:
#!/bin/sh
if grep -E '^ gpio-496 .*) in hi' /sys/kernel/debug/gpio ; then
#Button led !pressed
for brightness in /sys/class/leds/*/brightness ; do
echo 0 > $brightness
done
else
#Button led pressed
:
fi
I don't know if this is the most elegant solution for this task but it works. Maybe someone has an idea for a more generic solution.
Flashed my Multy M1 to OpenWRT snapshot yesterday, works like a charm with the hints above (dawn, luci-dawn, LED script). Thanks everybody for all the efforts!
And it looks like the CPU is having less of a hard time with OpenWRT compared to the OEM firmware: not only the GUI is much more responsive, but also device is not getting as warm as before. Did not do any power consumption tests but can imagine overall consumption is lower as well (before the devices got handwarm, now they stay cool).
Most difficult was to configure one of my AP's as wireless bridge, as at it's location there is no ethernet available. Tried to use 802.11s as mesh solution, but unsuccesfully. WDS at 5 Ghz was also not stable (probably because of the range) but now WDS at 2.4 Ghz is rock stable. Also, I have bridged the WAN port to the LAN interface so that I can use the 4th ethernet port as well.
Main improvement over the OEM firmware is that I can use the other 2 AP's with ethernet backhaul connected on my main network. Zyxel firmware requires a separate network for this.
I use 802.11s and b.a.t.m.a.n without issues. Did you change the wpad to a full version ?
Thank you for the hard work. Based on this thread I've bought a couple of WSM20s and flashed first time with no issue. Looks to be a great, cheap AX AP.
Apologies for the stupid question, but searching has not led me to an answer....
I'm running the router as a dumb AP. I also want to use all four ethernet ports. I would have though that I need to add eth0, wan and the radios into the bridge. If I do that I can't access the WSM via ethernet. If I add lan1-3 to the bridge I can. I presumed that eth0 was the switch interface for ports 1-3, but this clearly isn't the case.
Everything is working, but I'm intrigued because I clearly don't understand what is going on.
The bridge br-lan is already there by default and it spans lan1-lan3 and the radios. The only thing to do is adding wan to this bridge.
Thank you Andy.
Out of interest, what does eth0 represent?
I don't have the device at hand and I'm not entirely sure which interfaces there are. Usually, eth0 represents the whole switch (i.e. all four ethernet ports of this device), but since this is a DSA-based device, individual network interfaces are available for every port (lan1-3 and wan).
Check this DSA tutorial, there is no mention of ever using eth0
. For an in-depth description on DSA, see the Linux kernel documentation, especially the graphical representation.