Advanced Server Configuration: Modems that Lie about their Capabilities

Modems that Lie about their Capabilities for HylaFAX.

Class 2 and 2.0 fax modems all too frequently have bugs in their firmware. Sometimes it is possible to workaround firmware problems by restricting a modems’ capabilities. To do this the Class2DCCQueryCmd configuration parameter may be set in the per-modem configuration file. By default this parameter holds the command to send the modem to query its capabilities. However if the query string has a leading “! then no command is sent to the modem and instead the remainder of the string is treated as the response returned by the modem. Thus to avoid using a particular modem capability all you need to do is setup a capabilities string that has a restricted set of modem capabilities.

Capabilities are returned using a syntax specified in the Class 2/2.0 specification:

(vr),(br),(wd),(ln),(df),(ec),(bf),(st)

where,

vr
indicates which vertical resolutions are supported,
br
indicates which signaling rates are supported,
wd
indicates which page widths are supported,
ln
indicates which page lengths are supported,
df
indicates which data formats are supported,
ec
indicates whether or not the optional Error Correction Mode (ECM) is supported,
bf
indicates whether or not the optional Binary File Transfer (BFT) protocol is supported, and
st
indicates which minimum scan times are supported.

Each parameter is specified as single value, range of values (e.g. 0-3), or list of values (e.g. 0,1,2). The values are given in the Class 2/2.0 specification and in the following table (note that this table does not list values defined in the latest ITU T.class2 specification):

Param Value Description Param Value Description
vr 0 98 lines/inch df 0 1-D Modified Huffman
1 196 lines/inch 1 2-D Modified Huffman
br 0 2400 bits/sec 2 2-D Uncompressed Mode
1 4800 bits/sec 3 2-D Modified Modified Read
2 7200 bits/sec ec 0 disable ECM
3 9600 bits/sec 1 enable T.30 Annex A, ECM
4 12200 bits/sec 2 enable T.30 Annex C, half duplex
5 14400 bits/sec 3 enable T.30 Annex C, full duplex
wd 0 1728 pixels in 215 mm bf 0 disable file transfer modes
1 2048 pixels in 255 mm 1 select BFT, T.434
2 2432 pixels in 303 mm st 0 scan time/line: 0 ms/0 ms
3 1216 pixels in 151 mm 1 scan time/line: 5 ms/5 ms
4 864 pixels in 107 mm 2 scan time/line: 10 ms/5 ms
ln 0 A4, 297 mm 3 scan time/line: 10 ms/10 ms
1 B4, 364 mm 4 scan time/line: 20 ms/10 ms
2 unlimited length 5 scan time/line: 20 ms/20 ms
6 scan time/line: 40 ms/20 ms
7 scan time/line: 40 ms/40 ms

An example use of this mechanism is found in the prototype configuration file for the AT&T DataPort modem. The rev C01.66.10 firmware for the DataPort returns an invalid string for the AT+FDCC=? query command so the prototype configuration file supplies a valid one instead:

Class2DCCQueryCmd:     "!(0,1),(0-5),(0-4),(0-2),(0),(0),(0),(0-7)"

Beware of specifying that a modem has capabilities that it does not; HylaFAX is likely to try and make use of them!