Com Port Data Errors

Camm29 Camm29 at tesco.net
Wed Dec 14 15:23:19 EST 2005


It works better , but many times missing the write ,

The modem issues ">" when ready to receive

So the reply for "AT00" is

ERROR
(cr)(lf)
>

I need to strip of the cr & lf and only write again when ">" is received as
fast as possible.

Camm



----- Original Message -----
From: "Sarah Reichelt" <sarah.reichelt at gmail.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Wednesday, December 14, 2005 12:54 AM
Subject: Re: Com Port Data Errors


> Baud 9600 , 8 Bits , 1 Stop
>
> Trying to send command and retrieve data at < 1 second intervals via Com
Port.
>
> Something like ,
>
> repeat xx
> write "AT00" & numToChar(13) to driver COM1:
> wait ----- sometime
> read from driver COM1:
> put it into received
> end repeat
>
> This works great with wait time >= 1 second but errors if any faster.

Try using my Serial test stack
<http://www.troz.net/Rev/tutorials/SerialTest.rev.gz>
It uses a different method with no waiting. It writes to the com port
but has a read handler that it loops through every 5 ticks to pick up
any incoming data that might be queued.

Testing by sending "AT00" to my modem, it returns "ERROR", but it
comes back instantly.

HTH,
Sarah
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list