Hylafax Mailing List Archives

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

Re: [hylafax-users] problems with receiving faxes



On 2004.05.10 19:46 cj wrote:

The modem is a NetComm Mega-i-Modem 56

May 05 12:07:32.26: [ 2762]: <-- [4:ATA\r]
May 05 12:07:40.56: [ 2762]: --> [7:CONNECT]
May 05 12:07:40.56: [ 2762]: <-- HDLC<32:FF C0 04 AD 00 55 12 9E 36 86
62 82
1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 4C 74 0C>
May 05 12:07:40.56: [ 2762]: <-- data [32]
May 05 12:07:40.56: [ 2762]: <-- data [2]
May 05 12:07:40.59: [ 2762]: --> [7:CONNECT]
May 05 12:07:40.59: [ 2762]: <-- HDLC<23:FF C0 02 0E AE F6 4E E2 04 CE
A6 96
76 76 A6 36 E2 04 A6 16 2A 04 04>
May 05 12:07:40.59: [ 2762]: <-- data [23]
May 05 12:07:40.59: [ 2762]: <-- data [2]
May 05 12:07:40.62: [ 2762]: --> [7:CONNECT]
May 05 12:07:40.62: [ 2762]: <-- HDLC<10:FF C8 01 00 77 5F 23 01 FB
C0>
May 05 12:07:40.62: [ 2762]: <-- data [10]
May 05 12:07:40.62: [ 2762]: <-- data [2]
May 05 12:07:43.17: [ 2762]: --> [0:]

The modem is supposed to respond and result with OK when this last frame is completely transmitted. Instead, it just sits there. Something's wrong with the modem.


May 05 12:07:44.67: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:07:44.67: [ 2762]: --> [2:OK]

Because we're in command-mode the AT+FTH=3 command was not interpreted, but merely was seen as an indication to return to command-mode. So the "OK" was not expected and will cause a delay. HylaFAX's error-handling here (in reaction to the "empty line" above) could be improved.


May 05 12:07:44.67: [ 2762]: DELAY 1500 ms
May 05 12:07:46.17: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:07:46.17: [ 2762]: --> [7:CONNECT]
May 05 12:07:46.17: [ 2762]: <-- HDLC<32:FF C0 04 AD 00 55 12 9E 36 86
62 82
1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 4C 74 0C>
May 05 12:07:46.17: [ 2762]: <-- data [32]
May 05 12:07:46.17: [ 2762]: <-- data [2]
May 05 12:07:46.21: [ 2762]: --> [7:CONNECT]
May 05 12:07:46.21: [ 2762]: <-- HDLC<23:FF C0 02 0E AE F6 4E E2 04 CE
A6 96
76 76 A6 36 E2 04 A6 16 2A 04 04>
May 05 12:07:46.21: [ 2762]: <-- data [23]
May 05 12:07:46.21: [ 2762]: <-- data [2]
May 05 12:07:46.24: [ 2762]: --> [7:CONNECT]
May 05 12:07:46.24: [ 2762]: <-- HDLC<10:FF C8 01 00 77 5F 23 01 FB
C0>
May 05 12:07:46.24: [ 2762]: <-- data [10]
May 05 12:07:46.24: [ 2762]: <-- data [2]
May 05 12:07:48.73: [ 2762]: --> [2:OK]

This time we get an OK. So something went wrong the first time with the modem. Maybe it's just after ATA instead of AT+FTH=3? (Nope, see below.)


May 05 12:07:48.73: [ 2762]: <-- [9:AT+FRH=3\r]
May 05 12:07:51.83: [ 2762]: --> [0:]

The remote does not respond, and this is not surprising considering the redundant and somewhat confusing signals we've sent it. To recover from this will be lucky.


May 05 12:07:52.03: [ 2762]: DELAY 1500 ms
May 05 12:07:53.53: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:07:53.53: [ 2762]: --> [7:CONNECT]
May 05 12:07:53.53: [ 2762]: <-- HDLC<32:FF C0 04 AD 00 55 12 9E 36 86
62 82
1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 4C 74 0C>
May 05 12:07:53.53: [ 2762]: <-- data [32]
May 05 12:07:53.53: [ 2762]: <-- data [2]
May 05 12:07:53.58: [ 2762]: --> [7:CONNECT]
May 05 12:07:53.58: [ 2762]: <-- HDLC<23:FF C0 02 0E AE F6 4E E2 04 CE
A6 96
76 76 A6 36 E2 04 A6 16 2A 04 04>
May 05 12:07:53.58: [ 2762]: <-- data [23]
May 05 12:07:53.58: [ 2762]: <-- data [2]
May 05 12:07:53.61: [ 2762]: --> [7:CONNECT]
May 05 12:07:53.61: [ 2762]: <-- HDLC<10:FF C8 01 00 77 5F 23 01 FB
C0>
May 05 12:07:53.61: [ 2762]: <-- data [10]
May 05 12:07:53.61: [ 2762]: <-- data [2]
May 05 12:07:55.80: [ 2762]: --> [2:OK]

Again, things with the modem look good now.


May 05 12:07:55.80: [ 2762]: <-- [9:AT+FRH=3\r]
May 05 12:07:58.90: [ 2762]: --> [0:]

Again, the null-response from the remote is not surprising.


May 05 12:07:59.10: [ 2762]: DELAY 1500 ms
May 05 12:08:00.60: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:08:00.65: [ 2762]: --> [7:CONNECT]
May 05 12:08:00.65: [ 2762]: <-- HDLC<32:FF C0 04 AD 00 55 12 9E 36 86
62 82
1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 4C 74 0C>
May 05 12:08:00.66: [ 2762]: <-- data [32]
May 05 12:08:00.66: [ 2762]: <-- data [2]
May 05 12:08:00.69: [ 2762]: --> [7:CONNECT]
May 05 12:08:00.69: [ 2762]: <-- HDLC<23:FF C0 02 0E AE F6 4E E2 04 CE
A6 96
76 76 A6 36 E2 04 A6 16 2A 04 04>
May 05 12:08:00.69: [ 2762]: <-- data [23]
May 05 12:08:00.69: [ 2762]: <-- data [2]
May 05 12:08:00.72: [ 2762]: --> [7:CONNECT]
May 05 12:08:00.72: [ 2762]: <-- HDLC<10:FF C8 01 00 77 5F 23 01 FB
C0>
May 05 12:08:00.72: [ 2762]: <-- data [10]
May 05 12:08:00.72: [ 2762]: <-- data [2]
May 05 12:08:03.27: [ 2762]: --> [0:]

Aha! The modem does it again, this time following AT+FTH=3 instead of ATA. So it's a broader issue with the modem.


May 05 12:08:03.27: [ 2762]: DELAY 1500 ms
May 05 12:08:04.77: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:08:04.77: [ 2762]: --> [2:OK]

Again, this is just a return to command-mode, and HylaFAX handles it poorly.


May 05 12:08:04.77: [ 2762]: DELAY 1500 ms
May 05 12:08:06.27: [ 2762]: <-- [9:AT+FTH=3\r]
May 05 12:08:06.27: [ 2762]: --> [7:CONNECT]
May 05 12:08:06.27: [ 2762]: <-- HDLC<32:FF C0 04 AD 00 55 12 9E 36 86
62 82
1A 04 14 2E B6 94 04 6A A6 4E CE 96 F6 76 04 2C 74 4C 74 0C>
May 05 12:08:06.27: [ 2762]: <-- data [32]
May 05 12:08:06.27: [ 2762]: <-- data [2]
May 05 12:08:06.31: [ 2762]: --> [7:CONNECT]
May 05 12:08:06.31: [ 2762]: <-- HDLC<23:FF C0 02 0E AE F6 4E E2 04 CE
A6 96
76 76 A6 36 E2 04 A6 16 2A 04 04>
May 05 12:08:06.31: [ 2762]: <-- data [23]
May 05 12:08:06.31: [ 2762]: <-- data [2]
May 05 12:08:06.34: [ 2762]: --> [7:CONNECT]
May 05 12:08:06.34: [ 2762]: <-- HDLC<10:FF C8 01 00 77 5F 23 01 FB
C0>
May 05 12:08:06.34: [ 2762]: <-- data [10]
May 05 12:08:06.34: [ 2762]: <-- data [2]
May 05 12:08:08.83: [ 2762]: --> [2:OK]

This time it's fine...


May 05 12:08:08.83: [ 2762]: <-- [9:AT+FRH=3\r]
May 05 12:08:09.08: [ 2762]: --> [7:CONNECT]
May 05 12:08:10.18: [ 2762]: --> [8:F9 F7 89 7D 4D 7B 10 03]
May 05 12:08:10.18: [ 2762]: --> [2:OK]

And this time we actually get something in response, but it's just garbage as-is.


Anyway, it just goes on like this.

Please try the attached patch (apply, rebuild, reinstall, then restart daemons) to see if it helps work around the problem at all. Please let me know either way (a log would be nice).

Thanks.

Lee.
diff -Nru hylafax-4.2.0.orig/faxd/Class1.c++ hylafax-4.2.0/faxd/Class1.c++
--- hylafax-4.2.0.orig/faxd/Class1.c++	Mon May 10 20:23:26 2004
+++ hylafax-4.2.0/faxd/Class1.c++	Mon May 10 20:39:31 2004
@@ -1061,9 +1061,11 @@
 	return (false);
     }
     static u_char buf[2] = { DLE, ETX };
-    return (putModemDLEData(frame, frame.getLength(), frameRev, 60*1000) &&
-	putModem(buf, 2, 60*1000) &&
-	(useV34 ? true : waitFor(frame.moreFrames() ? AT_CONNECT : AT_OK, 0)));
+    if (!(putModemDLEData(frame, frame.getLength(), frameRev, 60*1000) &&
+	putModem(buf, 2, 60*1000))) return (false);
+    if (useV34 || waitFor(frame.moreFrames() ? AT_CONNECT : AT_OK, 0)) return (true);
+    if (wasTimeout()) abortReceive();		// return to command-mode
+    return (false);
 }
 
 /*


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