FAQ
Answer:
You must specify how your card reader is connected by use of predefined ComPort variable or by set ZCPort inside your autoexec.bat. See manual for more information about this.
Answer:
Development
software does support ZeitControl Chip-X and
CyberMouse card reader. To use a different card
reader you must install PC/SC drivers for this
reader. Without PC/SC driver you cannot use other
card readers.
Note: To use PC/SC reader ComPort btw. ZCPort
must be set to 100 or above.
Answer:
No!
Answer:
The card has no hardware generator. Every BasicCard contains a unique manufacturing number which cannot be read from outside the card. The Rnd function uses this number to generate random numbers.
Answer:
At the start of a command. BWT is reset (to 1.6 sec in a Compact BasicCard, 12.8 sec in an Enhanced BasicCard) every time a command is issued. But you can override these reset values with a #BWT statement.
Answer:
The simplest way is to experiment! If you think a command may need more than 1 second, you can call "WTX 5". It can't do any harm.
Answer:
The length of S$ must be <= 40 (otherwise the BasicCard operating system returns an error code in SW1-SW2). See "3.12 Procedure Definition", sub-section "3.12.3 Command". This syntax is useful for limiting the size of the stack in Compact BasicCard programs.
Answer:
Empty bounds specifiers are not allowed in ReDim statements (see "3.6 Arrays"). Older versions of the compiler failed to handle this syntax error correctly.
Answer:
No. String contents can be freed (e.g. S$ = "") but the 2-byte string pointer cannot.
Answer:
No.
Answer:
Use the file system in the Enhanced BasicCard.
Des(-1,5,Enc$)
Answer:
Use the following call instead:
Enc$ = Des(-1,5,Enc$)
S$ = Des (1,5,S$)
S$ = Des (-1,5,S$)
should restore S$ to its original value. Why doesn't it?
Answer:
The string parameter used in a Des function call must always be 8 bytes long. If the string is longer than 8 bytes, only the first 8 bytes are encrypted/decrypted. So the above example will only work if S$ was 8 bytes long to start with.
Answer:
The following Basic code will do it:
Function
Cert$(DesType, Key$, Data$)
Private C As String*8 ' Certificate is
' assembled here
Private D As String*8 ' Data is copied
' here for Xor
' operation
REM Long data types are most efficient
REM for Xor operation
Private CL As Long At C, CR As Long At C+4
Private DL As Long At D, DR As Long At D+4
Private I: For I=1 To Len(Data$) Step 8
D=Mid$(Data$, I, 8) ' Zero-pads the last block
CL=CL Xor DL : CR=CR Xor DR ' Fastest possible
' Xor
C=Des(DesType, Key$, C) ' Yes, this works!
Next I
Cert$=C
End Function
Known problems and fixes:
Fix:
Fixed in version 2.62.
Known Problems with certain PC/SC readers
The PC/SC
specification is relatively new, and some
PC/SC-compatible readers have drivers that are
less than perfect. Here we describe problems we
have encountered running the BasicCard and
development tools with different PC/SC readers.
If there is a problem not described here you
should always try to use an updated driver first.
Note: The mention of a specific operating system
in this list is not meant to imply that the
following problems are restricted to that
operating system.
Manufacturer: SCM
Microsystems
Reader: SwapSmart PC/SC
Device driver: PSCR.VXD
Version: 1.26
Operating system: Windows 95
Used smclib version: 4.00.951
Problems:
1. WTX handling
If the chip card sends a WTX request, the driver
always waits for the requested time before
returning to the caller, even if the card
responds earlier.
2. Driver crash
The SwapSmart driver crashes when the Suspend
function is invoked on some laptops.
3. BWT timeout value
The driver appears to augment the BWT timeout
value by 25%.
4. Retry after BWT timeout
The driver resends a command (twice) after
detecting a BWT timeout. This means that the
calling program only regains control after the
timeout period has expired three times over.
Also, time-out behaviour is completely
unpredictable, because if the card responds while
the driver is re-sending, the driver doesn't see
the response (whereas if the card takes a little
longer, the driver does see it). This behaviour
is compatible with the relevant ISO and PC/SC
standard documents, but that doesn't mean that it
makes sense.
Manufacturer:
Utimaco Safeware AG
Reader: CardMan
Device driver: ???
Version: 1.50
Operating system: Windows NT 4.0
Used smclib version: 5.00
Problems:
1. BWT timeout
BWT requested by the ATR is ignored. 1.6 seconds
(default value) is used instead. This leads to
problems with the Enhanced BasicCard, which uses
a longer BWT.
Manufacturer:
Utimaco Safeware AG
Reader: CardMan
Device driver: SCCMN40M.SYS
Version: 2.00
Operating system: Windows NT 4.0
Used smclib version: 5.00
Problems:
1. Communication error running calc example.
Unknown problem when running Calc example on
Enhanced BasicCard.
Fixed version from Utimaco available.