Skip to content

Reset RFID Code

steigeia edited this page May 10, 2017 · 2 revisions

Libraries

#include <AddicoreRFID.h>
#include <SPI.h>

All information about the libraries used can be found on the Libraries page.

Constants

These need to be the same constants as those from RFID_Lock_box in order for it to properly reset the RFID cards.

byte keyB[] = {0x01, 0x02, 0x05, 0x06, 0x09, 0x10};
const byte key_addr = 7;

Loop

This loop is a lot like the find_user and make_new_user states from RFID_Lock_Box whixh can be read about here. A key difference is that key B is used instead of Key A because the access bits require key B in order to change the sector trailer. If authoirzation works with key B than the RFID card was used for the system and the sector trailer must be reset to the standard sector trailer of a new card (std_sector_trailer) so that the system recognizes it as a new RFID card that can be made into a new user RFID card.

Clone this wiki locally