Auto Baud Rate Detection
Ben Rubinstein
benr_mc at cogapp.com
Tue Jul 11 12:46:54 EDT 2006
On 11/7/06 17:22, Camm29 wrote:
> Need to automatically detect and set one of two Baud Rates for Com Ports.
> 9600 or 2400.
>
> The device will respond to "Hello" with "Okay" if the Baud is correct.
Have your code open the port with one baud rate, test it, if it doesn't get
"Okay" in reponse to "Hello", then close the port and reopen with the other
baud rate.
I have a similar case - it knows what the baud rate is, and what a response
looks like, but not which port the device might be on - my app effectively
does the same thing, except that instead of changing the baud rate on each
test it changes the port. That works fine, I would expect this would work in
your case too.
Ben Rubinstein | Email: benr_mc at cogapp.com
Cognitive Applications Ltd | Phone: +44 (0)1273-821600
http://www.cogapp.com | Fax : +44 (0)1273-728866
More information about the use-livecode
mailing list