Hello,
I'm trying to communicate with a device whose serial port runs at 9600 baud,
7BitsPerChar, 1 Stopbit, Even Parity. I send bytes from a buffer but I never
get any answer. Thats why I connected to Palm via Cradle to my PC's
HyperTerminal and see that nothing comes out of the serial Port. This is the
code I use:
UInt32 flagsBaudRate=srmSettingsFlagBitsPerChar7 |
srmSettingsFlagStopBits1 /* | srmSettingsFlagParityEvenM*/;
UInt16 paramLen=sizeof(flagsBaudRate);
if(SrmOpen(serPortCradlePort,9600,&uiPortId)==errNone){
error=SrmControl (uiPortId, srmCtlSetFlags ,&flagsBaudRate, ¶mLen);
// send the 6-byte-command
error=SrmSend(uiPortId,&bBuffer[0],6,&ulLen);
error=SrmSendWait(uiPortId);
SysTaskDelay(SysTicksPerSecond()/2);
// See if it is answering
error=SrmReceiveCheck(uiPortId,&ulCheckLen);
SrmClose(uiPortId);
}
But as soon as I change the setting srmSettingsFlagBitsPerChar7 to
srmSettingsFlagBitsPerChar8 I get the whole buffer displayed in
HyperTerminal. That leads to my question:
Is a PalmOS-Device able to send serial data with 7,1,E at all? Or what I'am
doing wrong. For years I've been thinking its possible since the settings
are in the API. Until I tried myself (and unfortunately have to get it
working!)
Thanks for your help,
Thomas
BTW. I tried that with a m505, Handera, Emulator and Simulator.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/