class2.1 \
skel \
\
+ agere-mp-2 \
+ agere-mp-21 \
att-dataport-2 \
att-dataport-2.0 \
att-dataport \
--- /dev/null
+# $Id$
+#
+# prototype config file for Mainpine Ltd. RockForceDUO+
+#
+
+#
+# CONFIG: CLASS2:"Mainpine Venus V.92"*-"Mainpine Venus V.92"*-*
+#
+# BEGIN-SERVER
+# END-SERVER
+#
+
+ModemType: Class2
+ModemRate: 19200
+ModemFlowControl: rtscts
+ModemNoFlowCmd: AT&K0
+ModemSoftFlowCmd: AT&K4
+ModemHardFlowCmd: AT&K3
+
+Class2APQueryCmd: none # not available
+Class2BUGCmd: AT+FBUG=0 # buggy in early firmwares
+Class2NFLOCmd: AT+FLO=0
+Class2SFLOCmd: AT+FLO=1
+Class2HFLOCmd: AT+FLO=2
+Class2HexNSF: false
+
+# Early firmwares reported ECM capability but then disabled it internally,
+# thus causing us to possibly attempt to send MMR data without ECM.
+# This disables ECM and MMR by replacing the +FDCC response.
+Class2DCCQueryCmd: "!(0-1),(0-5),(0-2),(0-2),(0-1),(0),(0),(0-7)"
+
+# If your line supports Caller-ID, you may want to uncomment this...
+# QualifyCID: etc/cid # you must create this file
+# ModemResetCmds: AT+VCID=1
+# CIDNumber: "NMBR="
+# CIDName: "NAME="
--- /dev/null
+# $Id$
+#
+# prototype config file for Mainpine Ltd. RockForceDUO+
+#
+
+#
+# CONFIG: CLASS2.1:"Agere Systems"-"Mainpine Venus V.92"*-*
+#
+# BEGIN-SERVER
+# END-SERVER
+#
+
+ModemType: Class2.1
+ModemRate: 57600 # for V.34 faxing
+ModemNoFlowCmd: AT&K0
+ModemSoftFlowCmd: AT&K4
+ModemHardFlowCmd: AT&K3
+ModemRecvFillOrder: MSB2LSB
+
+Class2APCmd: AT+FAP=1,1,1
+Class2BUGCmd: AT+FBU=0 # early firmware is buggy
+Class2SendRTC: yes
+Class2UseHex: yes
+
+# unfortunately, HylaFAX can't currently send or receive in color
+ModemAnswerCmd: AT+FCC=,,,,,,,,0;A
+ModemDialCmd: AT+FCC=,,,,,,,,0;DT%s
+
+# You may want to do something like this to enable CTC in ECM
+# Class2Cmd: AT+FCLASS=2.1;+FRY=4
+
+# If your line supports Caller-ID, you may want to uncomment this...
+# QualifyCID: etc/cid # you must create this file
+# ModemResetCmds: AT+VCID=1
+# CIDNumber: "NMBR="
+# CIDName: "NAME="
dist/newalpha \
dist/newversion \
config/Makefile.in \
+ config/agere-mp-2 \
+ config/agere-mp-21 \
config/att-dataport \
config/att-dataport-2 \
config/att-dataport-2.0 \
gotParams = parseClass2Capabilities(skipStatus(rbuf), dis);
break;
case AT_FNSF:
- recvNSF(NSF(skipStatus(rbuf)));
+ recvNSF(NSF(skipStatus(rbuf), conf.class2HexNSF));
break;
case AT_FCSI:
recvCSI(stripQuotes(skipStatus(rbuf)));
class2SendRTC = false; // default per Class 2 spec
class2RTFCC = false; // real-time fax comp. conv.
class2UseHex = false; // historical behavior
+ class2HexNSF = true; // most modems report NSF in hexadecimal
class2UseLineCount = false; // don't trust firmware decoders
class1ECMSupport = true; // support for ECM
class1ExtendedRes = true; // support for extended resolutions
class2ECMType = getECMType(value);
else if (streq(tag, "class2usehex"))
class2UseHex = getBoolean(value);
+ else if (streq(tag, "class2hexnsf"))
+ class2HexNSF = getBoolean(value);
else if (streq(tag, "class2uselinecount"))
class2UseLineCount = getBoolean(value);
else if (streq(tag, "class2rtfcc"))
fxStr class2PACmd; // cmd to set selective polling address
fxStr class2PWCmd; // cmd to set password for transmit/poll
bool class2UseHex; // parse capabilities strings as hex
+ bool class2HexNSF; // parse nsf strings as hex
bool class2UseLineCount; // use the firmware decoder's line count
FlowControl flowControl; // DTE-DCE flow control method
}
-NSF::NSF( const char* hexNSF )
+NSF::NSF( const char* hexNSF, bool useHex )
{
clear();
- loadHexData( hexNSF );
+ loadHexData( hexNSF, useHex );
decode();
}
stationIdDecoded = false;
}
-void NSF::loadHexData( const char* hexNSF )
+void NSF::loadHexData( const char* hexNSF, bool useHex )
{
hexNsf.append( hexNSF );
const char *p = hexNSF;
char *pNext = NULL;
for( ;; ){
- int val = strtol( p, &pNext, 16 );
+ int val = strtol( p, &pNext, (useHex ? 16 : 10) );
if( pNext == p )
break;
p = pNext;
+ if (p[0] != '\0') p++; // skip delimiter
nsf.append( (unsigned char)val );
}
}
bool stationIdDecoded;
public:
NSF();
- NSF( const char* hexNSF );
+ NSF( const char* hexNSF, bool useHex );
NSF( const u_char* rawData, int size, const u_char* revTab );
/*
* We are happy with default copy constructor and copy assignment,
const char* getStationId(){ return (const char*)stationId; }
private:
void clear();
- void loadHexData( const char* hexNSF );
+ void loadHexData( const char* hexNSF, bool useHex );
void loadRawData( const u_char* rawData, int size, const u_char* revTab );
void findStationId( bool reverseOrder, bool reverseBitOrder );
void decode();
Class2DISCmd string \s-1AT+FDIS\s+1 Class 2: command to set session parameters
Class2DDISCmd string \- Class 2: command to set session parameters before dialing
Class2ECMType string \s-1``2''\s+1 Class 2: ECM specification type to follow
+Class2HexNSF boolean \s-1Yes\s+1 Class 2: parse NSF strings as hex values
Class2HFLOCmd string \- Class 2: command to set hardware flow control
Class2LIDCmd string \s-1AT+FLID\s+1 Class 2: command to set local identifier string
Class2MINSPCmd string \s-1AT+FMINSP\s+1 Class 2: command to set minimum transmit speed
Class2DCCQueryCmd string \s-1AT+FCC=?\s+1 Class 2.0: command to query modem capabilities
Class2DISCmd string \s-1AT+FIS\s+1 Class 2.0: command to set session parameters
Class2ECMType string \s-1``2.0''\s+1 Class 2.0: ECM specification type to follow
+Class2HexNSF boolean \s-1Yes\s+1 Class 2.0: parse NSF strings as hex values
Class2HFLOCmd string \s-1AT+FLO=2\s+1 Class 2.0: command to set hardware flow control
Class2LIDCmd string \s-1AT+FLI\s+1 Class 2.0: command to set local identifier string
Class2MINSPCmd string \s-1AT+FMS\s+1 Class 2.0: command to set minimum transmit speed
configuration parameter allows the administrator to specify which type to
use. The corresponding specification type is used by default.
.TP
+.B Class2HexNSF
+Whether or not to parse the NSF strings reported by the modem
+using hexadecimal values. By default, they are parsed as hexadecimal values.
+.TP
.B Class2HFLOCmd
The command to setup hardware (\s-1RTS/CTS\s+1)
flow control between
f none @SPOOL@/config/class2.0=../@SRCDIR@/config/class2.0 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/config/class2.1=../@SRCDIR@/config/class2.1 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/config/skel=../@SRCDIR@/config/skel 0444 @SYSUID@ @SYSGID@
+f none @SPOOL@/config/agere-mp-2=../@SRCDIR@/config/agere-mp-2 0444 @SYSUID@ @SYSGID@
+f none @SPOOL@/config/agere-mp-21=../@SRCDIR@/config/agere-mp-21 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/config/att-dataport-2=../@SRCDIR@/config/att-dataport-2 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/config/att-dataport-2.0=../@SRCDIR@/config/att-dataport-2.0 0444 @SYSUID@ @SYSGID@
f none @SPOOL@/config/att-dataport=../@SRCDIR@/config/att-dataport 0444 @SYSUID@ @SYSGID@