Adafruit breakout board with Mifare Plus

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
JefKeijers
 
Posts: 4
Joined: Sat Jun 01, 2013 2:31 pm

Adafruit breakout board with Mifare Plus

Post by JefKeijers »

Hi,

Is it possible to read a Mifare Plus card with 7 byte UID with the Adafruit Breakout Board?

Sincerely,

Keijers Jef

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Adafruit breakout board with Mifare Plus

Post by ktownsend »

Yes, you can read 7 bytes UIDs.

You should be able to use these function specify the UID length as a parameter, though you'll need to do some poking around in the code yourself to modify things:

Code: Select all

/**************************************************************************/
/*! 
    Waits for an ISO14443A target to enter the field
    
    @param  cardBaudRate  Baud rate of the card
    @param  uid           Pointer to the array that will be populated
                          with the card's UID (up to 7 bytes)
    @param  uidLength     Pointer to the variable that will hold the
                          length of the card's UID.
    
    @returns 1 if everything executed properly, 0 for an error
*/
/**************************************************************************/
boolean Adafruit_NFCShield_I2C::readPassiveTargetID(uint8_t cardbaudrate, uint8_t * uid, uint8_t * uidLength)

Code: Select all

/**************************************************************************/
/*! 
    Tries to authenticate a block of memory on a MIFARE card using the
    INDATAEXCHANGE command.  See section 7.3.8 of the PN532 User Manual
    for more information on sending MIFARE and other commands.

    @param  uid           Pointer to a byte array containing the card UID
    @param  uidLen        The length (in bytes) of the card's UID (Should
                          be 4 for MIFARE Classic)
    @param  blockNumber   The block number to authenticate.  (0..63 for
                          1KB cards, and 0..255 for 4KB cards).
    @param  keyNumber     Which key type to use during authentication
                          (0 = MIFARE_CMD_AUTH_A, 1 = MIFARE_CMD_AUTH_B)
    @param  keyData       Pointer to a byte array containing the 6 byte
                          key value
    
    @returns 1 if everything executed properly, 0 for an error
*/
/**************************************************************************/
uint8_t Adafruit_NFCShield_I2C::mifareclassic_AuthenticateBlock (uint8_t * uid, uint8_t uidLen, uint32_t blockNumber, uint8_t keyNumber, uint8_t * keyData)
Snippets taken from here: https://github.com/adafruit/Adafruit_NF ... ld_I2C.cpp

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Adafruit breakout board with Mifare Plus

Post by ktownsend »

Ah, sorry. I missed the Mifare 'Plus'! I can't say, since we don't have any cards. The answer is almost certainly yes, but it's not currently support if it differs significantly from Mifare Classic or Mifare Ultralight, which is all we support at the moment since those are the easiest to source and most common cards in the wild.

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”