Keyboard Mag Stripe Reader Utility

Home Forums Knowledge Base Other Modules Keyboard Mag Stripe Reader Utility

  • This topic has 0 replies, 1 voice, and was last updated 19 years ago by Rob.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1589
    Rob
    Member

    Keyboard Mag Stripe Reader Utility
    KBMSR.EXE  6.02

    Last edited: December 15, 2003 08:09 AM

    This utility is designed to run as a TouchPro shell, monitoring a keyboard for input of MSR swipe information, parsing track 1 and track 2 information, then returning that information to TouchPro in the appropriate variables.  It terminates upon receipt of swipe input or upon detection of touch.  KBMSR enhances the normal keyboard input capability of TouchPro and overcomes the 40 character limitation that exists currently.

    Download KBMSR
      Syntax

      KBMSR {/DEBUG}

                *              /Debug – Optional parameter to display the initial swipe and the resulting data returned to TouchPro.  Without it, there is no screen output.

    Implementation

      1. Unzip KBMSR into the Tools directory.
      2. Using EditPro, create a shell that runs KBMSR.  Check Preserve Screen, Store Variables, Swap to XMS/EMS/VMS, Initialize Mouse, and Get Variables.
      3. Write an instruction chain that calls the shell.  Here is a possible chain:

          Variable Index = 9    ;Index used for shell status result.
          Window = Swipe      ;Inform user to swipe card.
          Shell to KBMSR        ;Read the swipe.
          Close 1 Window

          If Index = 2              ;Screen touched or Escape key pushed.
          Stop – Ignore Rest
          End If

          If Index = 8              ;Bad swipe received.
          Window = BadSwipe
          Delay 2 Seconds
          Close 1 Window
          Stop – Ignore Rest
          End If

          If Index = 9              ;Shell has failed.
          Window = ShellErr
          Delay 2 Seconds
          Close 1 Window
          Stop – Ignore Rest
          End If

          ‘END’                      ;Successful swipe.
                                      ;Memo1 holds Track1
                                      ;TraPr:Track2 holds Track2

    Variable Usage

    Passed to KBMSR

        None

    Returned to TouchPro

        Memo1 – Track 1 contents
        TraPr:Track2 – Track 2 contents
        Index – Program termination result
                    0 – Successful swipe
                    2 – Screen Touched or Escape Key pressed
                    8 – Bad swipe

    Technical

    KBMSR starts by building a single string until it detects a carriage return(ASCII 13).  It then locates track 1 within that string by first locating the percent sign (%), then locating the first question mark (?) after that point.  Track 2 is located similarly except that the start locator is a semicolon ([color=black:3v4xtc2h];[/color:3v4xtc2h]).  If a question mark is not found, all characters to the end of the string are returned.  If data is contained on only one track, the other track will not return anything.  The starting characters, question marks, and carriage return are not returned.  If a track contains more than 40 characters, only the first 40 characters will be returned.  In summary, KBMSR can be used with any keyboard mag stripe reader as long as the following standards are followed:

        *      Track 1, if it exists, must start with a percent sign, and end with a question mark  or include all data after that point.
        *      Track 2, if it exists, must start with a semicolon, and end with a question mark or include all data after that point.
        *      A carriage return must be used to signal the termination of a swipe.

    Revisions

    4/30/99  6.01

        *      The starting characters where interfering with some styling chains where the data was sent to a numeric variable.  Since there are no known chains that require the starting characters, modified KBMSR to strip them off.

    6/18/99  6.02

        *      When data was read from only one track, KBMSR was returning the result in both variables.  Corrected it to leave the variable blank if the track was blank.  This helps in subsequent bad swipe error detection.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.