Serial port has glitch right at mid-night --- Seems to be a Palm OS design flaw

Serial port has glitch right at mid-night --- Seems to be a Palm OS design flaw

Post by Che » Tue, 30 Jul 2002 23:51:33



Here is a theads I posted on comp.sys.palmtops.pilot. It seems the
Palm OS has a design flaw in its serial manager.

Any one has similar experience and work around?

Thanks for your attention.

Chen

-------------------
Here are some more info regarding this matter:

1) I checked the version of serial manager of my Sony Clie, and it was
3,  PalmOS has version 4 now, I wonder if they have a fix in this
version.

2) If I stop the data stream from my serial communication device right
before mid-night, and resume it right after it, it works fine. From
this, it seems to me the problem is in software end, or to say the
serial manager didn't set the RS232 controler into a weired state at
mid-night. Here is my assumption: the problem comes from the handling
of data overflow at the RS232 controller when ISR is suspended at
mid-night (Palm may need to do some major house-keeping jobs at time).
Once overflow, the serial manager requires SrmClearErr to fix the
problem and this SrmClearErr will go out and reset the hardware,
causing even longer delay in the serial communication.

At this point, I believe it is a real design flaw in PalmOS.



Quote:

> Hi, all

> I am writing a program utilizing the serial port on palm to receive
> data from a serial communication source. Everything works fine until
> the very moment of mid-night --- one may preset the clock to
> 11:59pm so that he doesn't have to wait for a whole day to see the
> result. At exactly 12:00AM, the serial port will stop receiving
> data, to make it worse, instead of losing a few bytes, the only way
> to resume the receiving is to call SrmClearErr(gPortID), hinting a
> serious prolbem in either the serial port or even the serial
> manager.

> Any one has suggestion regarding this?

> Thanks,

> XC

> ps. Test condition:

> 1) Tried three different baud rate: 115200 baud, 57600 baud and 19200
> baud
> 2) Tried both default serial buffer size, and user-allocated 16384
> bytes buffer.
> 3) Data rate: 245 bytes per second, regardless the baud rate
> 4) Tested on Palm m105 and Sony Clie: Repeatable same finding

I've just tested it, here are my results:

- Palm III (Palm OS 3.0) (serial cradle): Communication freeze and my
app
fail to complet its communication

- Palm m505 (Palm OS 4.0) (USB cradle): Communication freeze for about
1
sec. than it comme back. My app is able to complet its communication
(after
a few retry a guess)

- Will try with a m515 and a serial cradle and comme back to you.

--
----------------------------------------
Regis St-Gelais ing.
Ingnieur de projets / Project engineer
Dveloppement informatique / Software development
Le Groupe ISAC Inc.

Site Internet / Web site ...: www.isac-inc.com

 
 
 

1. failed to open serial infrared port on Palm OS 5 Simulator...

Hi all,

I was testing my application using the the new Palm OS 5 Simulator. When I
attempt to open a serial connection to the Infrared port using the following
code:

Err  err = errNone;
UInt16  portId;
err = SrmOpen( serPortIrPort, 115200, &portId );

I receive an error of "serErrBadPort" (0x0302).

Is there any changes that I should make when programming the serial port on
the new OS? or does the Palm OS 5 Simulator contains codes for the infrared
port?

Has anyone tried this with success? Pls help, thanks.

regards
dan

2. redirect stdin/out from/to file _and_ CON, between DOS and Windows

3. Palm OS Emulator and Serial port(s)

4. CENTurbo 1 evolution 3

5. FA:Codewarrior 5:Palm OS/Conduit SDK 3.0/Palm OS book (360 pages)

6. Notes Printing and Reporting Animated Demo (Windows, Mac, Notes, Web)

7. How do I display serial port property pages for my virtual serial port?

8. dns implementation

9. Terminal Application, Serial Emulation, Telnet, Palm OS 4.1, CW 8

10. Can I open a serial port to the Infrared port using Old Serial Manager?

11. Palm OS 3.5+ Emulator debugging issues versus Palm Certification

12. Using Palm SDK 3.5 with CW for Palm OS R6 (on the Mac)

13. Palm Debugger - Target = Palm OS device