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/

Reply via email to