The ChameleonMini is a versatile contactless smartcard emulator compliant to NFC. The ChameleonMini was developed by https://kasper-oswald.de. The device is available at https://shop.kasper.it. For further information see the Getting Started Page https://rawgit.com/emsec/ChameleonMini/master/Doc/Doxygen/html/_page__getting_started.html or the Wiki tab above.
Other
1.72k
stars
391
forks
source link
DESFire: Fix loading from flash when changing slots #330
After setting up a DESFire card in a slot (setting), it was not possible to switch to a different setting and then back. There was an error in the loading of the DESFire slot config (setting), which resulted in part of the data in the flash being overwritten by zeros.
This PR fixes that. It is now possible to switch to set up a DESFire card in a slot (setting), switch to a different one and then back. Everything seems to load correctly. This also fixes loading after reboot.
Another way of saying the above is that this PR fixes loading a DESFire card from flash to FRAM.
An example of what used to be broken but works now in terms of terminal commands:
SETTING=1CONFIG=MF_DESFIRE_4KEV1
(...) load something onto the card (...)
STORESETTING=2
(...) do stuff (...)
SETTING=1RECALL
now the DESFire card would not load correctly
After setting up a DESFire card in a slot (setting), it was not possible to switch to a different setting and then back. There was an error in the loading of the DESFire slot config (setting), which resulted in part of the data in the flash being overwritten by zeros.
This PR fixes that. It is now possible to switch to set up a DESFire card in a slot (setting), switch to a different one and then back. Everything seems to load correctly. This also fixes loading after reboot.
Another way of saying the above is that this PR fixes loading a DESFire card from flash to FRAM.
An example of what used to be broken but works now in terms of terminal commands:
SETTING=1
CONFIG=MF_DESFIRE_4KEV1
(...) load something onto the card (...)STORE
SETTING=2
(...) do stuff (...)SETTING=1
RECALL
now the DESFire card would not load correctly