VhlCfg / File / LegicApplicationSegmentList Value

General information about Legic VHL definition:
A Legic VHL description consists of one or more so-called fragments. Each fragment represents a certain data area on a Legic card. It can be a whole segment or only a part of it.
A fragment is described by a segment information (this value), by its length LegicLengthList and by the starting address within the desired segment LegicAddressList. Optionally a CRC checksum may be verified for every fragment ( LegicCRCAddressList ) and a certain segment type may be specified ( LegicSegmentTypeList ).

The configuration value LegicApplicationSegmentList is a list of one or more segment descriptions. Every entry corresponds to a certain fragment and specifies which Legic segment has to be accessed by VHL.

This value is mandatory for a Legic VHL fragment definition.

Every entry in the list consists of two components: The first byte specifies how the segment shall be accessed by the reader (SegmentIdentification). The following bytes specify the required segment identification attributes. Depending on the selected value of SegmentIdentification they will be interpreted as segment ID or stamp respectively.

Sample
"ProtocolHeaderAddressMode 1 1": address segment 1 in Protocol Header mode
"AdvantAddressMode 1 3": address segment 3 in Advant Address Mode
"StampSearch 3 0x12 0x23 0x45": address segment with stamp "12 34 56" in Protocol Header mode
"AdvantAddressMode|StampSearch 3 0x12 0x23 0x45": address segment with stamp "12 34 56" in Advant Address mode

Properties

Format

Name Type/Size Description
- Array (until end of frame) -
SegmentIdAndAdr Bit mask (8 bits)

This byte defines how a Legic segment shall be accessed.

There are two possibilities to select a certain segment on a Legic card:

  • ID: The reader selects the segment with the desired number.
  • Stamp: The reader selects the first segment that matches the desired stamp.

If possible always stamp search should be used for segment identification to guarantee that only genuine cards are processed!

Legic advant compatible readers support two addressing modes:

  • Protocol Header: Stamp data (read-only) can be accessed starting with address 18 (data below address 18 is undefined). Application data follows directly after the stamp.
  • Advant: Application data stored in S_DATA can be accessed starting with address 0. Stamp data is not accessible in this case.

AdvantAddressMode Boolean (bit 0x80) Use Advant address mode. If this bit is not set Protocol Header address mode will be applied.
RFU Integer (bit mask area 0x7E) Zero padding
StampSearch Boolean (bit 0x01) Use Stamp search to identify the desired segment. If this bit is not set the segment will be identified by ID.
Length of SegmentInformation Integer (8 bits) Length of SegmentInformation in byte
SegmentInformation ASCII string Segment ID (length: 1) or Stamp (length: 1...12) depending on the value of SegmentIdAndAdr