[Elecraft] USB/Serial adapters and sleep mode on OS X

Kok Chen chen at mac.com
Sun Sep 5 23:50:06 EDT 2010


On Sep 5, 2010, at 5:21 PM, David Fleming wrote:

> But the Keyspan and FTDI adapters get very grumpy when they wake up after being put to sleep. 

The way I handled this in µH Router (the microHAM devices uses FTDI chips) is to register for MacOS X Power Manager callbacks. 

Before the Mac OS X Power Manager sends the hardware into sleep mode, it will call back and at that time, I do an ordered shutdown of any opened microHAM ports.  When the Power Manager again calls back when the machine wakes up, I reopen the serial port (setting baud rate and restart the microHAM watchdog timer) of any microHAM box(es) that was(were) previously connected.

When the Mac OS X Power Manager calls back before going to sleep, you also have the option of telling the system to terminate the sleep process.

See http://developer.apple.com/mac/library/qa/qa2004/qa1340.html .

For example, if there is something critical that is happening, you can terminate sleeping, finish anything that you are doing that cannot be stopped (like changing the firmware of the K3 :-), and when that task is completed, finally ask the Power Manager to go to sleep.

73
Chen, W7AY



More information about the Elecraft mailing list