Tester is a NT based test program to run tests over multiple comm ports and the same time for many cycles. It can act as a terminal program, data/ppp tester, and fax tester.
To specify the communications port for the test it is currently necessary to use the command line parameters outlined below. To start the test, the user should click on the '!' button and this will start the test. All output to the terminal screen is logged to a file of the format LOGnnn.txt where nnn is the comm port number.
The program can also use a test command file. The test command file is like an INI file with sections and key-value pairs. Anything that can be done on the command line can be done in a test file. See the Test file section below to see an example file.
The data test currently dials the given phone number (if dialing) and connects and tries a PPP negotiation, performs a BERT test or does a test that was used for an On Star customer. In the PPP test, once it is done negotiating it will attempt to ping an IP address (fixed at this point). In the BERT test, once it connects it will send bidirectional/unidirectional data and look for mismatches. In the On Star Test, one side echoes characters back and the other side sends data and waits for response. This was to test round trip timings.
The fax test now sends or receives multiple pages. On receive however you must specify the number of pages it will receive with the -g option. The page sent is whatever is in the file "testfax.fax". That data is just raw G3 data with no header. When a page is received it is stored in "recvfax.fax". This is also just raw G3 data with no header.
Note: when waiting for a call, it will only wait for 60 seconds before timing out and ending the test. Any call received after that time will not be answered. To reset it, just close the test window and click the '!' button again.
The terminal mode is accessed either by using the -t Term option on the command line or by clicking the "Term" button on the toolbar when the main test window is front most. If the -x telnet command line option was selected when starting the program, the port dialog brought up will ask for IP address and port number, if not, the serial dialog will be brought up. If you start from the command line, there is no way to set the baud rate (at this time) for a serial terminal window (the default is 19200).
Using it in redirect mode allows the serial port to be controlled remotely (or on the same computer) by another process. The preferred method now is to use the Ruby programming language and libraries that allow this to happen. See the section on the Ruby Redirect Library for more information.
| Switch | Long Switch Name | Description - defaults in bold |
| -atc | attest-command | The AT-command string to use during an ATTEST. Default: AT |
| -bit | bit-aligned-eols | This sets the +FREL flag to zero if set. Default: 1 |
| -bf | binary-file-transfer | This is the value used for the binary file transfer parameter of the +FDCC option on a fax. Default: 0 |
| -c | close-port | if this is set, then the port is closed and re-opened between cycles. Default: false. NOTE: this doesn't really work. |
| -C | direct-connect | if this is set, then the dial up test (PPP, BERT or OnStar) is performed as if the connection is a direct connect (no dial is performed). Default: false. |
| -cdcs | check-dcs | if this is set, the negotiated settings are tested against the input settings to see if the negotiation was done correctly. Default: false. |
| -cf | compare-files | if set, then received fax files are compared either against the first file received or the a reference file if the reference-file options is set. Default: false. |
| -cfx | check-receive-fax | if set, then the received fax files are checked for the correct number of fill bits and for correct EOL alignment. Default: false. |
| -cft | check-fax-time | if set, then this checks the amount of time it takes to receive a fax at the negotiated baud rate. Default: false). |
| -ct | call-type | This indicates the type of call. The possible values = originate, answer, answerATA, or answerRING. Answer and AnswerRING are the same. If phone-num is not set then originate doesn't dial but does an ATD. (Default: originate. |
| -d | debug | This turns on +FBUG=1 during a fax test (Default = false). |
| -D n | inter_test-delay | This is causes the tests to wait n milliseconds between cycles. Default: 0 |
| -df | data-compression | This is the value used for the data compression parameter for the +FDCC option on a fax. 0 == MH, 1, == MR, 2 == MMR. Error-Correction should be on for MMR to be selected. Default: 0 |
| -didc | DID-capable | This is the master switch for all DID options. If this is false then all of the DID options are ignored. Default: false. |
| -diden | DID-expected-number | This is the number expected by on the DID incoming call. (Useful for DID capable modems). Default: nothing. |
| -diddf | DID-digit-format | This is the format of the digits that are transmitted to indicate the called extension. (Values == DTMF | Pulse | MF) |
| -didm | DID-mode | This is the mode that the did line is configured as. (Values == Wink | Immediate | Delay-Dial ) |
| -didrf | DID-reporting-format | This is how the DID digits are reported to the DTE. ( Values == DID: | DTMFn | RING: ) |
| -didnd | DID-number-digits | This is how many digits are in the extension portion of the DID phone number. Default: 3. |
| -dir d | direction | On BERT tests this sets the direction of the data. If d is both then data is transfered bidirectionally. If d is send, then data is sent only. If d is recv then data is only received. |
| -e n | ending-port | Ending Comm Port number (n == 1 means Com1). NOTE: not really needed anymore. Use starting-port instead. You can specify a comma delimited range in starting-port. Default: what ever starting port is. |
| -ec | error-correction | This is the value used for the error correction parameter of the +FDCC option on a fax. Note that in fax class 2 mode, 1 means 64 byte frames, and 2 means 256 byte frames. In fax class 2.0/2.1 mode, 1 means 256 byte frames. Default: 0 |
| -embr | expected-modem-baud-rate | This is to check for the correctly negotiated page length in fax class 2, and 2.x modes. See page-length option for possible values. Value of -1 means don't check. Default: -1 |
| -epl | expected-page-length | This is to check for the correctly negotiated page length in fax class 2, and 2.x modes. See page-length option for possible values. Value of -1 means don't check. Default: -1 |
| -epw | expected-page-width | This is to check for the correctly negotiated page width in fax class 2, and 2.x modes. See page-width option for possible values. Value of -1 means don't check. Default: -1 |
| -evr | expected-vertical-resolution | This is to check for the correctly negotiated vertical resolution in fax class 2, 2.x modes. See vertical-resolution for possible values. Value of -1 means don't check. Default: -1 |
| -f | free-running-test | Make tests run unsynchronized so that one test could be on cycle 5 and another on cycle 10. Tests run in lock step by default so that they wait at the beginning of the cycle for all other tests to get to the same point. Default: false. |
| -F | data-file | Set the data file to use. (Fax Only for now - and only used when sending faxes). (Default == testfax.fax). |
| -fc | fax-class | The class of fax that is set. This sets the +FCLASS command to this value. Valid values depend upon the modem being used. Possible values include (1 | 1.0 | 2 | 2.0 | 2.1). |
| -fid | fax-ID | This sets the value of the local Fax ID. Default: "123456789" |
| -fcid | fax-compare-ID | This sets the value of the Fax ID to compare to. Default: "123456789" |
| -fns | fns-string | This sets the +FNS command to its value. Default: nothing |
| -fnsr | fns-string-rx | This is what the received +FNS response is compared to. Default: nothing |
| -g n | num-pages | Number of pages to send or receive. Default: 1. |
| -i IP Address | ip-address | This sets the IP address to telnet to if -x telnet option is set. Default: nothing. |
| -ie | end-init-string | This initialization string that is sent after the program's initialization. Default: nothing. |
| -is | start-init-string | This initialization string that is sent before the program's initialization. Default: nothing. |
| -jc | jpeg-coding | This sets the last parameter of the +FDCC command to its value. Default: 0. |
| -k n | ok-timeout | Timeout to wait for OK after sending DLE-ETX when sending a fax page. Default: 30. |
| -l | timed-log | Set the type of log to create. Values can be either timed-line, which has a time stamp at the beginning of every carriage return delimited line, timed-char, which has a time stamp at the beginning of every line which consists of only one character, or raw, in which the data is written out as hex values surrounded by square brackets (eg. [A3]) with no time stamps and 16 values per line. |
| -ln | page-length | This is the value used for the page length parameter of the +FDCC option on a fax. Default: 2 (this is unlimited length). |
| -m type | modem-type | Set the modem type (type == m[ulti[-]tech] | l[ucent] | r[ockwell] | c[sm] | o[ldLucent]). Default: multi-tech (this means legacy modems - < 28.8) |
| -mb | modem-baud-rate | Set the baud rate to use (only for fax for now) = 2400 | 4800 | ... | 28800 | all. All setting forces all baud rates to be rotated through on subsequent cycles. Default: 14400. |
| -minsb | min-serial-baud-rate | Set the minimum baud rate to use in the attest test-type. Values = 300 | 1200 | 2400 | 9600 | 19200 | 38400 | 57600 | 115200 | 230000. |
| -maxsb | max-serial-baud-rate | Set the maximum baud rate to use in the attest test-type. Values = 300 | 1200 | 2400 | 9600 | 19200 | 38400 | 57600 | 115200 | 230000. |
| -n n | num-cycles | Number of cycles to run |
| -nw | no-extra-waits | If this is set, then there are no extra waits at the end of tests. The tests normally pause at the end of them for 5 seconds to allow any extra data from the test to be displayed. Default: false. |
| -o | originate | The same as setting call-type to originate. |
| -p number | phone-num | Phone number to dial. Default: nothing. |
| -P | pause-at-cycle-end | Causes a dialog to be displayed at the end of each cycle and the next cycle does not continue until the user clicks "yes". Default: false. |
| -q | copy-quality | If this is true, then copy quality checking is enabled during fax reception. |
| -r | reverse-bit-order | Reverse the bit order of faxes that are sent or received. If true, then the +FBO or +FBOR command is set to 1 and the data is reverse before being sent to the modem if sending a fax or reversed after being received from the modem if receiving a fax. If false, then the data is not modified to/from the modem. |
| -rf | reference-file | This selects the file that the received fax file is compared against if compare-files is turned on. Default: nothing. |
| -s n | starting-port | Starting Comm Port number. This can now also contain a list of ports or ranges separated by commas. (eg. 1,5-9). In that case ending-port should not be used. |
| -sb baudrate[:DPSF] | serial-baud-rate | Sets the comm port to baud rate baudrate. If the second part is included, the number of data bits is set to D, the parity is set to P, the number of stop bits is set to S, and the flow control is set to H. Where P is either N for no parity, E for even parity, O for odd parity, S for space parity and M for mark parity. Where H is H for hardware flow control, S for software flow control and N for no flow control. Default: 19200:8N1 |
| -smd | semicolon-dial | If this is set, then the dial is done by first issuing a ATDT followed by the phone number and then a semi-colon. After the OK is received from that command, then an ATD is issued. The reason for this is to assist in getting accurate connection handshake times. Default: false. |
| -so | stay-online-until-time | If this is set, then the modem will stay online until the total-test-time timer expires, even after all the required blocks have been sent. BERT test only. Default: false. |
| -ss | speaker-setting | This sets the modem's M parameter to its value. The value of 0 means the speaker is always off, 1 means the speaker is on until connection and 2 means that the speaker is always on. |
| -st | scan-time | This is the value used the scan line time parameter of the +FDCC option on a fax. Default: 0. |
| -std | staggered-dial | If this is set, then dials are done 0 to 10 seconds after it becomes time to dial. This prevents problems due to lack of available dial tones. Default: false. |
| -t test_type | test-type | Type of test to run (data, fax, term). Default: nothing. |
| -T test_num or -tl test_num |
test-num or test-list | Sets the number of the test for fax test variations. This can now also contain a list of test numbers or ranges separated by commas (1-5, 9-15). Default: nothing. |
| -taok | time-after-ok | The number of milliseconds to wait after getting the OK, before sending the next AT command during an ATTEST. Default: 0 |
| -tb | total-blocks-to-send | This is the total number of blocks to send in the bert test. If the total-test-time is expires before the total blocks are sent then the modem is disconnected then. BERT test only. |
| -ts | text-size | Sets the font size for test terminal window. Default: 12. |
| -tt | total-test-time | This is the total amount of time for the BERT test. Default is infinite. |
| -vr | vertical-resolution | This is the value used for the vertical resolution parameter of the +FDCC option on a fax. |
| -w | U-law | Enable a-law digital coding (this is no longer looked at) |
| -wd | page-width | This is the value used for the page width parameter of the +FDCC option on a fax. |
| -wfr | wait-forever-on-receive | If this is set, then the test will wait forever for a call to come in. |
| -wfd | wait-for-debug | Turns on debugging for tester's wait for facility. Useful to see what is going wrong when a test does not run correctly. Default: false. |
| -wt | wait-time-after-connect | This is the amount of time to wait after a connect before passing data in the BERT test |
| -x type | port-type | Set the port type (telnet or serial) |
The test file has a global section and a section for each port where global settings are overridden for a particular port. The port sections are named [n] where n is the number of the port. The key values are the long or short switch names. Below is an example test file. Comments can be inserted by starting the line with a semi-colon. Switches that have no parameters should be set to true to turn them on or false to turn them off (see commented out direct-connect) option below.
[Global]
test-type = BERT
starting-port = 1-2
baud-rate = 115200:8N1H
;direct-connect = true
[1]
call-type = originate
phone-num = 5713
direction = send
[2]
call-type = answer
direction = recv
[Global]
test-type = Fax
starting-port = 1-2
fax-class = 2.1
num-cycles = 10
num-pages = 2
modem-baud-rate = 28800
error-correction = 1
data-file = owl.fax
compare-files = true
reference-file = owl.fax
[1]
call-type = originate
phone-num = 5713
[2]
call-type = answer
[Global]
test-type = attest
starting-port = 1
num-cycles=1000
min-serial-baud-rate=300
max-serial-baud-rate=115200
| Filename | Description |
| testfax0.fax | This is a two blank 1728 width line file |
| testfax1.fax | This is a 500 blank 1728 width line file |
| testfax5.fax | A full standard length 1728 width file (all 5's) |
| owl.fax | A beautiful owl |
The terminal mode supports function keys (F1 - F12). The contents of the key have a particular syntax (stolen from dumb). Below is a table of how to encode various sequences of characters. Anything not preceded by a backslash is encoded as is.
| Special Character | Description |
| \\ | This is a backslash character |
| \r | This is a carriage return character (decimal 13, hex 0d) |
| \n | This is a line feed character (decimal 10, hex 0a) |
| \t | This is a tab character (decimal 9, hex 09) |
| \xNN | This encodes a character defined by the two following hex characters NN |
| \#NN | This says to encode the next character NN times where NN is a hex value. |
| \h NN NN NN ... ; | This signals that following the \h will be hex values that will be encoded up to the semi-colon. |
Sample Function Keys
| Function Key String | What is actually sent |
| AT\r | AT and a carriage return |
| \x41\x54\x0d | AT and a carriage return |
| \h 41 54 0d | AT and a carriage return |
| AT\#05I\r | ATIIIII and a carriage return |
| \h 080305;Hello\x32 | A packet that has a header of (command 08, sub-command 03, length 5) followed by the data "Hello" and a checksum of 32. |
| Regular Expressions | |
| OK | /\r\nOK\r\n/ |
| CONNECT | /\r\nCONNECT\r\n/ |
| X4_CONNECT | /\r\nCONNECT (\d+) (\w+)\r\n/ |
| ERROR | /\r\nERROR\r\n/ |
| OK_ERROR | /\r\n(OK|ERROR)\r\n/ |
| Send Data | |
| ETX | "\x03" |
| DLE | "\x10" |
| XON | "\x11" |
| DC2 | "\x12" |
| XOFF | "\x13" |