• FAQ

  • Why does my Basic program not detect my card reader?

    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.

  • Even if using ComPort variable my card reader is not detected.

    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.

  • Can I copy my ..... smart card to your BasicCard?

    Answer:

    No!

  • Is the value of Rnd generated by a function or by the help of a hardware generator?

    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.

  • When should WTX be called in a BasicCard program?

    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.

  • How can I know when I need more time?

    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.

  • In the Calc.bas example program, what does "<=40" mean in "Command &H20 &H01 Calculator (S$ <= 40)"?

    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.

  • What is wrong with "ReDim A()"?

    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.

  • Can I delete variables from EEPROM at run-time, to save memory?

    Answer:

    No. String contents can be freed (e.g. S$ = "") but the 2-byte string pointer cannot.

  • Is memory defragmentation available in the BasicCard?

    Answer:

    No.

  • Aim: I want to be able to store text in the card EEPROM and to erase them later.

    Answer:

    Use the file system in the Enhanced BasicCard.

  • I get a compiler error when compiling the following source code:

    Des(-1,5,Enc$)

    Answer:

    Use the following call instead:

    Enc$ = Des(-1,5,Enc$)

  • The following code:

    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.

  • How can I create certificates without an appended &H80 byte?

    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:

  • Cannot write to card file opened in append mode.

    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.