bitfocus / companion-module-generic-wakeonlan

MIT License
1 stars 0 forks source link

I cant get this to work #2

Open mattehalen opened 4 years ago

mattehalen commented 4 years ago

I've tried the simple and advance function and cant get my computer to WOL. If i use a different program do to send WOL it works but not with this module.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.76. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

albertorighetto commented 4 years ago

Which O.S. are you using to run companion? Can you please run a magic packet sniffer (like this) on a PC in the same subnet of your target and confirm that you are not receiving anything at all? Sounds weird because this module is simply broadcasting the WoL magic packet to the broadcast addresses of all network interfaces that have been assigned a network address in your OS; nothing fancy.

Jibun-no-Kage commented 1 month ago

I cannot get this to work either when companion is on Windows 11 Pro. I know the target device works for WOL, can do it from Linux system for example. Definitely using 255.255.255.255 for advanced configuration, and correct MAC address.

On the same system as companion using module, the simple method nothing in sniffer on same system, but the advanced mode, a packet is received from companion module to Windows 11 Pro system where companion is installed... Figure I would try that first, in case of any Windows security or (Windows default) firewall issues.

Using another Windows 11 Pro PC that supports WOL... running the sniffer... Nothing received when Windows 11 Pro is active either simple or advanced method. This is interesting.

Using a Linux system, sent WOL packet to the target Windows 11 Pro PC above, nothing while Windows 11 Pro is active. Linux command is literally 'wakeonlan ' so its defaults work, unlike simple? When the hardware is powered off, the Linux WOL send works!

So we likely know 3 things...

1) Windows likely blocking in-bound remote UDP 9 packets since sniffer receives nothing when Windows active. We know Linux WOL send works, because target system powers up, no Windows in play on target system at time of WOL received. I also tested on a TV that uses WOL to power on, when powered off (LG TVs for example). For the LG TV Linux WOL works, TV powers up.

2) Windows likely is blocking or companion is not able to send WOL packet outside of sending system. We did see a WOL packet (advanced only) when the same machine was sender and target. Odd that simple did not work but advanced did work when Windows system was sender and target.

3) What is the difference between simple and advanced? UDP 9, 100 ms, 3 retries... is the default WOL, I changed nothing under advanced defaults,

I checked the various WOL driver settings, and WOL was fully enabled for the Windows driver, in both sender and target systems. But again, WOL direct to hardware works ONLY from Linux WOL, no Windows OS in play. So WOL in BIOS and uEFI is enabled.

I do not at this time have the ability to test companion on MacOS, but I will try to do that later this week.

So given everything noted above. I would expect the authors of this module to have the ability to validate what I have noted above, and suggest additional configuration steps maybe? Clearly the module should do some type of validation, maybe sending a WOL packet to its-self forcing said packet to use the explicit IP address of the system, so it is forced through the entire TCP/IP stack, i.e. out over the internal firewall and back across in-bound on the internal firewall? Just a thought.

Following a Windows 11 guide to enable WOL... is not going to work, since the issue appears to be an outbound issue, ability to send packets over UDP 9? This application might prove interesting https://apps.microsoft.com/detail/9nblggh51pb3?hl=en-US&gl=US. In that it is a Windows app that sends WOL, maybe this opens the firewall? If this app works, but does not change the Windows 11 Pro outbound rules, from Windows that would be a definite indicator that companion or the module is have an explicit issue in of its self.

Jibun-no-Kage commented 1 month ago

Well, I tried the small WOL windows based application... It works on the Windows 11 Pro system where companion and WOL module are installed. And... every WOL packet send to direct hardware, PC, TV, etc. worked! So Windows 11 PC is NOT BLOCKING outbound UDP 9 traffic, by default.

At this point, I think it is fair to say either companion /and/or the WOL module have a real issue to resolev. I believe the authors of this module now should have sufficient defaults to investigate and fix the issue as such. If anyone would like to discuss the testing I did above, just reply to my comments here.

To bad this module or companion on Windows at least, is struggling with sending WOL packets, I really need this to work in my use case. Maybe it will at least work on MacOS?

Jibun-no-Kage commented 1 month ago

Oh... I did one more test, using the downloaded WOL app in Windows 11, I tested against another Windows 11 Pro PC, and the WOL sniffer saw nothing, so I think is fair to state that Windows 11 Pro by default, even with WOL features enabled, is blocking in bound UDP 9 traffic, this makes sense, in that WOL is for hardware power state changes, not at the OS level.

However, I did not test every possible power state, hibernation, sleep, stand-by, etc. of the target Windows 11 Pro PC, only full power state. So it may be that Windows 11 Pro once in given power state other than full, is listening for WOL packets at some level of the OS, or the hardware is as when power down... typical use of WOL.