![]() |
The patch below fixes two problems: 1) My modem, a SupraExpress 56e, responds "0,1,1.0" to "at+fclass=?". Unfortunately, hylafax was assuming that the only modem class with a period in it is 2.0, which means that "1.0" gets incremented by the parser to "2" and faxgetty thinks my modem supports class 2, which it doesn't. I added a SERVICE_CLASS10 constant, and added "Class 1.0" to the modem class names, and that seemed to solve the problem. 2) The documentation claims that the daemons send the soft reset command to the modem, but I couldn't find any evidence that they do so, either by reading and searching source code or by looking in the server and session traces. I modified faxd/ClassModem.c++ to send the soft reset command before the other reset commands. --- util/class2.h 1997/07/30 16:39:44 1.1 +++ util/class2.h 1997/07/30 16:40:19 @@ -45,8 +45,9 @@ // service types returned by +fclass=? const int SERVICE_DATA = BIT(0); // data service const int SERVICE_CLASS1 = BIT(1); // class 1 interface -const int SERVICE_CLASS2 = BIT(2); // class 2 interface -const int SERVICE_CLASS20 = BIT(3); // class 2.0 interface +const int SERVICE_CLASS10 = BIT(2); // class 1.0 interface +const int SERVICE_CLASS2 = BIT(3); // class 2 interface +const int SERVICE_CLASS20 = BIT(4); // class 2.0 interface const int SERVICE_VOICE = BIT(8); // voice service (ZyXEL extension) const int SERVICE_ALL = BIT(9)-1; --- faxd/ClassModem.c++ 1997/07/16 10:57:20 1.1 +++ faxd/ClassModem.c++ 1997/07/30 17:41:10 @@ -52,9 +52,9 @@ const char* ClassModem::serviceNames[9] = { "\"Data\"", // SERVICE_DATA "\"Class 1\"", // SERVICE_CLASS1 - "\"Class 2\"", // SERVICE_CLASS2 - "\"Class 2.0\"", // SERVICE_CLASS20 (XXX 3) - "", // 4 + "\"Class 1.0\"", // SERVICE_CLASS10 (XXX 2) + "\"Class 2\"", // SERVICE_CLASS2 (XXX 3) + "\"Class 2.0\"", // SERVICE_CLASS20 (XXX 4) "", // 5 "", // 6 "", // 7 @@ -129,7 +129,8 @@ */ // XXX: workaround yet another GCC bug (sigh) const fxStr& flow = conf.getFlowCmd(conf.flowControl); - resetCmds = "AT" + resetCmds = conf.softResetCmd + | "\nAT" | stripAT(conf.resetCmds) // prepend to insure our needs | stripAT(conf.echoOffCmd) | stripAT(conf.verboseResultsCmd)