User avatar
graysky
Posts: 39
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Any success using WOL on a RPi

Sat Apr 06, 2013 8:53 pm

According to the specs, the RPi does support magic packet WOL. Indeed, installing the ethtool package and querying eth0 shows support:

Code: Select all

% sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: g
	Wake-on: d
One can enable 'g' mode which allows magic packet WOL like this:

Code: Select all

% sudo ethtool -s eth0 wol g

Code: Select all

% sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: g
	Wake-on: g
And now 'g' mode is enabled, but I am unable to wake the RPi from a shutdown as I can all my other machines... thoughts are welcomed.

Code: Select all

% wol b8:27:eb:27:8f:fb
Waking up b8:27:eb:27:8f:fb...

User avatar
rpdom
Posts: 11566
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Any success using WOL on a RPi

Sat Apr 06, 2013 9:20 pm

1. The Network driver may say the chipset supports WOL, but the Ethernet chip is connected via USB, so I don't think that will support it.

2. When the Pi is halted, the CPU is stopped (correct me if I'm wrong) and the GPU goes into a low power mode. The GPU doesn't support WOL, so even though the NIC may recognise WOL, it has nothing that will respond to it.

3. The Pi uses so little power, why not leave it running? If you want you can set the cpu min clock speed to something very low to save a little power. One of mine idles at 100MHz when not busy.

User avatar
graysky
Posts: 39
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Any success using WOL on a RPi

Sat Apr 06, 2013 9:29 pm

Thanks for the reply. Considering using it on my car and don't want to drain the battery when the car is off... tell me how you are underclocking to 100 MHz when idle. I can interrogate the current frequency via:

Code: Select all

% cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
700000
..but as you can see, the stock frequency of 700 MHz is shown. The CPU is indeed idle at that reading. I am using the ondemand governor.

Thanks!

User avatar
rpdom
Posts: 11566
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Any success using WOL on a RPi

Sat Apr 06, 2013 11:38 pm

Have a look at the Overclocking settiings (yes, I know that sounds like the wrong place to look for underclocking) on the Wiki http://elinux.org/RPi_config.txt#Overclocking. I have arm_freq_min=100 and arm_freq_max=950 (and a few other settings that I can't check at the moment without waking my wife). I just tried a few settings until I found some that were 100% stable on my Pi.

I think I got it to run down to 50MHz at one point, but it wasn't very responsive. Just for a laugh I might try and get one to run down at 3MHz like my earliest ARM system :-) I don't think there's any chance that will work though.

User avatar
graysky
Posts: 39
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Any success using WOL on a RPi

Sun Apr 07, 2013 12:02 am

rpdom wrote:... I have arm_freq_min=100 and arm_freq_max=950 (and a few other settings that I can't check at the moment without waking my wife).
I'll check it out; you mind posting your /boot/config.txt once your wife is awake :)

User avatar
rpdom
Posts: 11566
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Any success using WOL on a RPi

Sun Apr 07, 2013 8:48 am

She's awake now, so here is the relevant bit:

Code: Select all

arm_freq=950
arm_freq_min=100
over_voltage=6
core_freq=450
core_freq_min=75
gpu_freq=250
gpu_freq_min=100
sdram_freq=450
sdram_freq_min=150

User avatar
graysky
Posts: 39
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: Any success using WOL on a RPi

Sun Apr 07, 2013 11:41 am

Thanks... do you need to worry about the clocks relationships when defining the low ends?

User avatar
furriephillips
Posts: 2
Joined: Mon Sep 29, 2014 8:48 pm

Re: Any success using WOL on a RPi

Mon Sep 29, 2014 9:12 pm

HI,

I also have a Pi that I want to start via WOL. It's really not a matter of "why not keep it turned on all the time". I really do want to keep it on all the time, but in the past few weeks I've accidentally done "halt -p" instead of "reboot", because (this is a bit odd, I know) I power my Pi off my QNAP NAS and when I update the firmware on the NAS, I halt the OS on the Pi, so that the NAS reboot doesn't upset the Pi.

Now I'm wondering if I even need to worry about halting the Pi, if a firmware update (and subsequent reboot) of the NAS doesn't actually power off the USB ports on the NAS... I might test a bit.

Either way, I would definitely like to be able to WOL my Pi.
Cheers,
--
ChrisP

User avatar
fruitoftheloom
Posts: 14685
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Any success using WOL on a RPi

Mon Sep 29, 2014 10:53 pm

furriephillips wrote:HI,

I also have a Pi that I want to start via WOL. It's really not a matter of "why not keep it turned on all the time". I really do want to keep it on all the time, but in the past few weeks I've accidentally done "halt -p" instead of "reboot", because (this is a bit odd, I know) I power my Pi off my QNAP NAS and when I update the firmware on the NAS, I halt the OS on the Pi, so that the NAS reboot doesn't upset the Pi.

Now I'm wondering if I even need to worry about halting the Pi, if a firmware update (and subsequent reboot) of the NAS doesn't actually power off the USB ports on the NAS... I might test a bit.

Either way, I would definitely like to be able to WOL my Pi.
Wake-on-Lan can not be supported because the Ethernet Chipset is connected to the USB BUS and has no EEPROM, it is actually to all intents and purposes a USB to Ethernet Adaptor:
http://www.microchip.com/wwwproducts/De ... ct=LAN9514
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

hippy
Posts: 2179
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 10:24 am

I have used WOL with nothing more than a PC network card and a power supply. The card asserts a signal line when the appropriate magic packet arrives which is intended to activate the PC PSU but you can use it to reset the SoC or power-up the Pi.

It seems possible to operate the Pi's 9512/9514 USB/LAN chip in a standalone mode to allow WOL but whether that would work on a Pi I don't know. Not having a USB up-stream connection shouldn't be a problem in itself but lack of attached EEPROM probably would be as fruitoftheloom notes. Also the chip needs a clock and I believe that is now delivered by the SoC rather than a separate crystal oscillator on the B+ so if the SoC is halted and that clock stops the chip quite probably stops functioning. Even if it could work it would still need extra hardware adding to reset and/or reboot the Pi as it's not designed for that.

User avatar
DougieLawson
Posts: 29776
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 10:28 am

WOL relies on having a BIOS that is listening for the magic packet on the network interface.

Raspberry Pis do not have a BIOS that can do that, so WOL is impossible.

You can use a Pi to generate magic packets to wake other machines. http://search.cpan.org/~clintdw/Net-Wak ... et/Wake.pm
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
default_user8
Posts: 500
Joined: Mon Nov 18, 2013 3:11 am

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 11:13 am

Not exactly wol, more like boot on WOL.
http://abzman2k.wordpress.com/2014/01/2 ... owerstrip/
Two heads are better than one, unless one's a goat head.

hippy
Posts: 2179
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 2:26 pm

DougieLawson wrote:WOL relies on having a BIOS that is listening for the magic packet on the network interface.
Not sure what you mean by BIOS but most NIC and network controllers can run entirely standalone without interaction with the PC they are within. The network controller is more than capable of detecting a magic packet to itself providing it knows its own MAC address without assistance from any other host. WOL could be pretty pointless if it didn't work that way.

In most PC's everything is powered down except "5V Standby" which is what the network hardware runs off ( and a primary reason why 5V Standby came into existence ). The network controller remains on when the motherboard is otherwise off, runs all by itself, detects the magic packet based on MAC address, and simply has to assert an output signal when it sees that packet. The WOL signal is usually an open collector signal which is paralleled to the power button so it's activation is exactly like pressing the power button - okay, a bit more complicated than that electrically but basically that's it.

One might have to adjust BIOS settings on a PC to have that PC actually wake-up when WOL is asserted but that's configuring the host PC not the NIC WOL functionality.

As said I have done this, just 0V and 5V and you have signal out of the NIC which asserts whenever it gets a magic packet. I don't have any further details to hand but here's a very similar project along the same lines -

https://www.i3detroit.org/reset-on-lan- ... kbox-parts

User avatar
fruitoftheloom
Posts: 14685
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 2:44 pm

hippy wrote:
DougieLawson wrote:WOL relies on having a BIOS that is listening for the magic packet on the network interface.
Not sure what you mean by BIOS but most NIC and network controllers can run entirely standalone without interaction with the PC they are within. The network controller is more than capable of detecting a magic packet to itself providing it knows its own MAC address without assistance from any other host. WOL could be pretty pointless if it didn't work that way.

In most PC's everything is powered down except "5V Standby" which is what the network hardware runs off ( and a primary reason why 5V Standby came into existence ). The network controller remains on when the motherboard is otherwise off, runs all by itself, detects the magic packet based on MAC address, and simply has to assert an output signal when it sees that packet. The WOL signal is usually an open collector signal which is paralleled to the power button so it's activation is exactly like pressing the power button - okay, a bit more complicated than that electrically but basically that's it.

One might have to adjust BIOS settings on a PC to have that PC actually wake-up when WOL is asserted but that's configuring the host PC not the NIC WOL functionality.

As said I have done this, just 0V and 5V and you have signal out of the NIC which asserts whenever it gets a magic packet. I don't have any further details to hand but here's a very similar project along the same lines -

https://www.i3detroit.org/reset-on-lan- ... kbox-parts
The RPI Ethernet is actually, as stated, on the USB Bus, therefore comparing to a "" standard "" Ethernet Controller is pointless...........

You would have to implement a Wake-on-USB for the RPi...... :D
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

hippy
Posts: 2179
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 3:15 pm

fruitoftheloom wrote:The RPI Ethernet is actually, as stated, on the USB Bus, therefore comparing to a "" standard "" Ethernet Controller is pointless...........
I wasn't actually comparing what the Pi has with a standard NIC; I was saying use a standard NIC to approach the problem and addressing the subsequent comment which appeared to suggest to me that using a standard NIC would not work.

User avatar
DougieLawson
Posts: 29776
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 4:28 pm

hippy wrote:
DougieLawson wrote:WOL relies on having a BIOS that is listening for the magic packet on the network interface.
Not sure what you mean by BIOS but most NIC and network controllers can run entirely standalone without interaction with the PC they are within. The network controller is more than capable of detecting a magic packet to itself providing it knows its own MAC address without assistance from any other host. WOL could be pretty pointless if it didn't work that way.
How did you think that a NIC starts the computer from luke warm (it's got to have power)?

In machines that support it, the NIC gets the WOL magic packet and triggers the BIOS to start the machine running. WOL is, primarily, a function of the BIOS that avoids resetting the NIC when the OS shuts down so that the NIC can listen to the layer2 traffic and reacts to the WOL signal. http://en.wikipedia.org/wiki/Wake-on-LA ... mentations

Best of luck trying to wire a standard NIC to your Raspberry Pi (which doesn't have any of the interfaces buses (PCI, PCMCIA, etc.) that a NIC would use).
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

hippy
Posts: 2179
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 10:30 pm

DougieLawson wrote:Best of luck trying to wire a standard NIC to your Raspberry Pi (which doesn't have any of the interfaces buses (PCI, PCMCIA, etc.) that a NIC would use).
I think you are misunderstanding what I am proposing or cannot believe it really is as simple as described.

A suitable PC NIC can detect a magic packet and assert a signal indicating it saw that with nothing but 0V and 5V and the assert signal coming out. No other connections but those three wires. I know, I have done exactly that myself and posted a link to a similar set up where they did exactly the same.

The signal from the NIC can be run through a micro, some logic or other electronics and be used to reset the Pi ( waking it up if it is left powered on but has been shut down ) or used to control the power supply to the Pi ( turning it on to wake it up if power has been turned off ).

Simple as that.

User avatar
DougieLawson
Posts: 29776
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Any success using WOL on a RPi

Tue Sep 30, 2014 10:35 pm

So you're not attempting to use that NIC as an interface on the RPi, just as a trigger to get the RPi awake as an ugly hack.

You weren't clear about that.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

pwcpp
Posts: 1
Joined: Thu Oct 23, 2014 7:40 am

Re: Any success using WOL on a RPi

Thu Oct 23, 2014 8:15 am

I wrote a shell script on my RPI (type B, supplied by a power bank) which checks the ping echo from the router (supplied by AC power). If there is no echo (which means AC power lost) then the PRI will be shut down.

RPI doesn't support WOL but supports reset by triggering the "P6" 2-pin header ("close" the header will shut off RPI immediately and "open" will boot it). I think the RPI can boot automatically after AC power restored by adding something like special time relays to trigger the "P6" 2-pin header. Delayed time is required to ensure the shell script to shut down RPI normally.

Eoin
Posts: 2
Joined: Sat Jan 12, 2013 2:52 pm

Re: Any success using WOL on a RPi

Wed Dec 30, 2015 3:34 pm

Is it possible to access the 'on' signal output from the LAN chip?

What I am thinking is instead of looking at a traditional WOL signal being passed to the system, is to issue a WOL signal on the network and tap off the 'on' signal produced by the Pi's LAN chip and use this to drive an external circuit. This external circuit would interpret the LAN chip signal and deliver a temporary short to the reset header (h6 ?) - thus resetting the Pi in the cold state and cause a restart.

User avatar
karrika
Posts: 952
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: Any success using WOL on a RPi

Wed Dec 30, 2015 3:41 pm

The ENC28J60 modules from China have a WOL pin. So I assume that you could short GPIO 3 (pin 5) to ground when a WOL packet has arrived to kick up the Pi from a halt condition. The ENC28J60 lives on the SPI bus.

User avatar
fruitoftheloom
Posts: 14685
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Any success using WOL on a RPi

Wed Dec 30, 2015 3:43 pm

Eoin wrote:Is it possible to access the 'on' signal output from the LAN chip?

What I am thinking is instead of looking at a traditional WOL signal being passed to the system, is to issue a WOL signal on the network and tap off the 'on' signal produced by the Pi's LAN chip and use this to drive an external circuit. This external circuit would interpret the LAN chip signal and deliver a temporary short to the reset header (h6 ?) - thus resetting the Pi in the cold state and cause a restart.
I was under the impression WoL works by sending a Magic Packet not a signal :?

https://www.raspberrypi.org/documentati ... /README.md


IMO the easiest solution is to use PoE to power up the RPi

https://www.pi-supply.com/product/pi-po ... cba1185463

http://www.raspberrypioneer.com/2013/06 ... r-under-15
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

bjd223
Posts: 1
Joined: Tue Jan 10, 2017 3:26 pm

Re: Any success using WOL on a RPi

Tue Jan 10, 2017 3:39 pm

fruitoftheloom wrote:
furriephillips wrote:HI,

I also have a Pi that I want to start via WOL. It's really not a matter of "why not keep it turned on all the time". I really do want to keep it on all the time, but in the past few weeks I've accidentally done "halt -p" instead of "reboot", because (this is a bit odd, I know) I power my Pi off my QNAP NAS and when I update the firmware on the NAS, I halt the OS on the Pi, so that the NAS reboot doesn't upset the Pi.

Now I'm wondering if I even need to worry about halting the Pi, if a firmware update (and subsequent reboot) of the NAS doesn't actually power off the USB ports on the NAS... I might test a bit.

Either way, I would definitely like to be able to WOL my Pi.
Wake-on-Lan can not be supported because the Ethernet Chipset is connected to the USB BUS and has no EEPROM, it is actually to all intents and purposes a USB to Ethernet Adaptor:
http://www.microchip.com/wwwproducts/De ... ct=LAN9514
There are many Ethernet to USB adapters that support WOL (via USB power states), so that inherently doesn't disqualify it from working. Also my impression is that Raspberry took an off the shelf NIC part and connected it via USB to the Pi. Which means that it is functionally exactly the same part. So that also has no bearing on anything really.

I think people looking for this feature don't care about whether the NIC is connected directly to the SoC or via a USB controller. As long as it wakes up when you issue it a WOL packet.

So does anyone know if the RP3 supports waking up via USB peripherals like a conventional PC? I suspect that it probably doesn't since the device doesn't have a conventional BIOS system.

User avatar
DougieLawson
Posts: 29776
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Any success using WOL on a RPi

Wed Jan 11, 2017 5:44 pm

The hardware doesn't support WoL. How hard is it for you to parse FruitOfTheLoom's and my earlier answers?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
fruitoftheloom
Posts: 14685
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Any success using WOL on a RPi

Wed Jan 11, 2017 6:18 pm

bjd223 wrote:
fruitoftheloom wrote:
furriephillips wrote:HI,

I also have a Pi that I want to start via WOL. It's really not a matter of "why not keep it turned on all the time". I really do want to keep it on all the time, but in the past few weeks I've accidentally done "halt -p" instead of "reboot", because (this is a bit odd, I know) I power my Pi off my QNAP NAS and when I update the firmware on the NAS, I halt the OS on the Pi, so that the NAS reboot doesn't upset the Pi.

Now I'm wondering if I even need to worry about halting the Pi, if a firmware update (and subsequent reboot) of the NAS doesn't actually power off the USB ports on the NAS... I might test a bit.

Either way, I would definitely like to be able to WOL my Pi.
Wake-on-Lan can not be supported because the Ethernet Chipset is connected to the USB BUS and has no EEPROM, it is actually to all intents and purposes a USB to Ethernet Adaptor:
http://www.microchip.com/wwwproducts/De ... ct=LAN9514
There are many Ethernet to USB adapters that support WOL (via USB power states), so that inherently doesn't disqualify it from working. Also my impression is that Raspberry took an off the shelf NIC part and connected it via USB to the Pi. Which means that it is functionally exactly the same part. So that also has no bearing on anything really.

I think people looking for this feature don't care about whether the NIC is connected directly to the SoC or via a USB controller. As long as it wakes up when you issue it a WOL packet.

So does anyone know if the RP3 supports waking up via USB peripherals like a conventional PC? I suspect that it probably doesn't since the device doesn't have a conventional BIOS system.
Though you are correct that the LAN9514 does support WoL, RPT decided not to imlement that feature. So yes nothing has changed in the last year.
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

Return to “Arch”

Who is online

Users browsing this forum: No registered users and 2 guests