Re: [Synalist] SYNASER - port initialization problem

2009-12-29 Thread Lukas Gebauer
> Thank you for reminding me LastError function - it returns Timeout. Yes,
> first create, then Connect and then Config. What's most isteresting is
> that this problem occures only after convertor pluging in. Since there has
> been some trafic on the converted port, there's no problem at all.
> However, other apps (not using synaser) can use the converted port
> immediatedy and actually I have to use this 3rdparty apps to make my app
> working (as described before). Hope I explained it in better way :-) Since
> other apps can work proprly even for the first time, the question is why
> synaser can't ... :-(

Timeout as result of Config call? It is't possible. You really got 
timeout error as result of Config call? 

Please, write here how you are calling Config.

IMHO you have some parameter bad (Stop bits?) and Config failed. Serial 
port stay in previous state, until some other program configure it 
correctly.

--
Lukas Gebauer.

http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
http://geoget.ararat.cz/ - Geocaching solution



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SYNASER - port initialization problem

2009-12-29 Thread Petr Fejfar
Dne Mon, 28 Dec 2009 22:46:45 +0100 Jirka Hudec   
napsal/-a:

> Since other apps can work proprly even for the first time, the question  
> is why synaser can't ... :-(

I've never used Synaser, but your problem resembles me
troubles we met while trying recognize connected device
with convertor supplied from RS232 port - if we did
not set proper polarity of handshake signals correctly
first time, it was not possible to make convertor
running any more without disconnecting it...

One idea concerning to your problem: AFAIK, Synaser
inits COM port by the sequence:

   - clear DCB
   - set some fields of DCB
   - SetCommState(DCB)

whereas typical implementation is

   - GetCommState(DBC)
   - change some fields of DCB
   - SetCommState(DCB)

Perhaps you could test what happens if you replace
the command FillChar(...) by GetCommState(...)


HTH, pf


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public