Constructing a directory file entry in ‘C’ applications

  • This topic is empty.
  • Author
    Posts
  • #229
    Chris Torr
    Keymaster
    August 7, 2020

    When using SmartDeck, all applications have to be given an Application Identifier (AID) and should have a Directory entry (so you can see what is loaded on the card).

    Traditionally you have had to include code like this in your application

    #pragma attribute("aid", "f0000001") // The AID has to match the AID in tag 4F in the dir attribute
    #pragma attribute("dir", "61 10 4f 4 f0 00 00 01 50 8 65 6c 6f 79 61 6c 74 79") // "eloyalty"

    Getting the format of the TLV data correct in the “dir” attribute is not straightforward. To make things easier, with the latest version of SmartDeck you can now do this instead


    #pragma attribute("aid", "f0000001")
    #pragma attribute("name","eloyalty")

    This will construct the correct DIR entry automatically.

  • You must be logged in to reply to this topic.