fax receive script ?
(dima@localhost.localdomain)
Fri, 29 Oct 1999 10:06:05 -0400
Here comes the diff for how I patched ../voice/vgetty/answer.c
to enable my Rockwell get fax/data properly after being in voice mode.
Sorry it contains the comment I put in for myself.
The idea is that you play with autodetection only if answer_mode
is undecided before, i.e it is ANSWER_DATA | ANSWER_FAX .
If answer_mode is already decided (i.e ANSWER_FAX or ANSWER_DATA only)
then the code switches off autodetection (+FAA=0) so +FCLASS state cannot
be played with.
With my modem incoming fax always led to the ANSWER_FAX (only) mode
to be set, so setting +FCLASS=0 led to failed fax reception.
I should note, that (if I remember correctly) forcing autodetection
in config file (so that everything goes through ANSWER_DATA | ANSWER_FAX
branch) still leads on my modem to fax failure. Which seems to mean that
it not only cannot autodetect in +FCLASS=2 mode, but cannot autodetect
at all after being in voice mode. Well ... it works fine in most of other
aspects.
Regards, Dmitri Pogosyan
------------------ answer.diff ---------------------
--- answer_orig.c Sat Jul 24 17:26:50 1999
+++ answer_new.c Sun Oct 10 00:01:23 1999
@@ -35,12 +35,11 @@
if (modem_type == Mt_class2)
{
bit_order = 0;
- /* following the specs, we should go to +FCLASS=2;+FAA=1, but
- * there is a fair number of Rockwell modems that can't do
- * data calls if in that mode - must go to +FCLASS=0;+FAA=1 -
- * but yet other modems NEED class 2, so use modem_quirks...
- */
- fax_mode = ( modem_quirks & MQ_NEED2 ) ? "2": "0";
+ /* The patch here is in wrong place it goes only
+ * if the asnwer mode is ANSWER_DATA | ANSWER_FAX,
+ * it is wrong if it is only ANSWER_FAX. I moved it
+ */
+ fax_mode = "2";
};
if (modem_type == Mt_class2_0)
@@ -64,6 +63,15 @@
case ANSWER_DATA | ANSWER_FAX:
lprintf(L_JUNK, "%s: trying data and fax connection",
program_name);
+
+ /* Here were we moved the patch for class 2 modems:
+ * following the specs, we are in +FCLASS=2;+FAA=1, but
+ * there is a fair number of Rockwell modems that can't do
+ * data calls if in that mode - must go to +FCLASS=0;+FAA=1 -
+ * but yet other modems NEED class 2, so use modem_quirks...
+ */
+ if (modem_type == Mt_class2)
+ fax_mode = ( modem_quirks & MQ_NEED2 ) ? "2": "0";
if (voice_switch_to_data_fax(fax_mode) == FAIL)
return(FAIL);