<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Integrity error while trying to change key settings (PICC) for DESFire EV1 cards in TapLinx SDK, TagWriter and TagInfo</title>
    <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2017498#M73</link>
    <description>&lt;P&gt;When attempting to change PICC key settings on DESFire EV1 cards I get the following error: com.nxp.nfclib.exceptions.PICCException: Integrity Error SW2 = 30&lt;BR /&gt;at com.nxp.nfclib.desfire.DESFireUtil.invalidResponse(:229)&lt;BR /&gt;at com.nxp.nfclib.desfire.DESFireEV1.changeKeySettings(:879)&lt;/P&gt;&lt;P&gt;Here is a minimal example code causing this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;initNewCard&lt;/SPAN&gt;(IDESFireEV1 card) {&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Connecting to card reader"&lt;/SPAN&gt;);&lt;BR /&gt;    card.getReader().connect();&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Starting to init card with id %s, selecting app"&lt;/SPAN&gt;, Utilities.&lt;SPAN&gt;dumpBytes&lt;/SPAN&gt;(card.getUID()));&lt;BR /&gt;    card.selectApplication(&lt;SPAN&gt;0&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;    String status = card.getAuthStatus();&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Current auth status %s"&lt;/SPAN&gt;, status);&lt;BR /&gt;&lt;BR /&gt;    EV1PICCKeySettings keySettings = (EV1PICCKeySettings) card.getKeySettings();&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;BR /&gt;            &lt;SPAN&gt;"PICC settings: %s %s"&lt;/SPAN&gt;,&lt;BR /&gt;            String.&lt;SPAN&gt;valueOf&lt;/SPAN&gt;(keySettings.isPiccKeySettingsChangeable()),&lt;BR /&gt;            String.&lt;SPAN&gt;valueOf&lt;/SPAN&gt;(keySettings.isPiccMasterKeyChangeable())&lt;BR /&gt;    );&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Authenticating"&lt;/SPAN&gt;);&lt;BR /&gt;    default2KDESAuthenticate(card);&lt;BR /&gt;&lt;BR /&gt;    status = card.getAuthStatus();&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Current auth status %s"&lt;/SPAN&gt;, status);&lt;BR /&gt;&lt;BR /&gt;    card.changeKeySettings(makeInUsePICCKeySettings()); // this changeKeySettings() call causes the exception&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;private &lt;/SPAN&gt;EV1PICCKeySettings &lt;SPAN&gt;makeInUsePICCKeySettings&lt;/SPAN&gt;() {&lt;BR /&gt;    EV1PICCKeySettings.Builder builder = &lt;SPAN&gt;new &lt;/SPAN&gt;EV1PICCKeySettings.Builder();&lt;BR /&gt;    builder.setPiccKeySettingsChangeable(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;            .setPiccMasterKeyChangeable(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;            .setAuthenticationRequiredForApplicationManagement(&lt;SPAN&gt;false&lt;/SPAN&gt;)&lt;BR /&gt;            .setAuthenticationRequiredForDirectoryConfigurationData(&lt;SPAN&gt;false&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;builder.build();&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I would like to kindly ask for your help with this issue. I have tried formatting the cards and otherwise writing to them seems to work. Am I doing something wrong?&lt;/P&gt;&lt;P&gt;The relevant output is:&lt;BR /&gt;Connecting to card reader&lt;BR /&gt;Starting to init card with id 0x042A43B2EC6A80, selecting app&lt;BR /&gt;Current auth status Not Authenticated&lt;BR /&gt;PICC settings: true true&lt;BR /&gt;Authenticating&lt;BR /&gt;Current auth status Native&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 19 Dec 2024 23:35:55 GMT</pubDate>
    <dc:creator>voidazos</dc:creator>
    <dc:date>2024-12-19T23:35:55Z</dc:date>
    <item>
      <title>Integrity error while trying to change key settings (PICC) for DESFire EV1 cards</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2017498#M73</link>
      <description>&lt;P&gt;When attempting to change PICC key settings on DESFire EV1 cards I get the following error: com.nxp.nfclib.exceptions.PICCException: Integrity Error SW2 = 30&lt;BR /&gt;at com.nxp.nfclib.desfire.DESFireUtil.invalidResponse(:229)&lt;BR /&gt;at com.nxp.nfclib.desfire.DESFireEV1.changeKeySettings(:879)&lt;/P&gt;&lt;P&gt;Here is a minimal example code causing this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;initNewCard&lt;/SPAN&gt;(IDESFireEV1 card) {&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Connecting to card reader"&lt;/SPAN&gt;);&lt;BR /&gt;    card.getReader().connect();&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Starting to init card with id %s, selecting app"&lt;/SPAN&gt;, Utilities.&lt;SPAN&gt;dumpBytes&lt;/SPAN&gt;(card.getUID()));&lt;BR /&gt;    card.selectApplication(&lt;SPAN&gt;0&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;    String status = card.getAuthStatus();&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Current auth status %s"&lt;/SPAN&gt;, status);&lt;BR /&gt;&lt;BR /&gt;    EV1PICCKeySettings keySettings = (EV1PICCKeySettings) card.getKeySettings();&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;BR /&gt;            &lt;SPAN&gt;"PICC settings: %s %s"&lt;/SPAN&gt;,&lt;BR /&gt;            String.&lt;SPAN&gt;valueOf&lt;/SPAN&gt;(keySettings.isPiccKeySettingsChangeable()),&lt;BR /&gt;            String.&lt;SPAN&gt;valueOf&lt;/SPAN&gt;(keySettings.isPiccMasterKeyChangeable())&lt;BR /&gt;    );&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Authenticating"&lt;/SPAN&gt;);&lt;BR /&gt;    default2KDESAuthenticate(card);&lt;BR /&gt;&lt;BR /&gt;    status = card.getAuthStatus();&lt;BR /&gt;    &lt;SPAN&gt;log&lt;/SPAN&gt;(&lt;SPAN&gt;"Current auth status %s"&lt;/SPAN&gt;, status);&lt;BR /&gt;&lt;BR /&gt;    card.changeKeySettings(makeInUsePICCKeySettings()); // this changeKeySettings() call causes the exception&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;private &lt;/SPAN&gt;EV1PICCKeySettings &lt;SPAN&gt;makeInUsePICCKeySettings&lt;/SPAN&gt;() {&lt;BR /&gt;    EV1PICCKeySettings.Builder builder = &lt;SPAN&gt;new &lt;/SPAN&gt;EV1PICCKeySettings.Builder();&lt;BR /&gt;    builder.setPiccKeySettingsChangeable(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;            .setPiccMasterKeyChangeable(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;            .setAuthenticationRequiredForApplicationManagement(&lt;SPAN&gt;false&lt;/SPAN&gt;)&lt;BR /&gt;            .setAuthenticationRequiredForDirectoryConfigurationData(&lt;SPAN&gt;false&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;builder.build();&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I would like to kindly ask for your help with this issue. I have tried formatting the cards and otherwise writing to them seems to work. Am I doing something wrong?&lt;/P&gt;&lt;P&gt;The relevant output is:&lt;BR /&gt;Connecting to card reader&lt;BR /&gt;Starting to init card with id 0x042A43B2EC6A80, selecting app&lt;BR /&gt;Current auth status Not Authenticated&lt;BR /&gt;PICC settings: true true&lt;BR /&gt;Authenticating&lt;BR /&gt;Current auth status Native&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Dec 2024 23:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2017498#M73</guid>
      <dc:creator>voidazos</dc:creator>
      <dc:date>2024-12-19T23:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Integrity error while trying to change key settings (PICC) for DESFire EV1 cards</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2018382#M74</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/244825"&gt;@voidazos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, you need to select an existing application and file, and successfully authenticate it, and then you can use the command (changeKey) to modify the key, please try again.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 07:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2018382#M74</guid>
      <dc:creator>KaiLi</dc:creator>
      <dc:date>2024-12-23T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Integrity error while trying to change key settings (PICC) for DESFire EV1 cards</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2055749#M119</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;have you received the ats for the desfire card?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 20:24:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Integrity-error-while-trying-to-change-key-settings-PICC-for/m-p/2055749#M119</guid>
      <dc:creator>vincentthivent</dc:creator>
      <dc:date>2025-03-04T20:24:50Z</dc:date>
    </item>
  </channel>
</rss>

