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 ;)
I’ve seen possibly related behaviour. My Pi reboots if I plug in a specific wifi dongle. It’s fine if it’s already plugged in when I turn it on!
Thinking about it, that used to happen on the Rev 1 Pi I bridged the polyfuses on (that one’s on permanent weather-station duty – it’s the NoSPI one now). People in the Pi forums talked about using a 1 Ohm resistor instead of a ‘zero’.
I was gonna say I think this is a side effect rather than a feature. I think its because plugging in USB devices causes a surge which resets the Pi.
I think you’re right it does Daniel, but it’s interesting that it still happens when the pi is shut down. :) I’m sure I remember seeing a thread about low Ohm resistors curing the “reset when hotplug problem”.
Another point to note is there’s a wide disparity between current consumption of different dongles. My kbd/mouse dongle doesn’t cause a reset.
Edimax wifi uses ~ 0.06A. Dynamode wifi uses 0.16A (and gets hot).
may i know what case is you using? link?
It’s the ModMyPi case. I reviewed it here https://raspi.tv/2012/review-modmypi-case
Great for interfacing because you can have the pins exposed if you just use the bottom half to prevent shorting if you put it down on keys or coins etc. :)
I guess you won’t be able to use this trick on the B+ or forthcoming A+ Pis ;-)
Probably not, but there are holes for a reset header, or you can run your keys along the GPIO pins (don’t try this at home) :P
Absolutely wonderful !
This statement above is not correct:
“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. ”
Doesn’t reboot, just restart the WiFi interface!
My pi is running a long range test, already amost 72 hours, controlled by SSH. At some time last night the network interface got off.
No response to ping.
I followed the tip to remove the dongle for 15 seconds. Lo and behold, the application did NOT stop and the network returned to activity!
Many many THANKS
Actually yes it is. Look at the video. The date of this blog post is 18 Feb 2013 it was done using an original model A Pi.