[futurebasic] [FB] re: Serial port USB serial adapters does not work underOS9

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2003 : Group Archive : Group : All Groups

From: Walter Lenk <Walter_Lenk@...>
Date: Fri, 28 Mar 2003 10:10:49 -0500
Masa -

You wrote:

>  According to you, the serial port related problems are due to Keyspan
>  drivers.
>  But Zterm (PPC1.1b7) works as expected under OS9.2.2 with any Keyspan driver
>  despite USB-serial adapter is connected when boot up.

The _only_ problem that I ascribe to the Keyspan Driver is the 
'segment loading' crash problem at bootup -> Keyspan knows about 
this, and they were the ones that suggested the fix that I mentioned.

I have come believe that the rest of the problems are the result of 
FB's serial port code implementation.  I have experimented with 
various kinds of USB to serial port adapters (3 kinds of Keyspans, a 
Belkin, and an IOGear) and they all seem to work with ZTerm, but the 
success with FB is very spotty.  I have been focusing on the USA28x 
because it is in widespread use by a client of mine, and so over the 
last several years I have had lots of experience with the various 
versions of the Keyspan Driver and various releases of FB as part of 
this project. Earlier versions of the Keyspan driver (v 1.6?) and 
releases of FB^3 (circa May 2000) worked well, but about a year ago 
there started to be problems.  Since this is a minor (for most 
people) part of the FB language, updating it has been lost in the 
rather large list of things Staz and Andy and others have to do to 
maintain the language.  The good news is the serial port routines 
were completely rewritten for OSX, and seem to work well.

When you think about it, this situation is not entirely unexpected. 
The MAC started out with 2 hardware serial ports, and the original FB 
communications routines were written for this specific environment. 
Then came the complications: PCI cards that added more serial ports, 
Powerbooks with only one serial port, and finally USB to serial port 
adapters.  No longer were there 2 ports with specific names and 
specific hardware locations that were always guaranteed to be there. 
Apple added the communications toolbox (CTB) to address these 
complications, and eventually FB added support for the CTB as 
modifications of the original serial port routines.  But as USB 
matured, some of the issues got complicated (such as how to deal with 
a USB serial port that has been unplugged while in use by an 
application), and the Keyspan drivers presumably evolved to deal with 
them.  I don't think the FB routines have followed, and thus we have 
the problem.

>  I am checking OS9.2.2 with basic (minimum) extension + Keyspan USA-28X
>  (driver 1.9; directly connected to my PowerBook G4)
>  How do you think about this?

Should work fine. Just don't forget to override FN TermGetStatus:

OVERRIDE LOCAL FN TermGetStatus(WhichPort)
END FN = 0        ' Effectively pass a 'No Problem' back


Good luck,

Walter
-- 
===========================================
Walter Lenk    Cambridge Ma    617-547-7781
===========================================