Reputation: 29434
I have an Android app that programs MIFARE cards (changes encryption mode from DES to AES, creates apps, writes some data to those apps - that sort of thing).
I'm using the standard WriteData command which is supposed to have several parameters:
It works fine with I'm trying to write small chunks of data (i.e. the data gets written correctly, the NFC card that I use does not report any CRC calculation problems, etc, etc)
The problems start when I need to write larger chunks of data (so that the card responds with 0x91AF
, asking me to provide additional data frames). No matter how I calculate the CRC for a second data frame, the card always responds with 0x911E
(which is an Integrity Error, according to the documentation).
So here's what I tried:
0x917e
, which is a length error0xAF
) and a second piece of data, and I stopped adding metadata to the data frame. So the overall structure is now command byte + encrypted payload (which is a second data piece + CRC). The Length Error is gone, but the Integrity Error is raised0x3D
, but send the command with 0xAF
. Still the same errorI'm a bit at loss here since I can't find a simple example on how the data exchange between PICC and PCD is supposed to look like in case a sequence of bytes that does not fit into a single frame has to be written to a standard file. Does anyone have an idea of what might be wrong?
Upvotes: 0
Views: 101