Show/Hide Toolbars

CardExchange Press Help

 
All data transfers between DESFire files and CardExchange Press is done through DESFire items. A DESFire item is considered to be a meaningful piece of data that is readily available in the database (in case of write items) or can be printed or stored in the database without further transformations (in the case of read items). DESFire items can combine data of several DESFire files into a single value, whereas multiple DESFire items can be stored in a single DESFire file. DESFire items can convert data back and forth between binary and other representations of the data, like ASCII text, integer values, binary coded decimals and hexadecimal strings. The possibility to define DESFire items makes the DESFire-definition wizard particularly flexible.

DESFire_Wizard_Page3

 

With the Add and Remove buttons DESFire items, indicated with the red rectangle, can be added and removed. There is no other limit with respect to the number of items you define than the amount of memory available on the DESFire chip.

Each item is characterized by an Item Name, which can be any text string that explains the meaning of the data.

The Item Type determines what data transformations are performed between the binary data in the DESFire files and the External Data mapped to the DESFire items. These are the available options, with an explanation of the data transformations in case the DESFire item is a write item:

Text

The input data is interpreted as ASCII encoded text and the ASCII values are stored in the DESFire file.

 

ABC becomes 41 42 43 00 00 00 00 …

Binary

The input data must be binary data and will be encoded as such in the DESFire file, without any data transformation.



Hexadecimal

The input data is interpreted as a hexadecimal string and can only contain the hexadecimal characters and spaces. The input data will be transformed to binary data byte per byte.

 

412143 becomes 41 42 43 00 00 00 00 …

Binary integer

The input data is an eight-byte integer (or smaller) that will be encoded in a binary fashion with the least significant byte first.

 

414243 becomes 23 52 06 00 00 00 00 …

Binary coded decimal

The input data in an eight-byte integer (or smaller) that will be encoded as BCD with the most significant digit first.

 

414243 becomes 41 42 43 00 00 00 00 …

ASCII coded decimal

The input data in an eight-byte integer (or smaller) that will be encoded as ASCII text with the most significant digit first.

 

414243 -> becomes 34 31 34 32 34 33 00 …

For all representations, the data is padded with zero bytes if the size of the data item is bigger than the amount of data presented. On the other hand, if more data is presented than what fits in the data item, the data is silently truncated. This will not cause any error message.  In general, CardExchange Press is very flexible with respect to discrepancies between the presented data and the item type. For example, if you present binary data to a data item, the data will be encoded as such, no matter whether you selected the binary item type or not. On the other hand, if you present text data to one of the integer item types, it will try to convert that text to an integer. Exceptions will only be thrown if CardExchange Press does not succeed in doing a silent conversion.

The size of the data item is specified by means of the length in bytes. Be aware that integers are limited to eight bytes in size, so for any data that exceeds this size, the data representation should be text, binary or hexadecimal.

The Processing options determine whether a DESFire item is a read or a write item. For write items, it is possible to perform a write verify to ensure that the data is really encoded onto the DESFire chip. It is possible that a single item is both a read and a write item. In that case the item is first read and then written.

There are a number of Advanced settings, whose availability depends on the chosen item type.

The option Hexadecimal input strings is only available for binary integers, binary coded decimals and ASCII coded decimals. If this option is selected, the input data will be considered as hexadecimal data instead of decimal data. So, if the presented data to a binary integer is for example 16, CardExchange Press will interpret this as the decimal value 22  and encode it as 16 00 00 00 …

Right align is available for all item types. When selected items will be preceded with zero bytes, rather than padded, to make the data fit in the item. For example, if the item size is 5, ‘ABC’ will be converted to 00 00 41 42 43.

Reverse bytes reverses the order of all bytes in a data item. For example, if the item size is 5 and right align is not selected, ‘ABC’ will be converted to 00 00 43 42 42.

If the selected item type is a binary or ASCII coded decimal, the option Trailer digits specifies what hexadecimal digits should be encoded after the actual data. For example, if the number 414243 is presented to a BCD-item and the Trailer digits are set to ‘FFF’, CardExchange Press will encode 41 42 43 FF F0 00 … In practice, binary or ASCII coded decimals should either have a fixed length, be right aligned or have a non-decimal trailer digit.

Click Next to proceed with the creation of the DESFire Definition and go to Step 4.