Greetings,
I seem to be having a little problem with sending serial data.
Whenever I try to send some data, I only get 2 bytes sent at a time if the
data I am sending is over 2 bytes long. For example, If I try to send the
data: "BCD", the first time I send data, it will send the "BC" but not the
last character, now when I send again, it will send the D but it will also
send B as well, it's like it wraps around on itself. I use SerSendWait but
that doesn't seem to help. Here is a little snippet of the code I use:
char StringBuffer[] = "BCD"; // this is global
SerSendFlush(SerLibRef);
SerSend(SerLibRef, StringBuffer, StrLen(StringBuffer), &errP);
SerSendWait(SerLibRef, -1);
if(errP == serErrTimeOut)
PrintMessage("timeout error\n");
else
PrintMessage("OK\n");
SerClose(SerLibRef);
The code that calls the SerSend etc is contained within it's own function,
but the StringBuffer and the serialLibRef value are global. Maybe I am
missing something obvious, but I am completely stumped. Any help/suggestions
would greatly appreciated. Thanks in advance.
Regards,
Bryan
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/