#
# CONFIG: CLASS2.0:"Multi-Tech Systems"-"MT5634ZBA"-*
+# CONFIG: CLASS2.0:"Multi-Tech Systems"-"MT5634ZPX"-*
#
# BEGIN-SERVER
# END-SERVER
Class2CQCmd: AT+FCQ=1,0
Class2SendRTC: yes
Class2UseHex: yes
+
+# versions that respond to AT+FFC=? with non-zero data support RTFCC
+# Class2RTFCC: yes
+
+# unfortunately, HylaFAX can't currently receive in MMR
+ModemAnswerCmd: AT+FCC=01,05,02,02,02,01,00,07,7F;A
#
# CONFIG: CLASS2.1:"Multi-Tech Systems"-"MT5634ZBA"-*
+# CONFIG: CLASS2.1:"Multi-Tech Systems"-"MT5634ZPX"-*
#
# BEGIN-SERVER
# END-SERVER
Class2CQCmd: AT+FCQ=1,0
Class2SendRTC: yes
Class2UseHex: yes
+
+# versions that respond to AT+FFC=? with non-zero data support RTFCC
+# Class2RTFCC: yes
+
+# unfortunately, HylaFAX can't currently receive in MMR
+ModemAnswerCmd: AT+FCC=7F,0D,02,02,02,01,00,07,7F;A
bool
Class20Modem::sendPage(TIFF* tif, u_int pageChop)
{
+ /*
+ * Support MT5634ZBA-V92 real-time fax compression conversion:
+ * AT+FFC=? gives us non-zero data if RTFCC is supported.
+ * Firstly, we must have set our FCC to MMR support (+FCC=,,,,3), and
+ * we may need to have ECM enabled (+FCC=,,,,,1) if we intend to
+ * allow RTFCC to send in MMR. Now we send <DLE><char> where char =
+ * 6Bh - if we formatted the image in MH
+ * 6Ch - if we formatted the image in MR
+ * 6Eh - if we formatted the image in MMR
+ */
+ if (conf.class2RTFCC) {
+ protoTrace("Enable Real-Time Fax Compression Conversion");
+ uint32 g3opts = 0;
+ char rtfcc[2];
+ rtfcc[0] = DLE;
+ TIFFGetField(tif, TIFFTAG_GROUP3OPTIONS, &g3opts);
+ if (g3opts&GROUP3OPT_2DENCODING == DF_2DMMR)
+ rtfcc[1] = 0x6E; // MMR
+ else if (g3opts&GROUP3OPT_2DENCODING == DF_2DMR)
+ rtfcc[1] = 0x6C; // MR
+ else
+ rtfcc[1] = 0x6B; // MH
+ putModemData(rtfcc, sizeof (rtfcc));
+ }
+
protoTrace("SEND begin page");
if (flowControl == FLOW_XONXOFF)
setXONXOFF(FLOW_XONXOFF, FLOW_NONE, ACT_FLUSH);
/*
* Check the next page to see if the transfer
* characteristics change. If so, update the
- * current T.30 session parameters.
+ * current T.30 session parameters. Don't send DIS if
+ * using RTFCC, although unsetting params may be better.
*/
- if (pageInfoChanged(params, next)) {
+ if (pageInfoChanged(params, next) && !conf.class2RTFCC) {
if (!class2Cmd(disCmd, next)) {
emsg = "Unable to set session parameters";
break;
if (!TIFFGetField(tif, TIFFTAG_GROUP3OPTIONS, &g3opts))
g3opts = 0;
if (g3opts & GROUP3OPT_2DENCODING) {
- if (!clientInfo.getSupports2DEncoding()) {
+ if (!clientInfo.getSupports2DEncoding() and !class2RTFCC) {
emsg = "Document was encoded with 2DMR,"
" but client does not support this data format";
return (send_reformat);
traceProtocol("USE %s", params.pageWidthName());
traceProtocol("USE %s", params.pageLengthName());
traceProtocol("USE %s", params.verticalResName());
- traceProtocol("USE %s", params.dataFormatName());
+ traceProtocol("USE %s image data", params.dataFormatName());
} else if (status == send_reformat) {
traceServer(emsg);
} else if (status == send_failed) {
waitForConnect = false; // unique modem answer response
class2XmitWaitForXON = true; // default per Class 2 spec
class2SendRTC = false; // default per Class 2 spec
+ class2RTFCC = false; // real-time fax comp. conv.
class2UseHex = false; // historical behavior
class1TCFRecvHack = false; // historical behavior
setVolumeCmds("ATM0 ATL0M1 ATL1M1 ATL2M1 ATL3M1");
rtnHandling = getRTNHandling(value);
else if (streq(tag, "class2usehex"))
class2UseHex = getBoolean(value);
+ else if (streq(tag, "class2rtfcc"))
+ class2RTFCC = getBoolean(value);
else
return (false);
return (true);
fxStr class2MINSPCmd; // cmd to setup min transmit speed
fxStr class2RecvDataTrigger; // send to start recv
bool class2XmitWaitForXON; // wait for XON before send
+ bool class2RTFCC; // real-time fax compression conversion
bool class2SendRTC; // append RTC to page data on transmit
// for class 2.0:
fxStr class2PIECmd; // cmd to set proc interrupt handling
Class2PTSQueryCmd string \s-1AT+FPTS?\s+1 Class 2.0: command to query received page status
Class2RecvDataTrigger string \s-1``\e22''\s+1 Class 2.0: character to send to trigger recv
Class2RELCmd string \- Class 2.0: command to enable byte-aligned \s-1EOL\s+1 codes
+Class2RTFCC boolean \s-1No\s+1 Class 2.0: enable real-time fax compression conversion
Class2SACmd string \s-1AT+FSA\s+1 Class 2.0: set destination subaddress string
Class2SendRTC boolean \s-1No\s+1 Class 2.0: append \s-1RTC\s+1 to page data on transmit
Class2SFLOCmd string \s-1AT+FLO=1\s+1 Class 2.0: command to set software flow control
codes are byte-aligned; otherwise they will be marked as
not (necessarily) having byte-aligned codes.
.TP
+.B Class2RTFCC
+Whether or not to enable MultiTech's Real-Time Fax Compression Conversion
+which is available in later firmware revisions for the MT5634ZBA-V92 and
+MT5634ZPX-PCI-V92 models. RTFCC allows HylaFAX to convert the image
+compression between MH MR and MMR formats regardless of how faxq formatted
+the image file. If RTFCC is available with your firmware, then the
+response to ``AT+FFC=?'' is non-zero.
+.TP
.B Class2SACmd
A largely unused option for modems supporting ITU-T.32, Class 2.1,
standards. This command would be used to set up the destination