I'm attempting to use a simple proximity sensor to wake my computer up from sleep. I currently have a nice applescript proxy (a max/msp patch that reads serial data and runs an applescript) that allows me to initiate a sleep command from my arduino. The problem is, I can't wake the computer up using the same method because the computer is....well...asleep, and my proxy can't listen for serial data.
Does anyone have any creative ideas? I've read a few things that were floating around online, and haven't found a solution.
A few thoughts:
- Is there something that might make it possible to wake the computer when it receives serial data?
- Is there a simple way to have my arduino send a keypress, without nullifying non-HID serial communication?
- How about a creative use of wake on LAN?
I'm struggling, would love any directional advice.
Servo to hit the space bar? Or take the optical sensor out of a cheap/dead mouse, and wave the servo arm past it to simulate wiggling the mouse to wake the computer.
I'm looking for something a little more transparent to user experience though. Anybody have a firmware / software based solution? Hardware solution is welcome too, if I can conceal it well enough.
Most BIOS / motherboards support "wake on USB". I assume sending anything via Serial would wake a computer if this option is set.
Thanks! I'm looking into that now and will report back with results. By the way, I'm on a 2009 Mac Pro 8-core running Snow Leopard 10.6.5.
** UPDATE: Wake on USB, while enabled on mac, doesn't listen for data. I believe it only responds to USB devices being plugged in or pulled out.
Any other ideas? I love the idea of being able to send a keypress from my arduino, perceived as an HID device. Problem is, I'd want to be able to still do regular arduino stuff over serial that keyboards don't do. Has anyone had any experience with this?
I read a little bit about rancidbacon's "V-USB". Anyone know if that would do the trick?
Does anyone have any creative ideas?
I believe it only responds to USB devices being plugged in or pulled out.
Could you define the sleepmode the computer is in? I recall there are a number of levels and some are only to be awaken with the powerbutton.
- let the arduino control a relay that disconnects or reconnect the USB signals...
- Don't some bios's have a wakeup function too?
- A reed relay connected to the powerswitch but hidden in your system. Arduino just 'fires' an electromagnet near that position. would look like magic ...
sofar my 2 cents
Isn't it a 4 core with hyper-threading, so it got 8 threads?
From ACPI Wakeup - MythTV Official Wiki
The ACPI Real Time Clock (RTC) Alarm function can be used by your [mythTV] system to wake up your machine at a certain date and time. (sorry no Arduino involved)
Try leaving Serial Monitor running with a connection open to the Arduino. Put the computer to sleep and have the Arduino send a bit of data.