Hi, Have you tried?:
ser.Purge; ser.CloseSocket; ser.Free; Also try PortMon from Sysinternals (http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx) to debug. Jon --- On Mon, 28/7/08, Steve IK4WMH <[EMAIL PROTECTED]> wrote: > From: Steve IK4WMH <[EMAIL PROTECTED]> > Subject: Re: [Synalist] Problem with USB-RS232 adapter > To: "Ararat Synapse" <[email protected]> > Date: Monday, 28 July, 2008, 1:59 PM > Hello Mark, > > Monday, July 28, 2008, 8:58:36 AM, you wrote: > > MR> Reduce your code to the bare minimum needed to > reproduce the problem, > MR> and either doing that will give you the answer (it > often does for me!) > MR> or else post it here. > > I tried with a very simple test unit enclosed here. > > I also tried to disconnect the usb-serial adapter when the > program is > not running but I have the same problem...once I disconnect > the > adapter and then reconnect I can't read anything from > the serial port. > > I tried with the following unit, it runs ok the first time > the program > is run and the adapter is connected, when I disconnect it > and > reconnect later it does not read any data anymore until I > restart my > pc. > > > > > > unit testsyn; > > interface > > uses > Windows, Messages, SysUtils, Variants, Classes, Graphics, > Controls, Forms, > Dialogs, synaser, synautil; > > type > TForm1 = class(TForm) > procedure FormShow(Sender: TObject); > private > { Private declarations } > public > { Public declarations } > end; > > > var > Form1: TForm1; > ser:tblockserial; > s:String; > > > implementation > > {$R *.dfm} > > > procedure TForm1.FormShow(Sender: TObject); > begin > ser:=TBlockSerial.Create; > try > ser.Connect('COM5'); > ser.config(19200,8,'N',1,false,false); > s:=ser.ATCommand('+V'); > form1.Caption:=s; > finally > ser.free; > end; > end; > > end. > > > > ---------------------------- > Famous Sport Quotes: > > "One of the reasons Arnie (Arnold Palmer) is playing > so well is that, > before each tee-shot, his wife takes out his balls > and kisses them - Oh my God, what have I just said?" > USTV commentator > ---------------------------- > > Steve IK4WMH > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > synalist-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/synalist-public __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
