A few days ago I was playing about with my Raspberry Pi Model A. I wanted to measure the power consumption, since I started a thread on the Pi forums that talks all about this.
This threw up an interesting problem because I wanted to measure the power consumption of the Pi both with and without my wifi dongle. But if I pull out the dongle, I’m not sure it will reconnect when I re-attach it, and then I won’t be able to communicate with it (I was using it headless – no monitor/keyboard). Eventually it hit me.
Delayed shutdown to the rescue
One solution was to to measure the power consumption with the dongle in, then
sudo shutdown -h 5
which tells the system to shut down in 5 minutes. So then I pulled the dongle out and measured power consumption again. Then waited for it to shut down, which it did.
Great. It all went according to plan and the Pi model A uses 0.81 Watts with the Edimax wifi dongle in and 0.51 Watts without it. This is at idle. (Model B uses 2 Watts).
Ok let’s start again then
So then I plugged the wifi dongle back in, without pulling the power cable, and I was pleasantly surprised to see the Pi boot all by itself. I knew it could be made to boot by shorting header P6 (if fitted) but this was a new one to me. Bring your Pi back from suspend by plugging in a USB wifi dongle. Nice. :) I haven’t seen this documented anywhere either.
Only Rev 2 model B and model A
This doesn’t work with Rev 1 Pis. It works with Model As and Rev 2 Model Bs, which, as far as I know, use the same board.
And here’s a little video to prove it
This will probably work with other USB devices as well, but I haven’t tried others yet. Leave a comment if you make it work with other devices ;)