-20-
v7.0
Libelium’s library
With any configuration, the key A can never be read (the module returns 0’s instead of the key) for security reasons. As we can
see, the key A of each RFID/NFC card is the master key and we must avoid losing or sharing this information.
Any new card is delivered with the same A and B keys by default: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF. That is to say, 48 logic 1’s.
As shown, the key length is 6 bytes so t here are more than 2.8·10
14
different possible passwords.
Example of use:
{
uint8_t state; // stores the status of the executed command
uint8_t aux[16]; // auxiliar buffer
uint8_t UID[4]; // stores the UID (unique identification) of a card
uint8_t keyA_old[6]; // stores the old key A
uint8_t keyA_new[6]; // stores the new key A
uint8_t keyB_new[6]; // stores the new key B
uint8_t config_new[4] = {0xFF, 0x07, 0x80, 0x00}; // same cfg
...
memset(keyA_old, 0xFF, 6); // the key by default, edit if needed
memset(keyA_new, 0x88, 6); // the new key A, edit if needed
memset(keyB_new, 0x99, 6); // the new key B, edit if needed
state = RFID13.init(UID, aux); // inits systems and look for cards
state = RFID13.setKeys(UID, keyA_old, keyA_new, keyB_new, config_new, aux, 2); //
// authenticates block 2, then writes the new trailer block, with new key A
// and B. The access bits are the same.
}
http://www.libelium.com/development/waspmote/examples/RFID1356-05-password-simple
8.13. Powering down
This function puts the module into Power Down mode in order to save power consumption.
Example of use:
{
RFID.powerDown(); // After this function you must wake up the module.
}
8.14. Waking up
This function wakes up the module from power down mode.
Example of use:
{
RFID.wakeUp(); //Wake Up from Power Down mode.
}