



















                                    L E S

                              An IBM P.C. Based
                             RS-232 Asynchronous
                             Line Error Simulator





                                 Release 1.1

                              Revised 28-May-99










                         Dunfield Development Systems
                         ----------------------------
                            High quality tools for
                             Embedded Development
                                at low prices.

                           http://www.dunfield.com


                      Copyright 1990-2005 Dave Dunfield
                             All rights reserved



                             Line Error Simulator

                              TABLE OF CONTENTS


                                                                        Page

    1. INTRODUCTION                                                        1


    2. HARDWARE REQUIREMENTS                                               1

       2.1 IBM P.C. Serial ports                                           1

    3. USING LES                                                           3

       3.1 Begin Error Simulation                                          3
       3.2 Configure error types                                           3
       3.3 Configure serial ports                                          4
       3.4 Disk transfer functions                                         5
       3.5 Exit to DOS                                                     5
   Line Error Simulator                                             Page: 1


   1. INTRODUCTION

         LES is a program which intercepts the data being transmitted  over
      an asynchronous communications line, and simulates varying degrees of
      line quality by injecting errors.

         LES is an excellent tool  for  evaluating  the  performance  of  a
      transmission protocol in the face of line errors. Since the frequency
      and type of errors injected into the  data  stream  can  be  strictly
      controlled,  various  protocol  recovery  situations  can  be  easily
      created and reproduced.

   2. HARDWARE REQUIREMENTS

         The LES program runs on any IBM compatible personal computer, with
      two COMM ports.  A special "split"  cable must be constructed for use
      in most situations.

      2.1 IBM P.C. Serial ports

            The serial ports of the IBM P.C.  are RS-232 DTE configuration,
         and will be in either a 25 or 9 pin configuration.  The ports have
         the following pinout:

           Signal name                Origin   25-Pin(PC)  9-Pin(AT)
           ---------------------------------------------------------
           Transmit Data       (TXD)   DTE         2           3
           Receive Data        (RXD)   DCE         3           2
           Request To Send     (RTS)   DTE         4           7
           Clear To Send       (CTS)   DCE         5           8
           Data Set Ready      (DSR)   DCE         6           6
           Signal Ground       (GND)   ---         7           5
           Data Carrier Detect (DCD)   DCE         8           1
           Data Terminal Ready (DTR)   DTE        20           4
           Ring Indicator      (RI )   DCE        22           9
   Line Error Simulator                                             Page: 2


            To use LES you will have to construct  a  "split"  cable  which
         passes hardware control signals straight through,  but routes  the
         data streams through the P.C. where errors can be injected.

                 "Split"                                 "IBM PC"
          Line Monitor Connector                   COMM port connectors

                   (DTE)
               DB-25    Male                    /----- COM1 (DTE)
               | | | | | | |                   /
               +-+-+-+-+-+-+==================/
               |     | | | |
               +-+-+-+-+-+-+==================\
               | | | | | | |                   \
               DB-25  Female                    \----- COM2 (DCE)
                   (DCE)


       The signals must be connected as follows:

           DTE   DCE  Pin          Port    25-Pin(PC)  9-Pin(AT)
           -------------------------------------------------
           TXD         2   ----    COM1        3           2
           RXD         3   ----    COM1        2           3
                 TXD   2   ----    COM2        2           3
                 RXD   3   ----    COM2        3           2
           GND   GND   7   ----  COM1+COM2     7           5
   Line Error Simulator                                             Page: 3


   3. USING LES

         To set up LES,  connect the DTE side of the split cable  to  COM1,
      and the DCE side to COM2.

         Execute LES from the DOS command line,  and you  will  be  greeted
      with the following menu:

                   +-----------------------+
                   |Begin Error SImulation |
                   |Configure error types  |
                   |Configure serial ports |
                   |Disk transfer functions|
                   |Exit to DOS            |
                   +-----------------------+

         Each of the above options is described below:

      3.1 Begin Error Simulation

            This options causes LES to begin simulation the line errors.  A
         display is shown and updated in real time indicating the number of
         characters which have been processed from each of the DTE and  the
         DCE.

            Any programmed errors will be injected into  the  data  streams
         when the selected number of characters have been received.

            Press ESCAPE to terminate the simulation,  and  return  to  the
         main menu.

      3.2 Configure error types

            This options allows you to select one of 5 programmed errors to
         be setup.  Once you pick an error number,  you will be  asked  for
         "BOTH",  "DTE"  or  "DCE",  this allows you to decide  which  data
         stream the error will have effect on.

            If you select  "DTE",  the error will be injected only into the
         data stream from the DTE.

            If you select  "DCE",  the error will be injected only into the
         data stream from the DCE.

            If you select "BOTH", the error will be injected into whichever
         stream causes the "frequency" count to be exceeded (See below).

            You will then be prompted for the error type:

         3.2.1 Disabled

               This option prevents the error from occurring.  It  is  used
            for error numbers which you don't want to use.
   Line Error Simulator                                             Page: 4


         3.2.2 Drop char

               Causes one character to be  dropped  from  the  data  stream
            whenever the "frequency" count expires (See below).

         3.2.3 Replace char

               Prompts for a character value  (in hex),  which will replace
            one character from the data stream whenever the frequency count
            expires.

         3.2.4 Flip bits

               Prompts for a bit mask  (in hex),  which will  be  exclusive
            OR'ed into one character from  the  data  stream  whenever  the
            frequency count expires.

            Once you have picked the error type,  you will be prompted  for
         the "Frequency", which is a decimal number from 0 to 65535.

            For every character that is  received,  the  "frequency  count"
         values for any errors which apply to that data stream (DTE, DCE or
         BOTH)  are incremented.  When the frequency count for a particular
         error occurs,  the error is "triggered" and injected into the data
         stream.

            When an error is  "triggered",  the frequency count  is  reset,
         causing it to wait and retrigger when enough characters have again
         been received from the data stream.

            By using the five available errors wisely,  you can simulate  a
         wide range of error conditions and "hit rates".

      3.3 Configure serial ports

            This function allows you to set the speed and  data  format  of
         the COMM port. In order for LES to correctly pass data between the
         devices, these parameters must be set up the same as the devices.

            Sub menus are provided  for  all  of  the  data  communications
         parameters.

            Press ESCAPE at any time to exit each menu level, and return to
         the next higher menu.
   Line Error Simulator                                             Page: 5


      3.4 Disk transfer functions

            This function provides you with a sub-menu, which allows you to
         load/save the LES configuration:

                   +--------------------+
                   | Load Configuration |
                   | Save Configuration |
                   +--------------------+

            Once you select a transfer operation,  you will be prompted for
         a file name. The following special keys may be used:

           Left arrow      - Move to left
           Right arrow     - Move to right
           Home            - Move to beginning of name
           End             - Move to end of name
           PgUp            - Clear entire field
           PgDn            - Clear from cursor to end of field
           ESC             - Cancel and return to higher menu
           ENTER           - Accept filename & perform operation

      3.5 Exit to DOS

            This options terminates LES,  and returns to  the  DOS  command
         prompt.
