![]() |
At 08:39 28/08/00 +0400, Dmitry Bely wrote: >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. >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: "" in the modem configuration file(the dtr reset before should be enough). - Robert ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null