Hylafax Mailing List Archives

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

Re: [hylafax-users] [hylafax-devel] Re: any body can help ?



Robert Colquhoun <rjc@trump.net.au> writes:

> > > Maybe:
> > >
> > > if (!atCmd(conf.softResetCmd, AT_OK, conf.resetDelay)) {
> > >          //report error here
> > >          if (!atCmd("AT&F&W", AT_OK, conf.resetDelay)) {
> > >                  //there's really no coming back from here - crash and 
> > burn.
> > >          }
> > > }
> > > return atCmd(resetCmds, AT_OK, ms);
> >
> >I don't like it :-))) The problem is that
> >a) IMHO silent rewriting of NVRAM by any software is not acceptable -- the
> >user will be very suprised :-)
> 
> .. i didn't mean to add the &W in there as well only the &F, just in too 
> much of a hurry.
> 
> >b) Some modems restore proper factory defaults via AT&F1 or AT&F2, not AT&F.
> 
> ok conf.factoryResetCmd then.

If you don't mean &W, &F is OK. What about 

if (!atCmd(conf.softResetCmd, AT_OK, conf.resetDelay)){
    // report warning and try to recover
    protoTrace("INIT PROBLEM: No OK after %s. Check the modem's NVRAM settings.",
               conf.softResetCmd); // or serverTrace()? Don't remember for sure.
    if (!atCmd("AT&F", AT_OK, conf.resetDelay))
        return false;
}
return atCmd(resetCmds, AT_OK, ms);

(I believe one more ATZ after AT&F will also fail -- NVRAM setting was not
changed). Do you agree with it?

> >c) atCmd(conf.softResetCmd, AT_OK, conf.resetDelay) is needed just to reset
> >the modem in addition to DTR drop. Even if ATZ fails, other Hylafax reset
> >commands still may succeed.
> 
> how about:
> 
> if (!atCmd(conf.softResetCmd, AT_OK, conf.resetDelay))
>            //report error here
>            if (!atCmd(conf.factoryResetCmd, AT_OK, conf.resetDelay) || 
> !atCmd(conf.softResetCmd, AT_OK, conf.resetDelay)) {
>                    //there's really no coming back from here - crash and burn.
>                   return false;
>            }
>   }
>   return atCmd(resetCmds, AT_OK, ms);
> 
> ...actually, now i think about it, maybe not.
> 
> It might be better in this case just to disable the modem soft reset 
> command, perhaps something like:
> ModemSoftResetCmd: ""

Yes, that's possible, but we should try to resolve such issues
automatically without an admin intervention.

> in the modem configuration file(the dtr reset before should be enough).

Perhaps, but the situation when ATZ gives no OK is anyway abnormal.

Hope to hear from you soon,
Dmitry




____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-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