Jump to content

As the summer months are here (for some of us), and power consumption in general should be minimized all year round, I thought the timing of optimizing my own system to be "green" might be a good way forward. I wanted to stop my network attached devices from being "constantly on" and instead either shut them down or have them automatically power save during idle periods (vacations, while I am away, or just asleep). In order to automate this so I could manage the power states from the convenience of my desk I started to explore the technical specifications and implementation of Wake-on-LAN (WOL).

 

I wanted to share a portable application that was recently released that broadcasts a magic packet (most commonly known for Wake-on-LAN).

ceronus/magic-packet: A cross-platform, light-weight implementation of the Magic Packet -- most commonly known for its use in Wake-on-LAN. (github.com)

 

The source code is transparent, and you are free to compile it yourself if you don't want the pre-compiled binaries that are available to download.

 

One of the outstanding features of this, asides from being lightweight, cross-platform and portable, is that it supports client machines that sit on multiple networks (so if your machine has multiple network cards, wifi, bluetooth, ethernet -- it will broadcast on everything by default (this behavior is configurable). Which is a feature that has been lacking in most implementations.

 

A note for Windows users, you can create a shortcut to the application and add 

--target 00:11:22:33:44:55

so you have a convenient shortcut on your desktop to turn on your network attached device (NAS, workstation, security device, etc) from either, an off, sleep or hibernated state!

 

Please make sure you check with your target device's manufacturer with regards to support for wake-on-LAN, and how to enable it. In some instances, like for a server or remote desktop you may also need to follow specific steps for your network interface card's driver(s) to enable it as well.

 

There is also a backlog feature for a troubleshooter app, that will let you know if the broadcast is reaching the device you are targeting, but I'm working on some other projects (a modernized device thermals library written from the ground up). Also, I thought that other packet capture applications (like PCAP, or Wireshark) do this already -- although it's very broad and requires a steeper learning curve (which is why I thought a simplified app for just detecting magic packet broadcasts would make sense). If there is enough demand for this, I'll work my way into it for a future release.

Link to comment
https://linustechtips.com/topic/1442206-magic-packet-wake-on-lan/
Share on other sites

Link to post
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×