Rockwell Diagnostics, (c) 2000-2001 Stanislav V. Mekhanoshin

What's this
-----------

This program is used to decode Rockwell modem diagnostics you can get as a
result of AT&V2 or AT%S1 (for IDC) command. If you ever seen strange symbols
like this:

BEGINaa14ab14ac14ad14ba47bb44bc48bd44cc242END

then this program is for you.

S1 was tested with the modem IDC-2814BXL/VR. Since Rockwell often change the
specification for the statistics and also because there are enough bugs in
Rockwell DSPs as well as in the different firmware from various companies,
something may work improperly. Sorry -- we have to accept this. In any way you
could send the problem statistics to me. If it is possible I'll fix the
program then.

System Requirements
-------------------

There three different builds provided:

1. s1d2.exe - dual-exe for DOS & OS/2 16-bit. Works with the following
operating systems:

DOS             - as DOS application
W9x             - as DOS application
OS/2            - as OS2 application
WNT/W2K         - as OS2 application

2. s1dw.exe - dual-exe for DOS 16-bit & WIN32 Console. Works with the
following operating systems:

DOS             - as DOS application
W9x/WNT/W2k     - as Windows console application

3. s1w.exe - WIN32 GUI. Works with the following operating systems:

W9x/WNT/W2k     - as Windows GUI application

This version also requires comctl32.dll version 4.70 or higher (Internet
Explorer 3.0 or later).

This version is also a COM-server to decode the statistics.

4. s1lnx-i386   - Linux-i386 application (statically built).

License Agreement
-----------------

This is Freeware software distributed "AS IS". Feel free to use and distribute
the software and do it on Your own risk.

There is no warranty of any kind, either expressed or implied, including but
not limited to the implied warranties of merchantability and/or fitness for a
particular purpose. The copyright owner is not liable for damages of any kind.
By using this software, you agree to this.

Usage
-----

s1 [+prefix | -prefix string | -noprefix]
   [-clipview | -noclipview]
   [<stream | file]

Stream - s1 works only with piped standard input. That's because I don't
believe somebody will type statistics from TTY. The method of piping can be any
supported by Your shell (not only with '<'). For example You could use the
following command:

  type diag.txt|s1

Windows GUI version doesn't work with stdin since there is no stdin there.

File - get statistics from file if specified.

Win32 versions can also process system clipboard if neither stdin (for
console) is redirected nor file is specified.

Windows GUI version is also able to load statistic files at any time after
loading or reanalyze clipboard. Statistic files can be opened from menu or
with drag-n-drop. To read the clipboard use either menu , F5 key or just paste
the statistics to the s1w window from clipboard.

Prefix - prefix which will be printed before any line. That can be useful, for
example, when redirecting the output of program to the mailer log file for
identification purposes. That's optional parameter.

Prefix `DIAG' for example can be specified as +DIAG or as -prefix DIAG.

Qualifier -noprefix is used to suppress the default prefix if specified in
ini-file (s1w only).

Qualifiers -clipview and -noclipview respectively used to set s1w as clipboard
viewer. The last one suppresses the default value from ini-file.

What is clipboard viewer? That's not too complicated -- program will
automatically catch the clipboard changes and reanalyze statistics. You can
enable this mode either with key -clipview, from menu, with F3 key or by
clicking on the status bar pane, indicating its state.

Ini-file with default values should reside in the same directory as s1w.exe
(this ini only supported by the Win32/GUI version) and should has the same
name as executable. I.e. s1w.ini. For example:

============ s1w.ini ==============
[default]
ClipboardViewer=1
OpenFileName=c:\temp\stat.log
Prefix=DIAG
============== end ================

This will set default values:

-clipview -prefix DIAG c:\temp\stat.log

S1w will never create ini-file by itself and doesn't require it.


S1 reads data from the input stream until will find the string "BEGIN".
Everything after is considered to be statistics. Analyze will be finished with
the token "END" or at the end of the input stream.

One can also use s1 with lnterm (line terminal) utility which has an ability
to redirect its stdin/stdout. For example you can use following command:

  echo AT&V2|lnterm|s1>stat.log

I'm personally using BinkleyTerm and collects the statistics with the special
cmd-file after session. Statistics is appended to the mailer log file. I'll
show this cmd-file as an example. Note that I'm using 4NT -- not the standard
cmd.exe from NT:

-------------------------------- mdm_stat.cmd --------------------------------
@echo off
echo writing Binkley.log...
echo AT%=&V2|c:\mail\lnterm com:1 baud:115200 rx-timeout:20|c:\mail\s1 "++ %@replace[ ,0,%@format[2,%_day]] %@word[%@dec[%_month],Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec] %_time.00 DIAG">>c:\mail\log\Binkley.Log
------------------------------------ eof -------------------------------------

This will append to the Binkley.log something like this:

--------------------------------- Binkley.log --------------------------------
+ 17 Jun 17:00:37.00 DIAG Rockwell Diagnostics/W32, version 1.0.1.1, compiled at Jun 17 2000 14:31:58
+ 17 Jun 17:00:37.00 DIAG (c) 2000 Stanislav V. Mekhanoshin (rampitec@tu.spb.ru, 2:5030/172.9@fidonet)
+ 17 Jun 17:00:37.00 DIAG ----------------------------------------------------------------------------
+ 17 Jun 17:00:37.00 DIAG Connection time                    : 00:01:54
+ 17 Jun 17:00:37.00 DIAG TX Rate (Last/Init/Min/Max)        : 24000/26400/21600/26400
+ 17 Jun 17:00:37.00 DIAG RX Rate (Last/Init/Min/Max)        : 19200/21600/19200/21600
+ 17 Jun 17:00:37.00 DIAG Modulation/Protocol/Compression    : V.34/LAP-M/V.42bis
+ 17 Jun 17:00:37.00 DIAG TX Symbol rate                     : 3200
+ 17 Jun 17:00:37.00 DIAG TX/RX carrier frequency, Hz        : 1920/1829
+ 17 Jun 17:00:37.00 DIAG Signal Level (TX/Power Drop), -dB  : 9/0
+ 17 Jun 17:00:37.00 DIAG RX Signal Level (Last/Min/Max), -dB: 25/25/25
+ 17 Jun 17:00:37.00 DIAG Band Edge Lower/Upper, Hz          : 150/3675
+ 17 Jun 17:00:37.00 DIAG Round trip delay, ms               : 0.063
+ 17 Jun 17:00:37.00 DIAG EQM Value (Last/Min/Max/Negative)  : 21/16/72/0
+ 17 Jun 17:00:37.00 DIAG EQM Samples Running Sum            : 012D
+ 17 Jun 17:00:37.00 DIAG EQM Last 10 Readings               : 28 24 23 27 28 26 19 33 47 37
+ 17 Jun 17:00:37.00 DIAG SNR Ratio (Last/Min/Max), dB       : 39/39/39
+ 17 Jun 17:00:37.00 DIAG TX/RX Non-linear Encoding          : ON/ON
+ 17 Jun 17:00:37.00 DIAG TX/RX precoding                    : OFF/ON
+ 17 Jun 17:00:37.00 DIAG TX/RX shaping                      : OFF/ON
+ 17 Jun 17:00:37.00 DIAG TX Trellis encoder                 : 64 state
+ 17 Jun 17:00:37.00 DIAG TX Pre-emphasis                    : 5
+ 17 Jun 17:00:37.00 DIAG TX/RX state (Max TX/RX, Last TX/RX): 87H/85H, 87H/67H
+ 17 Jun 17:00:37.00 DIAG Dual PCM/120 Hz detection          : Yes/No
+ 17 Jun 17:00:37.00 DIAG Retrains (Issued/Granted/Fast)     : 0/0/0
+ 17 Jun 17:00:37.00 DIAG Renegs (Issued/Granted)            : 3/3
+ 17 Jun 17:00:37.00 DIAG Retrans per frame/Frames rejected  : 2/28
+ 17 Jun 17:00:37.00 DIAG Last retrain reason                : Remote initiated a reneg
+ 17 Jun 17:00:37.00 DIAG Disconnect reason                  : LOCAL REQUEST
+ 17 Jun 17:00:37.00 DIAG Remote supports symbol rate (1,2,5): 2743:ON 2800:ON 3429:ON 3429-TX:ON
+ 17 Jun 17:00:37.00 DIAG Remote supports symbol rate (3,4)  : 3000-L:ON 3000-H:ON 3200-L:ON 3200-H:ON
+ 17 Jun 17:00:37.00 DIAG Remote power drop support          : ON
+ 17 Jun 17:00:37.00 DIAG Remote max symbol rate difference  : 0 steps
+ 17 Jun 17:00:37.00 DIAG Remote is a CME modem              : No
+ 17 Jun 17:00:37.00 DIAG Remote supports V.34bis            : Yes
+ 17 Jun 17:00:37.00 DIAG Remote frequency source            : Internal
------------------------------------ eof -------------------------------------

COM-server usage
----------------

You can use s1w.exe as a COM-server. You have to  register  the  program
first do do this. Please run `s1w.exe  /RegServer'  or  instw32.bat.  To
uninstall the registration later please run `s1w.exe /UnregServer'.

There are samples how to use the server on VBScript, JavaScript  (inside
html) and C++. They are located in devel/sample directory. In the  devel
directory there are files needed to build the C/C++ code.

For C/C++ include the files s1w_i.c and  s1w.h.  You  have  to  use  the
IS1Diag interface which has to properties:

 BSTR S1Diag(BSTR Response) - used to decode the %S1 statistics.

 BSTR Prefix                - hold the prefix to  use  before  the  each
                              diagnostics line (same as the command line
                              switch prefix).

Acknowledgments
---------------

 - Mike Telis for the informational support.

 - Yuri V. Bondarenko for the informational support and testing.

Where to get the fresh versions
-------------------------------

One can get the fresh versions in the internet at my homepage:
http://www.geocities.com/rampitec/index.htm?modem
or at Inpro site:
ftp://ftp.inpro.us.com/utils/
FIDO users can get it via fileecho XHRDIDC.

How to reach the author
-----------------------

mail-to: rampitec@tu.spb.ru
FIDO:    2:5030/172.9@fidonet.org
WWW:     http://www.geocities.com/rampitec/index.htm
