Hylafax Mailing List Archives

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

hylafax-4.0pl1: changes to work with SupraExpress 56e



I got at+fae=1 (i.e., auto-detect of fax/data) to work with the new
SupraExpress 56e class 1 faxmodem, although it took a bit of effort.
I had to make one source code change:

--- Class1Recv.c++	1997/07/16 01:31:17	1.1
+++ Class1Recv.c++	1997/07/16 11:53:56
@@ -63,14 +63,17 @@
 const AnswerMsg*
 Class1Modem::findAnswer(const char* s)
 {
-    static const AnswerMsg answer[2] = {
-    { "CONNECT ", 8,
+    static const AnswerMsg answer[3] = {
+    { "FAX",	 3,
+      FaxModem::AT_CONNECT, FaxModem::OK, FaxModem::CALLTYPE_FAX },
+    { "DATA",	 4,
       FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_DATA },
     { "CONNECT",  7,
-      FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_UNKNOWN },
+      FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_DATA },
     };
     return strneq(s, answer[0].msg, answer[0].len) ? &answer[0] :
 	   strneq(s, answer[1].msg, answer[1].len) ? &answer[1] :
+	   strneq(s, answer[2].msg, answer[2].len) ? &answer[2] :
 	      FaxModem::findAnswer(s);
 }
 

This was necessary because with the SupraExpress 56e (and perhaps
previous SupraExpress modems, although I'm not sure about them), the
"FAX" result code is followed by "CONNECT" but "DATA" and "CONNECT"
aren't.  This was also necessary because the old
Class1Modem::findAnswer() function didn't look for FAX and DATA at
all.

If there really are some modems which sent "CONNECT" after both "FAX"
and "DATA" result codes, then I suppose there's a problem here -- I
don't see how to make the source code understand that for some class 1
modems, waitForConnect applies only to fax calls, while for others, it
applies to both fax and data calls.

Here's the relevant settings from the modem config file I'm using
(I've omitted the settings which are the same as the config(5)
defaults):

ModemType:		Class1		# use this to supply a hint
ModemRate:		115200		# rate for DCE-DTE communication
ModemFlowControl:	rtscts
ModemSetupDTRCmd:	AT&D2		# setup so DTR drop resets modem
ModemSetupDCDCmd:	AT&C1		# setup so DCD follows carrier
ModemDialCmd:		ATDT%s@		# T for tone dialing, @ for silence
ModemAnswerCmd:		ATA		# use this to answer phone
ModemAnswerFaxBeginCmd:	<19200>AT+FCLASS=1 # switch to 19200, class 1 for FAX
ModemAnswerDataBeginCmd: ATO		# go on-line
ModemNoFlowCmd:		AT&K		# disable flow control cmd
ModemHardFlowCmd:	AT&K3		# hardware flow control cmd
ModemSoftFlowCmd:	AT&K4		# software flow control cmd
ModemWaitForConnect:	yes
ModemSetupAACmd:	AT+FCLASS=0;+FAE=1 # auto-answer works in class 0
ModemResultCodesCmd:	ATQ0X4W1	# enable result codes
Class1RecvAbortOK:	200		# wait 200ms for abort response

I'm not 100% certain, but I think that either the "X4" or the "W1" in
ModemResultCodesCmd is necessary to get the modem to report "FAX" and
"DATA" rather than just "CONNECT".  In any case, they don't hurt.

I suppose the "trick" of getting this to work was to use AT+FAE=1 in
class 0, since it works there, and then to switch to class 1 when it
indicates a fax connection.  The other trick was enabling
ModemWaitForConnect for incoming faxes, since without it, the modem
attempts to switch into fax receive mode before the modem has finished
the connection sequence, which causes the modem to abort the
connection.

  jik



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