- Development Kit User Guide
- Setup, Samples and Tools
- Running the Samples
- Running the reference_apps Samples
- Transit Sample
- Running the Transit Sample from the Command Line
Running the Transit Sample from the Command Line
The TransitDemo or TransitDemo.bat script automatically starts and stops cref when needed to simulate interaction sessions with the POS terminal and the turnstile transit terminal.
- Open a Command Prompt window and perform the following:
- Navigate to the
JC_HOME_SIMULATOR\bindirectory. - Start the simulator by using the following command at the command prompt:
cref -o transitCard
- Navigate to the
- Open a second Command Prompt window and perform the following:
- Set
ANT_HOME(path to ant install folder),JC_HOME_TOOLSandJC_HOME_SIMULATOR(path to JCDK install folder) as environment variables. - Navigate to the
JC_HOME_SIMULATOR\samples\reference_apps\Transit\Transit\appletdirectory. - Enter the following command at the command prompt:
ant allIn this sample's
appletdirectory, theantallcommand generates the APDU script and downloads the CAP file.
- Set
- In the
crefCommand Prompt window, restart the simulator by using the following command:cref -i transitCard -o transitCardStarting the simulator with the
-itransitCard-otransitCardoptions and filenames causes the simulator to use the contents of thetransitCardfile to initialize the EEPROM and to save the EEPROM contents to a file namedtransitCard. - In the applet Command Prompt window, perform the following:
- Navigate to the
JC_HOME_SIMULATOR\samples\reference_apps\Transit\Transit\clientdirectory. - Enter the following command at the command prompt:
ant run1In this sample's
clientdirectory, theantrun1 command compiles and builds theclient.jarand generates theactual_output1.txtfile.
- Navigate to the
- Verify that the contents of the
actual_output1.txtfile are the same as the contents of theTransitClient_1.expected.outputfile.Because the terminal uses random number generation for challenge/response and for generating session key, the contents of theactual_output1.txtfile varies from theTransitClient_1.expected.outputfile for the following instructions:-
CLA:80 INS:30 -
CLA:80 INS:40
-
- In the
crefCommand Prompt window, restart the simulator by using the following command:cref -i transitCard -o transitCard - In the applet Command Prompt window, enter the following command at the command prompt:
ant run2In this sample's
clientdirectory, theantrun2 command compiles and builds theclient.jarand generates theactual_output2.txtfile. - Verify that the contents of the
actual_output2.txtfile are the same as the contents of theTransitClient_2.expected.outputfile.Because the terminal uses random number generation for challenge/response and for generating session key, the contents of theactual_output2.txtfile varies from theTransitClient_2.expected.outputfile for the following instructions:-
CLA:80 INS:30 -
CLA:80 INS:40
-
- In the
crefCommand Prompt window, restart the simulator by using the following command:cref -i transitCard -o transitCard - In the applet Command Prompt window, enter the following command at the command prompt:
ant run3In this sample's
clientdirectory, theantrun3 command compiles and builds theclient.jarand generates theactual_output3.txtfile. - Verify that the contents of the
actual_output3.txtfile are the same as the contents of theTransitClient_3.expected.outputfile.Because the terminal uses random number generation for challenge/response and for generating session key, the contents of theactual_output3.txtfile varies from theTransitClient_3.expected.outputfile for the following instructions:-
CLA:80 INS:30 -
CLA:80 INS:40
-
- In the
crefCommand Prompt window, restart the simulator by using the following command:cref -i transitCard -o transitCard - In the applet Command Prompt window, enter the following command at the command prompt:
ant run4In this sample's
clientdirectory, theantrun4 command compiles and builds theclient.jarand generates theactual_output4.txtfile - Verify that the contents of the
actual_output4.txtfile are the same as the contents of theTransitClient_4.expected.outputfile.Because the terminal uses random number generation for challenge/response and for generating session key, the contents of theactual_output4.txtfile varies from theTransitClient_4.expected.outputfile for the following instructions:-
CLA:80 INS:30 -
CLA:80 INS:40
-