HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] Trouble receiving faxes from a Brother MFC-440CN



Davie Lynn wrote:

Sep 04 10:03:39.61: [ 3424]: <-- [10:AT+FRM=96\r]
Sep 04 10:03:40.54: [ 3424]: --> [7:CONNECT]
Sep 04 10:03:40.54: [ 3424]: MODEM set XON/XOFF/FLUSH: input ignored, output generated
Sep 04 10:03:40.54: [ 3424]: RECV: begin page
Sep 04 10:04:06.53: [ 3424]: RECV: 796 total lines, 0 bad lines, 0 consecutive bad lines
Sep 04 10:04:06.53: [ 3424]: RECV: end page
Sep 04 10:04:06.53: [ 3424]: --> [10:NO CARRIER]
Sep 04 10:04:06.53: [ 3424]: <-- [9:AT+FRH=3\r]
Sep 04 10:04:06.84: [ 3424]: --> [7:CONNECT]
Sep 04 10:04:16.84: [ 3424]: MODEM TIMEOUT: receiving HDLC frame data
Sep 04 10:04:16.95: [ 3424]: --> [2:]
Sep 04 10:04:16.95: [ 3424]: --> [2:OK]


It looks like the page ended prematurely (due to VoIP jitter or some other kind of audio disturbance). Then the V.21 HDLC modem erroniously reported CONNECT after AT+FRH=3 (this isn't that uncommon) still on the high-speed Phase C data... but then, instead of dumping garbage at us or reporting ERROR it allowed a timeout to occur.

Try out the attached patch against 5.1.8. It should help alleviate the problem if my guess about what happened is correct.

Thanks,

Lee.

--- hylafax.orig/faxd/Class1Recv.c++	2007-09-04 12:31:33.025379568 -0700
+++ hylafax/faxd/Class1Recv.c++	2007-09-04 13:54:10.287761136 -0700
@@ -745,7 +745,17 @@
 	    for (u_int i = 0; i < frameRcvd.length(); i++) frame.put(frameRcvd[i]);
 	    frame.setOK(true);
 	} else {
-	    ppmrcvd = recvFrame(frame, FCF_RCVR, timer);
+	    gotCONNECT = false;
+	    u_short recvFrameCount = 0;
+	    do {
+		/*
+		 * Some modems will report CONNECT erroniously on high-speed Phase C data.
+		 * Then they will time-out on HDLC data presentation instead of dumping
+		 * garbage or quickly resulting ERROR.  So we give instances where CONNECT
+		 * occurs a bit more tolerance here...
+		 */
+		ppmrcvd = recvFrame(frame, FCF_RCVR, timer);
+	    } while (!ppmrcvd && gotCONNECT && wasTimeout() && !gotEOT && ++recvFrameCount < 3);
 	    if (ppmrcvd) lastPPM = frame.getFCF();
 	}
 	/*



Project hosted by iFAX Solutions