VHL.Select

This command selects a card or tag in the antenna field for further operations. You need to run it successfully before you can use the following VHL commands:

Handling multiple cards in the antenna field

Using the Reselect parameter, you can interact with a card that you've already processed before (learn more in the Parameters section below).

Certain cards return random IDs. If 2 or more cards with random IDs AND the same card family are present in the antenna field at the same time, VHL.Select detects these cards more than once.

Potential error cases after selection

After running VHL.Select successfully, the above commands will usually be executed successfully, even if the card temporarily leaves the antenna field. Communication parameters such as bit rate and frame size are automatically chosen to optimize performance.

However, problems with certain cards (e.g. MIFARE proX/DESFire) may occur when they're in the border area of the antenna field and brought in very slowly. In these cases, VHL.Select may be executed successful, but the subsequent command may fail.

In this case, make sure your application guarantees a suitable card distance, either by user guidance or by repetition of the VHL.IsSelected command until its success. This is especially important in conjunction with the VHL.ExchangeAPDU command since it doesn't perform retries internally.

Properties

Parameters (request frame)

Name Type/Size Description
CardFamiliesFilter Bit mask (16 bits)

Selects the physical HF protocols that the reader will scan for cards. VHLSelect scans for the specified card families in a round-robin algorithm, i.e. the more card families you specify, the more time is needed to run a complete scan loop.

Not all card types support all VHL commands. For details, see our overview of supported commands.
RFU Integer (bit mask area 0xF000) Zero padding
LEGICPrime Boolean (bit 0x0800) -
BluetoothMce Boolean (bit 0x0400) -
Khz125Part2 Boolean (bit 0x0200) Scans for the following 125kHz cards: SecuraKey, G-Prox, Indala ASP+, Cotag, Idteck. To scan only for a part of this list, set the configuration value ScanCardTypesPart2 accordingly. To scan for other 125kHz card types, set the Khz125Part1 flag.
Srix Boolean (bit 0x0100) -
Khz125Part1 Boolean (bit 0x0080) Scans for the following 125kHz cards: EM4205, EM4305, EM4100, EM4102, EM4450, Pyramid, HID prox, HID ioProx, HID Prox32, Keri, Quadrakey, Indala, AWID, HITAG 1 and S, HITAG 2, TTF (Tag talks first). To scan only for a part of this list, set the configuration value ScanCardTypesPart1 accordingly. To scan for other 125kHz card types, set the Khz125Part2 flag.
Felica Boolean (bit 0x0040) -
IClass Boolean (bit 0x0020) Scans for iCLASS and iCLASS SR cards. This flag does not include iCLASS SE or iCLASS Seos. To scan for these card types, set the Iso14443A flag.
IClassIso14B Boolean (bit 0x0010) Can be used instead of iCLASS to increase scanning speed. (Its transport layer protocol is based on the faster ISO 14443 Type B protocol instead of the ISO-15693-like protocol of iCLASS ). Not all iCLASS cards support ISO 14443 Type B. Thus, we recommend you use the iCLASS flag for maximum compatibility and the IClassIso14B flag for maximum speed. When in doubt, please check the specification of the cards used in your project.
Iso14443B Boolean (bit 0x0008) -
Iso15693 Boolean (bit 0x0004) Scans for ISO-15693-compatible cards, e.g. EM4033, EM4035, NXP ICODE, or LEGIC advant ISO 15693.
RFU Integer (bit 0x0002) Zero padding
Iso14443A Boolean (bit 0x0001) Scans for ISO 14443 Type A compatible cards, e.g. MIFARE Classic, MIFARE Plus, MIFARE DESFire, NXP SmartMX, or Legic advant ISO 14443.
Reselect Boolean (8 bits)

If false, the reader will deselect the current card and select the next one in the field. Cards you've already selected before will be ignored. Once you've run through all the cards in the field, you'll get a VHL.ErrNoTag status code. Cards will be reselected again when they're removed from the antenna field and then enter it again.

If true, the reader will "forget" which cards it has already selected since the last execution of VHL.Select and will start all over with the first card. This means that the same card is reselected over and over again, while other cards in the field are ignored.

To avoid this and start reselection only when all cards in the field have been selected once, set Reselect to false until you get a VHL.ErrNoTag status. Then set Reselect to true.
AcceptConfCard Boolean (8 bits) If true, the reader will scan every detected card and check if it's a BALTECH ConfigCard before returning from VHL.Select. Once the reader has found a ConfigCard, it will do the following:
  • Return the error code VHL.ConfcardRead
  • Transfer the configuration stored on the ConfigCard to its own configuration
  • Reboot to activate the new configuration

Returned values (response frame)

Name Type/Size Description
SelectedCardType Enumeration (8 bits)

The type of the selected card. Since there are no reliable identification standards amongst card manufacturers, we use a heuristic that examines the UID, its length, and other information as documented here.

Due to the lack of standards, we cannot guarantee the card type is always identified correctly.

Values:
  • Default (0x00)
    See description above
  • MifareClassic (0x10)
    MIFARE Classic (1k and 4k variants)
  • Iso14443aGeneric (0x11)
    Generic ISO 14443-4 Type A without ISO 7816-4 support
  • Iso14443aInterIndustry (0x12)
    ISO 14443-4 Type A compliant with ISO7816-4 and MIFARE L3
  • MifareUltraLight (0x13)
    MIFARE Ultralight
  • MifareDesfire (0x14)
    MIFARE DESFire (2k, 4k, and 8k variants)
  • InfineonSle55 (0x15)
    Infineon my-d proximity (SLE55)
  • Iso14443aIntIndustryMif (0x16)
    ISO 14443 Type A (NXP SmartMX/inter-industry)
  • MifarePlusL2 (0x17)
    MIFARE Plus L2 (2k and 4k variants)
  • LEGICAdvantIso14443a (0x18)
    LEGIC advant ISO 14443 Type A
  • MifarePlusL3 (0x19)
    MIFARE Plus L3
  • LEGICPrimeLegacy (0x20)
    LEGIC prime; this is a legacy value - it has been replaced by LEGICPrime .
  • LEGICAdvantLegacy (0x21)
    LEGIC advant (ISO 14443 Type A/ISO 15693); this is a legacy value - it has been replaced by LEGICAdvantIso14443a and LEGICAdvantIso15693.
  • Iso15693 (0x30)
    ISO-15693-compliant label
  • LEGICAdvantIso15693 (0x32)
    LEGIC advant ISO 15693
  • Iso14443bUnknown (0x40)
    ISO 14443-4 Type B without ISO 7816-4 support
  • Iso14443bIntIndustry (0x41)
    ISO 14443-4 Type B with ISO 7816-4 support
  • IClassIso14B (0x42)
    iCLASS via standard-compliant ISO 14443 Type B protocol (Level 3 compatible)
  • IClassIso14B2 (0x50)
    iCLASS via proprietary ISO 14443 Type B protocol derivate (Level 2 compatible)
  • IClass (0x60)
    iCLASS via ISO 15693
  • Felica (0x70)
    FeliCa
  • EM4205 (0x80)
    EM 4205/EM 4305
  • EM4100 (0x81)
    EM 4100/EM 4102
  • EM4450 (0x83)
    EM 4450
  • Pyramid (0x84)
    HID Pyramid
  • HidProx32 (0x85)
    HID Prox32
  • Keri (0x86)
    Keri
  • Quadrakey (0x87)
    QuadraKey
  • HidIndala (0x88)
    HID Indala ASP
  • HidAwid (0x89)
    AWID
  • HidProx (0x8A)
    HID Proximity
  • HidIoprox (0x8B)
    ioProx
  • Hitag1S (0x8C)
    HITAG 1 or S
  • Hitag2M (0x8D)
    HITAG 2 Manchester
  • Hitag2B (0x8E)
    HITAG 2 Biphase
  • TTF (0x8F)
    Low-level card type/programmable decoder
  • STSRIX (0x90)
    ST SRIX
  • SecuraKey (0xA0)
    SecuraKey
  • GProx (0xA1)
    G-Prox
  • HidIndalaSecure (0xA2)
    HID Indala ASP+
  • Cotag (0xA3)
    Cotag
  • Idteck (0xA4)
    IDTECK
  • BluetoothMce (0xB0)
    Bluetooth MCE; Mobile Card Emulation over Bluetooth
  • LEGICPrime (0xC0)
    LEGIC prime
  • HidSio (0xE0)
    Abstract card type for reading SIO Elements