HI,
i want to use another App for WOL and Merlin has made a script for this:
https://github.com/RMerl/asuswrt-merlin/wiki/WOL-Script-Wake-Up-Your-Webserver-On-Internet-Traffic
This works fine but only for one device but i have more then on PC that i want to wake via WOL.
So i found a script that worked fine for every device in your Network. It based on Merlins script with a few changes:
1. the "services-start" :
-----------------------------------------------------------------------
#!/bin/sh
#script for sending WOL packets when traffic to specified ip's
sh /jffs/scripts/wake.sh&
arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF
---------------------------------------------------------------------
Change the red marked to your IP.
2. "wake.sh":
-------------------------------------------------------------------------
#!/bin/sh
INTERVAL=5
NUMP=1
OLD=""
TARGET=192.168.1.254
IFACE=br0
MAC=FF:FF:FF:FF:FF:FF
WOL=/usr/bin/ether-wake
LOGFILE="/var/log/ether-wake.log"
while sleep $INTERVAL;do
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ {print }' | tail -1`
SRC=`echo $NEW | awk -F'[=| ]' '{print $8}'`
DPORT=`echo $NEW | awk -F'[=| ]' '{print $27}'`
PROTO=`echo $NEW | awk -F'[=| ]' '{print $23}'`
if [ "$NEW" != "" -a "$NEW" != "$OLD" ]; then
if ! ping -qc $NUMP $TARGET >/dev/null; then
# echo "NOWAKE $TARGET was accessed by $SRC, port $DPORT, protocol $PROTO and is already alive at" `date`>> $LOGFILE
# else
echo "WAKE $TARGET requested by $SRC, port $DPORT, protocol $PROTO at" `date`>> $LOGFILE
$WOL -i $IFACE $MAC
sleep 5
fi
OLD=$NEW
fi
done
-----------------------------------------------------------------------
Also, change the red marked when your is different.
All other steps like Merlin´s WOL manual.
The last thing is, make a Port Forwarding: Forward Port 9 to 192.168.1.254 UDP
Now i can use any other WOL App , i use this for Android: https://play.google.com/store/apps/details?id=com.benfinnigan.wol and it worked fine and is much faster then the AiCloud App.
Hope this is usefull for some one and sorry for my bad english...
i want to use another App for WOL and Merlin has made a script for this:
https://github.com/RMerl/asuswrt-merlin/wiki/WOL-Script-Wake-Up-Your-Webserver-On-Internet-Traffic
This works fine but only for one device but i have more then on PC that i want to wake via WOL.
So i found a script that worked fine for every device in your Network. It based on Merlins script with a few changes:
1. the "services-start" :
-----------------------------------------------------------------------
#!/bin/sh
#script for sending WOL packets when traffic to specified ip's
sh /jffs/scripts/wake.sh&
arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF
---------------------------------------------------------------------
Change the red marked to your IP.
2. "wake.sh":
-------------------------------------------------------------------------
#!/bin/sh
INTERVAL=5
NUMP=1
OLD=""
TARGET=192.168.1.254
IFACE=br0
MAC=FF:FF:FF:FF:FF:FF
WOL=/usr/bin/ether-wake
LOGFILE="/var/log/ether-wake.log"
while sleep $INTERVAL;do
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ {print }' | tail -1`
SRC=`echo $NEW | awk -F'[=| ]' '{print $8}'`
DPORT=`echo $NEW | awk -F'[=| ]' '{print $27}'`
PROTO=`echo $NEW | awk -F'[=| ]' '{print $23}'`
if [ "$NEW" != "" -a "$NEW" != "$OLD" ]; then
if ! ping -qc $NUMP $TARGET >/dev/null; then
# echo "NOWAKE $TARGET was accessed by $SRC, port $DPORT, protocol $PROTO and is already alive at" `date`>> $LOGFILE
# else
echo "WAKE $TARGET requested by $SRC, port $DPORT, protocol $PROTO at" `date`>> $LOGFILE
$WOL -i $IFACE $MAC
sleep 5
fi
OLD=$NEW
fi
done
-----------------------------------------------------------------------
Also, change the red marked when your is different.
All other steps like Merlin´s WOL manual.
The last thing is, make a Port Forwarding: Forward Port 9 to 192.168.1.254 UDP
Now i can use any other WOL App , i use this for Android: https://play.google.com/store/apps/details?id=com.benfinnigan.wol and it worked fine and is much faster then the AiCloud App.
Hope this is usefull for some one and sorry for my bad english...
Last edited: