Com Port Data Errors

Camm29 Camm29 at tesco.net
Thu Dec 15 18:40:42 EST 2005


I changed it a bit and the speeds great.
I checked for valid length and ending with > , if not send again

Thanks for making me think !!!!
Camm

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


> Everything is the same ,hardware and comm settings.
> The command sent does not really matter ,
> for example i used "AT00" which returns ERROR then CR AND LF and then the
> character >
>
> This is the correct response but i can't seem to get Rev to send , receive
> and wait for the > character then repeat without it getting missed sends.
>
> if i put a delay before resending of >= 1 second it works fine.(It should
be
> able to repeat in around 100ms , command send,receive and wait for >)
> I may be missing something but what would be the fastest solution
>

What sequence are you following?
I would send then keep reading the serial port and send again as soon
as I had received the >
That way you are not making any assumptions about the send of
transmission or the response time of a particular modem.

Here is what I tested: I sent the first "AT00" and set gIndex to 0.
Then the handler that reads the data called this routine every time it
received anything.

on checkData pRec
    global gIndex
    if pRec contains "ERROR" then
        add 1 to gIndex
        if gIndex < 10 then
            put the label of btn "Port" into thePort
            write "AT0" & gIndex & numToChar(13) to driver thePort
        end if
    end if
end checkData

I don't get your ">" so I used ERROR as the trigger. This loops
through 10 times sending "AT00", "AT01" etc etc. It doesn't miss any
of them and the whole thing takes about 100 ticks, for 10 writes &
reads.

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