Re: COM port goes to sleep and doesn't wake up
From: Chris Tacke, eMVP (ctacke_at_spamfree-opennetcf.org)
Date: 11/24/04
- Next message: ORC: "Re: COM port goes to sleep and doesn't wake up"
- Previous message: Aaron: "Scrollbar position"
- In reply to: Mike Scott: "COM port goes to sleep and doesn't wake up"
- Next in thread: Mike Scott: "Re: COM port goes to sleep and doesn't wake up"
- Reply: Mike Scott: "Re: COM port goes to sleep and doesn't wake up"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 12:55:29 -0500
This is actually not unusual. The handle is still valid, but when the
processor went to sleep the UART was reset. The OEM didn't reinitialize the
UART on wake. Often simply resetting the DCB settings on wake for the port
will cause your reads to start working again.
-- <ctacke/> www.OpenNETCF.org Your CF searches start and end here "Mike Scott" <mike@nospam.com> wrote in message news:OfmJZhj0EHA.3120@TK2MSFTNGP12.phx.gbl... > I've got an app that reads data from the COM port on a PocketPC 2003 > device. When the device goes to sleep (either by inactivity timeout or by > pressing the on/off button) and is then woken up by pressing the on/off > button, the COM port stays asleep and doesn't receive any more data. > > The file handle remains open but all calls to Win32's ReadFile return zero > bytes. > > If I close the file handle and open another one to the COM port, > everything works again. > > Is there some way to "kick" the COM port back into life after the device > goes into sleep mode? > > Cheers, > > MikeS. >
- Next message: ORC: "Re: COM port goes to sleep and doesn't wake up"
- Previous message: Aaron: "Scrollbar position"
- In reply to: Mike Scott: "COM port goes to sleep and doesn't wake up"
- Next in thread: Mike Scott: "Re: COM port goes to sleep and doesn't wake up"
- Reply: Mike Scott: "Re: COM port goes to sleep and doesn't wake up"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|