Wake on Lan works sometimes

Can you record what happens if you set the node to send to 192.168.99.255 ?
(which seems to be the broadcast address for your subnet)

I see no signs of anything coming in at the machine I'd want to turn on if I send to 192.168.99.255.

So the xiaomi sends to both server.land and the 192 address, and the 192 address doesn't seem to do anything though being the broadcast all devices should see it...
So if the server.lan one is the correct one then they are both sending 102 bytes 3 times which is correct. So next we need to see exactly what is in those 102 bytes from each sender.
You'll need to set tcpdump to capture the full packets.

sudo tcpdump -i enp3s0 '(udp and port 7) or (udp and port 9)' -s 65535 -vv -A
tcpdump: listening on enp3s0, link-type EN10MB (Ethernet), capture size 65535 bytes

13:07:00.243574 IP (tos 0x0, ttl 63, id 36110, offset 0, flags [DF], proto UDP (17), length 130)
_gateway.54649 > server.lan.discard: [udp sum ok] UDP, length 102
E.....@.?.f...c...cc.y. .n}.......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:07:00.342147 IP (tos 0x0, ttl 63, id 36113, offset 0, flags [DF], proto UDP (17), length 130)
_gateway.54649 > server.lan.discard: [udp sum ok] UDP, length 102
E.....@.?.f...c...cc.y. .n}.......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:07:00.441951 IP (tos 0x0, ttl 63, id 36137, offset 0, flags [DF], proto UDP (17), length 130)
_gateway.54649 > server.lan.discard: [udp sum ok] UDP, length 102
E....)@.?.f...c...cc.y. .n}.......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

Phone

13:08:31.192506 IP (tos 0x0, ttl 64, id 20743, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.41236 > 192.168.99.255.discard: [udp sum ok] UDP, length 102
E...Q.@.@.....cK..c.... .n.$......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:08:31.192591 IP (tos 0x0, ttl 64, id 15435, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.38717 > server.lan.discard: [udp sum ok] UDP, length 102
E...<K@.@.. ..cK..cc.=. .n........PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:08:31.192656 IP (tos 0x0, ttl 64, id 20744, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.41533 > 192.168.99.255.discard: [udp sum ok] UDP, length 102
E...Q.@.@.....cK..c..=. .n........PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:08:31.193043 IP (tos 0x0, ttl 64, id 15436, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.40012 > server.lan.discard: [udp sum ok] UDP, length 102
E...<L@.@.....cK..cc.L. .n........PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:08:31.193149 IP (tos 0x0, ttl 64, id 20745, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.39437 > 192.168.99.255.discard: [udp sum ok] UDP, length 102
E...Q @.@.....cK..c.... .n.+......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

13:08:31.193229 IP (tos 0x0, ttl 64, id 15437, offset 0, flags [DF], proto UDP (17), length 130)
xiaomi.mi.9.se.lan.48787 > server.lan.discard: [udp sum ok] UDP, length 102
E...<M@.@.....cK..cc... .n.A......PF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..qPF]..q

Not sure if there are better ways to show this?

It appears that there's variation in the phone messages:


(screenshot because the spaces in the 5th might not be obvious)

I discovered that tasker can interact with the wake on lan app on my phone, I also discovered that nodered can make a call to tasker. As such I could theoretically circumvent the whole issue by delegating sending the WOL packet to my phone. It's far from pretty as far as solutions go though. I still hope someone may have a good suggestion to make WOL work from NodeRED in Docker on my Firewalla?

I seem to have found a combination that works:

  • Start the docker container with "--net=host"
  • With this the following setting seems to consistently work:

I've tried putting in any sensible target address I could think of, but the result was failure, with it empty though, it seems to work. :man_shrugging:

Doing the same analysis as before:
sudo tcpdump -i enp3s0 '(udp and port 7) or (udp and port 9)'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
12:15:48.315761 IP firewalla.lan.35883 > 255.255.255.255.discard: UDP, length 102
12:15:48.413996 IP firewalla.lan.35883 > 255.255.255.255.discard: UDP, length 102
12:15:48.515015 IP firewalla.lan.35883 > 255.255.255.255.discard: UDP, length 102

It does look slightly different from before.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.