wake on lan - send magic packet from windows with one click - Stack Overflow
Is there an app that I can use to send a magic packet to a PC for WOL?
[Question] Use iOS device as a Wake on Lan sender
Wake on Lan tool
What is a Wake-on-LAN magic packet?
How do you send a Wake-on-LAN magic packet with PowerShell?
Can Wake-on-LAN work across networks or subnets?
I found a simple Powershell script on another question/answer site that works. I made some minor changes (added comment block explaining how to use it, added parameters so the necessary info can be provided up front).
Here it is:
<#
Send-WOL.ps1
Sends "magic" Wake on LAN packet to attempt to wake the target computer
It is necessary to specify another computer on the same subnet as the target since the packet
is only broadcast to the subnet the target is on
Parameters: Target (required) : MAC address of target (xx:xx:xx:xx:xx:xx)
RemoteIP (required): IP address of another computer on the same subnet as target
#>
# Setup params
Param(
[Parameter(Mandatory=$true)][String]$Target,
[Parameter(Mandatory=$true)][String]$RemoteIP
)
Write-Verbose -Message "Converting MAC address $($Target) to a byte array" -Verbose
$MacByteArray = $Target -split "[:-]" | ForEach-Object { [Byte] "0x$_"}
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16)
Write-Verbose -Message "Broadcasting Wake-on-LAN packet to target." -Verbose
Invoke-Command -ComputerName $RemoteIP -ScriptBlock {
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7)
$UdpClient.Send($using:MagicPacket,$using:MagicPacket.Length)
$UdpClient.Close()
}
https://www.gammadyne.com/cmdline.htm#wol works, and it´s "only" 193K (go-wol is around 5MB).
I will put a batch script around it and then I´m done.
A deep link into the router setup would be smaller, but I guess that the AVM software does not allow that.
Only wish remaining is to hibernate the machine via Magic Packet, but my NIC is probably too old for that. I think I will use PuTTY for that.
Thanks everyone for digging!
I've set up my remote desktop to be accessed while I'm away. The only problem is that I now need a way to wake my PC from sleep remotely in order to connect.
I've enabled Wake On Lan and it is working, but obviously only when I'm connected to the home network. Surely there must be an app I can download on a phone or another computer that is also connected to the home network from which I can remotely trigger it to send a magic packet to the PC I'm trying to wake up?
My PC is power hungry, loud and has got lots of RGB and so I don't want to leave it on all the time. The family computer is always on, or I can just leave an old phone connected to a charger
Wake-On-LAN uses a "magic packet" sent at Layer 2 of the OSI model. Routers need information that is contained at Layer 3 of the OSI model in order to route packets. Switches on the other had are Layer 2 devices, which is why it works when you are just going through a switch. In short, you need to have IP information in order to cross a router, WOL only has MAC address information, so it is not possible to cross the router.
Further, the computer that you are wanting to wake is not turned on, and therefore does not have an IP address, so it would be impossible to send a packet and have it cross the router and reach your computer short of configuring your router to statically route the packet to your NIC's MAC (see Wake-on-Internet for additional options).
Even though the previous answer makes sense, it is not true that a magic-packet can't cross a router. Try Wake On LAN 2 to power up a machine in local network. I was be able to run it from a PC, connected via WLAN, to power up another machine plugged in a switch which was plugged in a router. Not sure if static ip-address in router did the trick. Maybe the software is sending on 192.168.0.255 (a networks broadcast-address) to reach all connected adapters.