Interactive Serial Port Test (ISPT)

                                                    License

       The distribution bundle includes the Interactive Serial Port Test commtest.jar

       ispt is a tool which allows interactive text-based access to the serial
       port, however  unsupported and the source code is not provided.
       ispt allows control over RS-232 signals and events and access to various API
       features provided by javax.comm.  It can be  used to help validate comm port
       configuration and connections and send and also send and receive serial data.

       At this time the documentation is sparse, thus ispt will have to be learned
       through experimentation, although brief usage help is available.    After
       specifying which ports to access, the user may type '?' or 'h' at the prompt
       to get a list of valid commands.

       To invoke ispt you must include comm.jar and commtest.jar in the class path,
       and the library path must include a path to a directory containing
       libSolarisSerialParallel.so for Solaris systems,  or libLinuxSerialParallel.so for
       Linux systems.

       Example:

        export CLASSPATH=comm.jar:commtest.jar
        export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:lib
        $JAVA_HOME/bin/java -classpath ${classpath} ispt/ispt
  
               (note:  in the above example, ./lib should contain
                           libSolarisSerialParallel.so or
                           libLinuxSerialParallel.so).

        ispt will initially list all the known available ports (including those configured in
        portmap.properties if it is present).  The user must choose one or two
        of those ports.    ispt is capable of sending and receiving data
        on either one or two serial ports (the latter configuration facilitates
        loopback testing in which a null modem cable is connected between
        two ports on the same host).
        
        For single port mode, simply enter one item from the list of  ports (by number),
        and for dual port mode, specify two numbers from the list seperated by a comma
        (as indicated at the prompt).   The default port can be toggled by typing A <return>
        or B <return>.  Commands can be directed to the first one second user selected
        port by prefixing a command with A or B.  For example, 'B write 10' sends a
        sequence of 10 bytes out port B.  'A send "hello"'  would send the string "hello"
        out port A. 

         By default Auto-read mode is on, meaning that any time data is available
         on the one or two ports specified at the inital prompt, it will be displayed
         asynchronously.  If auto-read mode is switched off,  data must be explicitly
         read from a port with the 'read' command.  Examples:  'read 10', or
         'B read 100'.

        The following is an example of invoking and using ispt (user input is
        shown in red).

         $  ./ispt
         
Listing all known serial ports

  1. SessionIndependent_/dev/term/a
  2. SessionIndependent_/dev/term/b
  3. /dev/ecpp0
  4. Teller1_COM1
  5. Teller1_COM2
  6. Admin_COM1
  7. Admin_COM2
  8. Admin_COM3
  9. Admin_COM4


Enter port selection or RETURN to exit (<A>[,<B>]): 1

[Interactive Port Test for javax.comm]

A: SessionIndependent_/dev/term/a

Enter commands ( 'h' or '?' for help ):

Auto Read Mode Enabled

h

-------------------------------------------------------------------------
 A    - set default port to A
 B    - set default port to B
 /    - cancel I/O operation
 AUTO - toggle auto read mode
-------------------------------------------------------------------------
[<port>] write <n> [c*ontiguous]   - write n bytes to port
[<port>] send "<string>"                - send string to port (contiguous)
[<port>] read <n>                          - read n bytes from port
[<port>] dump [<n>]                     - hexdump [n] bytes from port
[<port>] timeout [ <n> | disable ]  - set/get timeout on port
[<port>] thresh  [ <n> | disable ]   - set/get receive threshold for port
[<port>] frame [ <n> | none  ]      - set/get framing byte on port
[<port>] avail                                 - display # of available bytes

[<port>] break <n>                       - send break of <n> milliseconds


[<port>] pins                                 - display state of handshake pins
[<port>] dtr [ on | off ]                  - set/get state of DTR pin on port
[<port>] rts [ on | off ]                  - set/get state of RTS pin on port
[<port>] dsr                                  - get state of DSR pin on port
[<port>] cts                                  - get state of CTS pin on port
[<port>] cd                                   - get state of CD  pin on port
[<port>] ri                                     - get state of RI  pin on port

[<port>] flow [ hw [ in | out ] ]      - set/get hardware flow ctl for port
[<port>] flow [ sw [ in | out ] ]      - set/get software flow ctl for port
[<port>] flow [ none ]                   - set/get flow control for port

[<port>] baud [<n>]                     - set/get baud rate on port
[<port>] ibuf [<n>]                       - set/get input buffer size for port
[<port>] obuf [<n>]                      - set/get output buffer size for port

[<port>] notify none                      - disable all notifications
[<port>] notify all                          - enable all notifications
[<port>] notify da < on | off >       - notify when data available
[<port>] notify fe < on | off >        - notify of framing errors
[<port>] notify cd < on | off >       - notify of cd changes
[<port>] notify bi < on | off >        - notify of break interrupt
[<port>] notify pe < on | off >       - notify of parity errors
[<port>] notify ri < on | off >         - notify of ring ind. changes
[<port>] notify be < on | off >       - notify of output buffer empty
[<port>] notify oe < on | off >       - notify of overrun errors
[<port>] notify cts < on | off >      - notify of cts changes
[<port>] notify dsr < on | off >       - notify of cd changes
-------------------------------------------------------------------------

Auto Read Mode Enabled

write 10
[A]  Wrote 10 bytes [one at a time]     "write 10"                  OK
[A]  EVENT Output buffer empty

dtr on
[A]  DTR <on>                           "dtr on"                    OK

baud 9600
[A]  Serial parameters: 9600,8,0,1      "baud 9600"                 OK


[A]  EVENT Received 16 bytes:
0000: 41 42 43 44 45 46 47 48  49 4a 4b 4c 4d 4e 4f 50  ABCDEFGHIJKLMNOP


[A]  EVENT Received 200 bytes:
0000: 41 42 43 44 45 46 47 48  49 4a 4b 4c 4d 4e 4f 50    ABCDEFGHIJKLMNOP
0010: 51 52 53 54 55 56 57 58  59 5a 41 42 43 44 45 46  QRSTUVWXYZABCDEF
0020: 47 48 49 4a 4b 4c 4d 4e   4f 50 51 52 53 54 55 56   GHIJKLMNOPQRSTUV
0030: 57 58 59 5a 41 42 43 44  45 46 47 48 49 4a 4b 4c   WXYZABCDEFGHIJKL
0040: 4d 4e 4f 50 51 52 53 54   55 56 57 58 59 5a 41 42  MNOPQRSTUVWXYZAB
0050: 43 44 45 46 47 48 49 4a  4b 4c 4d 4e 4f 50 51 52    CDEFGHIJKLMNOPQR
0060: 53 54 55 56 57 58 59 5a  41 42 43 44 45 46 47 48  STUVWXYZABCDEFGH
0070: 49 4a 4b 4c 4d 4e 4f 50    51 52 53 54 55 56 57 58  IJKLMNOPQRSTUVWX
0080: 59 5a 41 42 43 44 45 46  47 48 49 4a 4b 4c 4d 4e   YZABCDEFGHIJKLMN
0090: 4f 50 51 52 53 54 55 56   57 58 59 5a 41 42 43 44  OPQRSTUVWXYZABCD
00a0: 45 46 47 48 49 4a 4b 4c   4d 4e 4f 50 51 52 53 54   EFGHIJKLMNOPQRST
00b0: 55 56 57 58 59 5a 41 42  43 44 45 46 47 48 49 4a  UVWXYZABCDEFGHIJ
00c0: 4b 4c 4d 4e 4f 50 51 52    --  --  --  --  --  --  --  --       KLMNOPQR