> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/lan-turtle-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/lan-turtle-hub/payload-development/duckyscript-for-lan-turtle/wake-on-lan.md).

# WAKE-ON-LAN

The Wake-on-LAN protocol allows waking up devices with a magic Ethernet packet.  Devices which support Wake-on-LAN typically can be woken from a suspend state, and sometimes, from a fully powered off state.

The LAN Turtle Hub can send Wake-on-LAN packets on the RJ45 Ethernet and USB-C Ethernet interfaces.  For the LAN Turtle Hub to be able to wake the device it is plugged in to, that device must support powering USB ports even when off or suspended.

## WOL\_WAKE\_HOST

Send a Wake-on-LAN magic packet to a host on a specific interface.  The host can either be a MAC address, or a previously saved bookmarked address.  IP addresses and DNS host names are not allowed.

### Options

```
WOL_WAKE_HOST [host] [interface]
```

#### host

A previously bookmarked host, or the MAC address of the host to awaken.  MAC addresses are groups of six hex digits, such as `AA:BB:CC:00:11:22`.

#### interface

The network interface to use for the magic packet:

* eth0 - Send the packet over the RJ45 Ethernet connection
* eth1 - Send the packet over the USB-C connection

## WOL\_ADD\_HOST

Add a host to the known bookmarked hosts using the `WOL_ADD_HOST` command.

### Options

```
WOL_ADD_HOST [host] [name]
```

#### host

The MAC address of the host.  MAC addresses are groups of six hex digits, such as `AA:BB:CC:00:11:22`.  IP addresses and host names are not allowed.

#### name

The name to call the host.  This can be anything, such as "laptop" or "printer01".

## WOL\_CLEAR\_HOSTS

To remove all hosts from the bookmark list, use the `WOL_CLEAR_HOSTS` command.
