Makers Blog

Use PLCnext to WakeOnLan (WoL) Your PC

Frederik PxC-BE 30 October 2020 min. read
359 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 - | 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

Further readings




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.


Please login/register to comment


Leave a Reply

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