[futurebasic] Re: [FB] Hardware handshaking

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2002 : Group Archive : Group : All Groups

From: ted spencer <ted@...>
Date: Tue, 19 Feb 2002 08:30:53 -0500
From the nimble fingers of Paul Bruneau (paul_bruneau@...)
(19/2/2002 8:17 AM) came...

>> It seem to me that the 9 pin connector was for a "Geoport" which also
>> supplied power (12 VDC, 150 mA) to that connector; the 8 pin one has all
>> that is necessary for hardware handshaking.
> 
> OK, that is interesting, because I can distinctly remember certain
> Global Village modems requiring a special "hardware handshaking cable".
> I will continue to search the web for info.

Actually, I think, as I suggested above, that special cable added only the
power for the modem; the data lines didn't change...

>> One thing to note, though... You should allocate a serial buffer big enough
>> to hold everything you might write to the port, because you MIGHT not know
>> (unless you've taken extraordinary measures) how much of your data has
>> already been sent.
> 
> This comment I do not understand. As far as I can tell with FB serial
> communication, I am NEVER aware of how much data has already been sent
> (this may be an element of my problem). I simply open the channel, call
> the HANDSHAKE command, and send the data, never looking back. I have
> always counted on the handshake taking care of when to pause (at least I
> assume it was pausing...it always worked flawlessly in FB2, but I am
> having no luck in FB3). By what mechanism am I able to tell how much
> data has been sent down the channel? (I use the default 64 Byte buffer, btw).

That's a thorny question answered by some code I stole from elsewhere, do
not understand, did not ever make work properly, and do not care to
disseminate further. There's a parameter block with rather a lot of entries,
one of which will tell what's left in the (outgoing) buffer. Not, of course,
to be confused with finding out how many are in the incoming buffer.

Or is it only the incoming buffer that is set in the "OPEN "C"" statement? I
don't think so, since it was necessary to increase the buffer size to make
the outgoing data work.

The bonehead's approach is to allocate a 2k or 20k buffer when the port is
opened, and be sure that the buffer can hold all that you expect to write to
the port.
-- 
Ted Spencer; ted@...
--
Time is Nature's way of keeping everything from happening at once.