Hylafax Mailing List Archives

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

AdaptiveAnswer with class 1 modem




Hi,

Sys: Redhat-6.0 Linux 2.2.10 #4 SMP Tue Jun 15 23:08:13 PDT 1999 i586 unknown
Modem: ActionTec Desktalk x2 firmware: ATI1="CD04.08 - 540G Parallel - SP 04"
(http://www.actiontec.com/support/modems/dt56k.html)
HylaFAX: hylafax-4.1beta1-1rh6.i386.rpm


I have a dumb class 1 modem attached to ttyS0.  My modem does not
report the connection type properly; it says "CONNECT" whether its
received a fax or data connection.  So, I configured faxgetty to use
AdaptiveAnswer.  I tested this by using 'faxanswer ttyS0', but I found
that faxgetty only tried the first entry in AnswerRotary, and nothing
after that.  I kept getting these 'ANSWER: Ring detected without
successful handshake' errors after I defined AnswerRotary to be "data
fax".


I dug throught the hylafax sources and found that
faxGettyApp.c++:FIFOMessage() never calls answerPhoneCmd() with
ClassModem::ANSTYPE_ANY.  That means that AdaptiveAnswer will never be
triggered by the 'faxanswer' command.  I changed the source and now
faxanswer works.  I have included a patch below.


Getting my cheapo modem to work has been quite a headache.  mgetty
only handles class 2+ modems.  efax will do an adaptive-answer-like
thing properly, but it only gets the first page of a fax.  HylaFax
gets the fax correctly but doesn't do adaptive answer.  Ugh.  I know
the answer is to get a better modem, but I was determined to make mine
work.

My next project is to call 'mgetty -r %s' as the external getty to use
its AutoPPP feature.  Has anyone got this to work?


By the way, what's the deal with making GettyArgs a configurable
variable, but leaving the PATH_GETTY a compiled constant?  Wouldn't it
be nice to use a GettyPath run-time variable?


Oh, thanks for the good work on HylaFax.  It could be a very useful
tool for me.

--Noel



diff -ur hylafax-4.1beta1/faxd/faxGettyApp.c++ hylafax-4.1beta1-noel/faxd/faxGettyApp.c++
--- hylafax-4.1beta1/faxd/faxGettyApp.c++	Sun Jun 13 00:41:05 1999
+++ hylafax-4.1beta1-noel/faxd/faxGettyApp.c++	Mon Sep  6 13:57:15 1999
@@ -764,18 +764,21 @@
 {
     switch (cp[0]) {
     case 'A':				// answer the phone
-	traceServer("ANSWER %s", cp[1] != '\0' ? cp+1 : "any");
-	if (cp[1] != '\0') {
-	    if (streq(cp+1, "fax"))
-		answerPhoneCmd(ClassModem::ANSTYPE_FAX);
-	    else if (streq(cp+1, "data"))
-		answerPhoneCmd(ClassModem::ANSTYPE_DATA);
-	    else if (streq(cp+1, "voice"))
-		answerPhoneCmd(ClassModem::ANSTYPE_VOICE);
-	    else if (streq(cp+1, "extern"))
-		answerPhoneCmd(ClassModem::ANSTYPE_EXTERN);
-	} else
-	    answerPhoneCmd(answerRotary[0]);
+	traceServer("ANSWER %s", cp[1] != '\0' ? cp+1 : "default");
+	if (streq(cp+1, "fax"))
+	    answerPhoneCmd(ClassModem::ANSTYPE_FAX);
+	else if (streq(cp+1, "data"))
+	    answerPhoneCmd(ClassModem::ANSTYPE_DATA);
+	else if (streq(cp+1, "voice"))
+	    answerPhoneCmd(ClassModem::ANSTYPE_VOICE);
+	else if (streq(cp+1, "extern"))
+	    answerPhoneCmd(ClassModem::ANSTYPE_EXTERN);
+	else {
+	    if( *(cp+1) ) {
+		traceServer("ANSWER WARN unknown answer type: %s using ANSTYPE_ANY", cp+1);
+	    }
+	    answerPhoneCmd(ClassModem::ANSTYPE_ANY);
+	}
 	break;
     case 'C':				// configuration control
 	traceServer("CONFIG \"%s\"", cp+1);



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