Title: DebitCard Application with ZeitControl BasicCard
1DebitCard Application with ZeitControl BasicCard
- Selim GULLULU 504042001
- selim.gullulu_at_alcatel.com.tr
2Contents
- Memory Card vs. Smart Card (ZC BasicCard)
- BC Versions EnvironmentProgramming
- Hardware Software Definitions
- Demonstration - Card Personalisation
- Demonstration Food Automat
3Memory Card vs. Smart Card (ZC BasicCard)
- Memory CardsEEPROM Storage Only
- ZC BasicCard Microcontroller with RAM (for
operation), ROM (for holding BasicCard OS) and
EEPROM for holding your data and your program - ZC BasicCard The program executed by the
microcontroller has access to the data stored in
EEPROM, so the program decides which data is
exchanged with the outer world
4BasicCard Versions
5Communicating With Smart Card
6BasicCard Environment Programming
- No Keyboard or Screen ?
- Talks to outside world with bi-directional I/O
Contact at 9600 bps or more (ISO/IEC standards
7816-3 and 7816-4) - Define a command in the card and program it like
an ordinary Basic procedure - Call the command from a ZC-Basic program running
on the PC - Two-byte ID for each defined command (ISO/IEC
7816-4 CLA and INS for CLAss and INStruction
7Command Example
- Command In BasicCard
- Eeprom CustomerCredits
- Command H20 H02 GetCustomerCredits (Credits)
- Credits CustomerCredits
- End Command
- To call the command from PC
- Const swCommandOK H9000
- Declare Command H20 H02 GetCustomerCredits
(Credits) - Status GetCustomerCredits (Credits)
- If Status ltgt swCommandOK Then GoTo
CancelTransaction
8Defining EEPROM Variables
- Eeprom Balance As Long
- Eeprom MasterPIN As String6 "123456
- ...
9Technical Summary Of BasicCard(s)
- All BasicCard families (Compact,Enhanced,Pro,Multi
app) - A full implementation of the T1 block-level
communications protocol defined in ISO/IEC
7816-3 Electronic signals and transmission
protocols - A command dispatcher built around the structures
defined in ISO/IEC 7816-4 (CLA INS P1 P2
LcIDATA Le - Built-in commands for the execution of
ZeitControls P-code - Code for the automatic encyrption and decyption
of commands and responses,using AES, DES,or
SG-LFSR symmetric-key algorithm
10Technical Summary Of BasicCard(s) (Continued)
- Enhanced BasicCards contain all of the
above,plus - A directory-based, dos-like file system
- IEEE-compatible floating-point arithmetic
11Card Readers
- Whenever you access a BasicCard or a Card Reader
from a ZC-Basic Terminal Program, ZeitControls
P-Code Interpreter uses the current value of the
ComPort variable to determines where to look for
the Card Reader. - A ZC-Basic program compiled into an executable
file accepts the following values for the
ComPort - 1 lt ComPort lt 4 Physical Card Reader on serial
port COM1-COM4
12CyberMouse
13Search Card Reader (1)
14Search Card Reader (2)
15Search Card Reader (3)
Use API select Default Reader for Windows XP
16ZC BasicCard ActiveX Control Module
17BasicCard VB library
18Command Definitions Ex. Set Values (in PC)
19Command Definitions Ex Set Values (Contd) (in
PC)
Public Function PersonaliseCard(Amount As Long,
_ NewPIN As String, Name As
String) Dim tmp As String 4 tmp
NewPIN BasicCard.Param1 Amount BasicCard.Param2
tmp BasicCard.Param3 Name PersonaliseCard
BasicCard.Transaction(H80, H0, 3) Err
BasicCard.LastErr SW1SW2 BasicCard.SW1SW2
20Command Definitions Ex. Set Values (Contd) (
BC)
Command H80 H00 PersonaliseCard (Amount As
Long, NewPIN As String4, Name) Call
CheckAlgorithm() If GetKeyNumber_at_() ltgt 0 Then
SW1SW2 swIssuingKeyRequired Exit
Personalised False Balance Amount
CustomerName Name PIN NewPIN
Personalised True End Command
21Compiling the ZCBasic Code
22Downloading The Code To BasicCard
23Demonstration (Personalisation Food Automat)