emsec / ChameleonMini

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

Lost ability to store card data to FRAM in all releases after Jul 08, 2022 #325

Closed Heavy-Horses closed 1 year ago

Heavy-Horses commented 1 year ago

I've lost the ability to store card data to FRAM in all releases after Jul 08, 2022. I don't have this issue the June 29, 2022 release. All data except for setting data such as card type, button action led mode etc.. is lost after a power cycle.

fptrs commented 1 year ago

Thanks for the hint @Heavy-Horses. I already found the origin of this issue. Since PR #319 all memory is cleared when a new configuration is set:

void ConfigurationSetById(ConfigurationEnum Configuration, bool appInitRunOnce) {
[...]
/* Blank memory scape slate for the newly set configuration */
MemoryClear();

@maxieds can we revert this without affecting your code?

maxieds commented 1 year ago

@fptrs Sorry. I have been out sick for the last couple of weeks since moving to the desert. I still haven't setup my home machines, so I will be unable to test what the change does.

Some comments based on the code cited above and the corresponding memory code in the firmware: