Re: Serial Port and Power Down
From: Dick Grier (dick_grierNOSPAM_at_msn.com)
Date: 06/28/04
- Next message: Mike: "Re: how to realize a virtual com port"
- Previous message: Ginny Caughey [MVP]: "Re: pocket outlook"
- In reply to: Jonathan: "Re: Serial Port and Power Down"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Jun 2004 08:45:45 -0600
Hi,
>>
I am using an HP2215 with the CFSerial class. It is using the standard
drivers - I have not copied any over. I'm not sure how to find exactly which
serial driver I am using but I can tell you if you tell me how to find it.
<<
What serial port hardware are you using? The built-in serial port, or an
add-on? OK, I see in a later reply that you are using the built-in port.
>>
I have not tried to close and re-open the port. This is because I'm not sure
how to tell when the device powers down. Does this generate an event? I keep
the port open all the time because my hardware sends data based on user
input so data could be sent at any time. The port needs to be open to get
the data.
<<
I understand your situation. If I understand the way that the power-down
mode works, your program will be suspended during power down. Thus, it
won't receive any data during that time. So, you either have to keep the
PPC from powering-down, or you have to restore normal operation when you
receive the message from CERunAppAtEvent. As I said, I haven't used this
API, so I cannot help with its function.
Another thing that you can do is to build in a "watchdog timer" function.
This timer would be reset by receive data. If the timer times out without
having been reset (probably) the app has been asleep, and you then can
simply close and reopen the port. No (additional) data will be lost,
because you already have lost whatever was there anyway.
So, my question about closing and reopening the port was an attempt to find
out if that solves the receive problem. If it does, then you can implement
it in code. But, before going to that effort, it makes sense to find out if
it is solution, or if you have to tackle it in some other way -- and I don't
have a suggestion about another work-around.
Dick
-- Richard Grier (Microsoft Visual Basic MVP) See www.hardandsoftware.net for contact information. Author of Visual Basic Programmer's Guide to Serial Communications, 3rd Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
- Next message: Mike: "Re: how to realize a virtual com port"
- Previous message: Ginny Caughey [MVP]: "Re: pocket outlook"
- In reply to: Jonathan: "Re: Serial Port and Power Down"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|