Hylafax Developers Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-devel] Re: atz



On Sat, 15 Apr 2000 22:50:51 +0200, Bernd Proissl wrote:


Hello Bernd!
>ClassModem::reset(long ms)
>{
>    setDTR(false);

... which disables modem.

>    pause(conf.resetDelay);		// pause so modem can do reset
>(1) if(strlen($ModemResetCmds$)>0)
>(1)    atCmd($ModemResetCmds$, AT_NOTHING, conf.resetDelay);

Will never reach the modem ?

>    setDTR(true);

... maybe now modem reaches command ?

>    if (!setBaudRate(rate, iFlow, oFlow))

This sets only UART to the bitrate, not the modem ?

Changing DCE-DTE bitrate is a terrible thing! It may work, and it may NOT work as assumed. But I 
have also no 100% solution (except NEVER change it).

more than 90% percent of modem 'failures' result from improper changing DCE-DTE bitrate.

>    resetCmds = "AT"
>(5)	      | stripAT(conf.resetCmds)		// prepend to insure our needs
>	      | stripAT(conf.echoOffCmd)
>	      | stripAT(conf.verboseResultsCmd)
>	      | stripAT(conf.resultCodesCmd)
>	      | stripAT(conf.noAutoAnswerCmd)
>	      | stripAT(conf.onHookCmd)
>	      | "\nAT"
>	      | stripAT(conf.pauseTimeCmd)
>	      | stripAT(conf.waitTimeCmd)
>	      | stripAT(flow)
>	      | stripAT(conf.setupDTRCmd)
>	      | stripAT(conf.setupDCDCmd)

It is a good practice (but sometimes slow) to send EACH command to modem enclosed by AT + CR. So 
you can check the response to EACH command for OK and stop immediatly if response is ERROR or 
(even nothing).

>
>adding this many delay parameters may help in optimizing the lengthy reset
>sequence.

Simply wait for OK response :-)

Mit herzlichen Gruessen / Yours sincerely

Dr. Harald Pollack

Harald.Pollack@DATAnews.at



____________________ HylaFAX(tm) Developers Mailing List ____________________
 To unsub: mail -s unsubscribe hylafax-devel-request@hylafax.org < /dev/null



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services