Try it with new serial manager, as this solved our
problem.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
Behalf Of Sean
Rogers
Sent: Wednesday, August 28, 2002 7:11 AM
To: Palm Developer Forum
Subject: Help with basic serial communication
I've been struggling with this for a while, any help is
greatly appreciated.
I've got an external device that just sends some bytes
in through the serial
port. I've checked that information is actually coming
through the serial
port, so the external device is fine. I'm using
Codewarrior, so I'm testing
my application using the palm emulator and the device
hooked up through the
serial port in COM1. I'm writing the application for
Palm III, so I'm using
the old Serial Manager. All my serial port settings
should be okay, I've got
the right baud rate, and parity etc. but my SerRecieve
call just times out.
Anyone suggest what I could do? Here's my code to
recieve the data, and I'm
just trying to display it on the screen right now:
long toReceive = 4;
long numReceived;
long timeout = SysTicksPerSecond (); //1 second timeout
Err err;
Int buff[20];
CharPtr out[20] = {""};
ErrFatalDisplayIf (toReceive > sizeof(buff), "buffer
overflow");
numReceived = SerReceive (refNum, buff, toReceive,
timeout, &err);
if ( err == serErrLineErr ) {
SerClearErr (refNum);
}
StrPrintF (*out, "%d", buff);
WinDrawChars (*out, 10, 16, 16);
Thanks,
Sean
_______________________________________________________
__________
MSN Photos is the easiest way to share and print your
photos:
http://photos.msn.com/support/worldwide.aspx
--
For information on using the Palm Developer Forums, or
to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/