Hi
At least I know I have to keep the serial port open all the time I want to
use it.
Has anyone had any luck using SrmOpenBackground() in PalmOS 3.5?
I wrote a simple application at the weekend to just try and open the serial
port as a background open. I only call SrmOpenBackground() once but when I
do, I the return error is that someone has already opened the serial port as
a background port. This happens to me on the Emulator and on my Palm Vx. I
had no other installed applications on the device apart from the standard
ones, so I don't see who it is that could be opening it.
The Hotsync manager is surely not doing this is it? (I think I did try
setting that to use the Modem instead just to try).
I am considering using a shared library that I will load up and get to do
the background keyboard processing. Maybe even install a WakeupProc handler.
Then periodically poll the library for data from inside my hack.
Gary
-----Original Message-----
From: Tom Zerucha [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 25, 2000 7:33 PM
To: Palm Developer Forum
Subject: Re: quick serOpen /Close
On Mon, Sep 25, 2000 at 09:33:01AM +0100, Metalle Gary-GMETALL1 wrote:
> Rik
>
> That won't work. I can't guarantee when my data will arrive, so I will
> likely miss it if I open the port, wait and then relinquish it (it's a
> keyboard driver). I could try opening the port once and setting a global
> variable. But when do I close it? No one could do a hotsync if I hogged
the
> port. Actually I think having just written that I'm sure I tried that,
> opening the port using SrmOpenBackground(). I didn't seem to get anywhere
> there either. Perhaps I didn't try hard enough! Still leaves the question
as
> to when to relinquish hold of the port (perhaps not so much a problem if
> opened as Background only).
>
> Gary
You must maintain the port opened as long as you need to look for
data. If you are doing a keyboard driver, maybe you could use a
heartbeat or check if the other serial lines are active indicating
keyboard present.
For hotsync, you could look for the Hotsync app launch or something
else opening the serial port and bypass your hack until a close serial
port.
Also note this disables beam receive.
If you close the port, you will lose any data between that and the
next open.
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/