Makers Blog

Use PLCnext to WakeOnLan (WoL) Your PC

Frederik PxC-BE 30 October 2020 min. read
348 views 0 comments

What Is Wake-on-LAN?

Wake-on-LAN (sometimes abbreviated WoL) is an industry standard protocol for waking computers up from a very low power mode remotely. The definition of “low power mode” has changed a bit over time, but we can take it to mean while the computer is “off” and has access to a power source.

Install wakeonlan on the PLCnext

We are going to use wakeonlan python package
to execute the UDP datagram and wake destination MAC address

Before we can do this we need to install ipk., Python and the pip package manager on the controller.
Ensure that you have a Ethernet connection.

Log in as Root and do following commands.

Commands to install and use the ipkg.

wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | sh
export PATH=$PATH:/opt/bin:/opt/sbin

Install Python

/opt/bin/ipkg install python3

Install package manager pip

/opt/bin/ipkg install py3-pip

Upgrade pip

/opt/bin/pip3 install --upgrade pip

Install wakeonlan package

/opt/local/bin/pip install wakeonlan

Include the path

export PATH=$PATH:/opt/bin:/opt/local/bin

Now you can execute the command to wake up a PC on your network

execute command to wake on a PC

wakeonlan your_mac

This command you can execute in PLCnext engineer using the PLCnextBase Library
FB: PBCL_SysLinuxShell_1

Need extra informaton?

Please contact   axsupport@phoenixcontact.be

Further readings

Source:https://www.howtogeek.com/70374/how-to-geek-explains-what-is-wake-on-lan-and-how-do-i-enable-it/

Makersblog:https://www.plcnext-community.net/en/hn-makers-blog/295-making-automation-001-where-s-the-package-manager.html

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users