The magnetic stripe reader/encoder (MSRE) is a desktop device that reads and encodes magnetic stripe documents such as credit cards. The MSRE server provides functions to use the features of the IBM 4777 or 4717 MSRE devices. The IBM 4717 MSRE unit is supported on DOS and OS/2 systems only.
During the session, you will customize a simple LANDP workgroup consisting of a single workstation attached to a Magnetic Card Reader-Encoder(MSRE) device. You will be shown how to perform some basic magnetic card operations.
In this example we will be using an IBM 4777 MSRE device on a Windows NT platform. Please ensure you have an IBM 4777 MSRE device attached to your computer's first serial port (COM1).
In order for the LANDP MSRE server to communicate with the MSRE device, you need to install the appropriate driver software.
To install the IBM 4777 MSRE driver, do the following:
Platform | Windows NT/2000/XP | OS/2 | DOS |
Driver to download. | 47nt95dd/47NT95DD.EXE | 47os2dd/47OS2DD.EXE | 47dosdd/4777DD.EXE |
Driver files to copy | WNT77MAG.DLL WNT7XPDD.DLL |
FIO.MSG FIOH.MSG FIOSERDD.SYS MAGCALLS.DLL |
IBM4777.SYS |
Destination |
If you have a DOS or OS/2 workstation, you must also modify the CONFIG.SYS file with an entry for the MSRE device driver. See Preparing LANDP platforms on page 85 of the LANDP Installation and Customization manual for more information.
In this section the LANDP configuration files are written to specify a LANDP workstation that provides MSRE services. The steps required during customization are outlined below.
Read more about creating LANDP common definitions.
The table 'Vectors - a quick reference', on page 44 of the LANDP Installation and Customization manual, shows that LANDP does not need any common data for the MSRE47## server, but we do need to specify some SOFTPACK vectors for the SVPCPRB program.
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=EHCXLATE.DLL, |
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=SVPCPRBN.EXE, |
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=SVPCPRBN.HLP, |
A brief overview about creating LANDP workgroup definitions is available.
We will specify a single workstation providing MSRE services in a workgroup called "MSRE". We will also specify that the workstation will be used as a client for the MSRE device.
LANCONF  | NAME=MSRE, WSNAMES=(M1) |
LWSCONF | NAME=M1, TYPE=NT, SERVER=(MSRE47M1), PAR&MSRE=(4777,1), CLIENT=(MSRE47M1,M1), SOFTPACK=CONFTEST |
The COMMON.SPC and LANCONF.SPC must now be validated to ensure they have been entered correcly. A brief overview of the validation stage is available, as well as the VALSPEC utility on page 55 of the LANDP Installation and Customization manual.
C:\
CD C:\EHC\EHCCUS\
VALSPEC
COMMON
VALSPEC
LAN \MSRE
Once the configuration has been validated, the LANDP files to be installed on each workstation can now be generated and copied. This is the distribution stage.
GENRUN \MSRE
GETTING \MSRE WS=M1 C:\MSRE\
The LANDP files are now installed in the directory C:\MSRE\.
The final stage is to start the LANDP services on the workstations.
CD \MSRE
AUTOFBSS
The LANDP services should now have started. To view a list of the running LANDP services, type EHCINFO at the command prompt. You are now ready to begin using the LANDP MSRE support.
Testing of LANDP servers is done using the SVPCPRB program. For more information on the SVPCPRB program and it's capabilities, see page 107 of the LANDP Programming Guide.
Communication with LANDP services is done by sending CPRB messages. The first message we must send is an IN command to the LANDP Supervisor server.
If the CPRB message was recieved successfully, the Server Return Code shown in the Output panel should read "OK". If the return code is different, refer to the Problem Determination manual for more information.
Next we must open the MSRE for use by our client. This is done by sending an OP message to the MSRE server:
The next step is to arm the MSRE for reading. Send the following CPRB message:
The green light on the MSRE device should come on to indicate that you should swipe the card. Position the card reader so that the IBM logo is the right way up, and swipe the card from right to left with the magnetic stripe facing towards you. If the green light goes out, the read has been successful, otherwise the red light will come on and you should swipe the card again, or try a different card.
Once you have successfully swiped a card, you can read the data using the RD message as follows:
The result of the RD message will appear in the reply data area. Because the magnetic card stores numerical data, you should press the "Hex" button to the right of the SVPCPRB window to view the reply data area in a numerical format.
Once you have finished with the MSRE server, it is necessary to issue a CL command to it. This frees the server up for another client to access.
Writing to a magnetic card using the MSRE server is normally done using the WR command.
First ensure you have performed an IN command to the supervisor server and have opened the MSRE server using the OP command as shown above. Issue the WR command as shown below. Make sure that you press the "Hex" button to enter the data numerically.
The green light will flash on the MSRE, indicating that you should swipe a card for writing. Swipe the card in the same way as you did for reading it. If the write was successful, the green light will go out.
The data to be written to the card is in the request data area, and is the numbers 1,2 and 3. The 0B and 0F (11 and 15 in hexadecimal) on either side of the data are the Start of Message (SOM) and End Of Message (EOM) characters. The data is written to a single track (track 2) by default. For more information on encoding to magnetic cards, see page 203 of the LANDP Programming Reference.
When you have written to the card, you must send a CH message to check that the write has completed successfully. A return code of 0 indicates the write was performed successfully. A CH message is sent as follows:
To finish the write operation, you must send a CL message in the same way as before
The KL command is useful if you have armed the device for reading or writing and want to move to a different function without swiping the card. It effectively cancels the AR or WR function. A KL command is sent as follows:
The DV command of the MSRE server can be used to get and set the parameters of the MSRE device. Options such as the track encoding mode and what characters to use for the SOM and EOM can be set with this command. The use of the DV command to retrieve the MSRE device parameters is shown below. For more information on the use of DV, see page 209 of the LANDP Programming Reference manual.
When you have finished with LANDP and the MSRE server, close the MSRE using the CL command, and issue an EJ to the LANDP Supervisor as follows: