[Gambas-user] Issue/Problem with Serial Port Component

ron ronstk at ...239...
Mon Jun 5 23:15:41 CEST 2006


On Monday 05 June 2006 22:16, Timothy Marshal-Nichols wrote:
> I have not come across a unit that did not have some kind of end text
> terminating string . ARE YOU SURE. To be honest I do not believe there is
> not something of this kind. No sane programmer would do it.
> 

The same experience here, except a few homebrew QaD projects.

There are a few basic ways of serial data transport.

1) Simple ASCII with line termination.

2) Simple Binairy with fixed length.

3) Or packed by some protocol.

  The first byte(s) as length (LRL recording) as gambas does with WRITE
  or like X-MODEM with a protocol (NAK/ACK/RDY) between the both serial ports
  and using software handshake for the data bursts.
  Even in the ASCII table there are a few bytes for x-onn/x-off.

The last one is used by me for a AX25 TNC with tcp/ip on a Z80 cpu :)

And all above can use the hardware handshake as extra feature.

If nando's gambas application is not quick enough to catch byte 
for byte then he should use a protocol form as the above 3 and/or use
the hardware handshake to stream the bytes in time.

I'm afraid nando can't have a influence on the way the remote appliccation
sends the data, then he must use the best result he can get with single byte
reading and a timer for time out situation.

I had even to use the timeout to, despite there was a protocol used.
(missing packets and the handshake is lost)

Ron






More information about the User mailing list