Thanks, that helped.

For the record, the problem was actually due to me sending data immediately
after SrmOpen, and then changing the flags in a different routine later.
(The program is used to try and decode a serial stream.)

It looks like a call to SrmControl srmCtlSetFlags should be made before any
data is sent through the port. If the control values need to change the port
must be closed and re-opened.

Regards
 John



Marcelo Gorini <[EMAIL PROTECTED]> wrote in message
news:9813@palm-dev-forum...
>
>
> The code below is working so far!
>
>
> .............................
> case MainOpenButton:
> err = SrmOpen(serPortCradlePort, 9600, &refNum);
>
> if(err==serErrAlreadyOpen)
> {
> FrmCustomAlert(CustomAlert, "Serial port already
> open","","");
> }
>
> Baud = 9600;
> setflags = (srmDefaultSettings| srmSettingsFlagParityOnM); // 8
> bit char, 1 stop, Odd
>
> err = SrmControl(refNum, srmCtlSetBaudRate, &Baud, &sizeV);
> err = SrmControl(refNum, srmCtlSetFlags, &setflags, &sizeF);
> break;
> ..................
>
> I Hope this helps
>
> Marcelo
>
> -----Original Message-----
> From: John Devany [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 27, 2000 5:14 AM
> To: Palm Developer Forum
> Subject: srmControl in New Serial Manager
>
>
>
> Does anyone have a worked example of using srmControl with srmCtlSetFlags?
>
> After opening a port, either serial or IR, the value of the serial port
> flags is always 0xD0. I need to be able to change parity and word lengths
> etc. But when I change it to a value like 0xC2 which should (?) mean 8 bit
> words Odd parity, then the port freezes. The port stays frozen until its
> closed and reopened. While frozen, no changing of flags will unfreeze it.
>
> The port works fine until after setting the flags. (Oh, I am changing the
> setting of the serial port from the testing device.)
>
> Thanks & regards.
>  John Devany
>
>
>
> PS: I posted a similar message to this group about 12 hours ago. It's not
> here so I've posted again... apologies if the original appears in the mean
> time [I'm pretty sure it is lost].
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palm.com/devzone/mailinglists.html
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to