Topic: Mifare Classic 1K Emulator

Hi,

Iam looking for a piece of code which allows me to emulate together with the libNFC + ACR122 an entire 1K Mifare Classic tag. If I have to do that work by my own I will start with the tag emulation example code from the manual ...

http://www.libnfc.org/api/nfc-emulate_8c-source.html

Starting in line 126 we are listen to reader requests and send, depending on the number of bits our tag response. If we will receive i.e. a request for block 0x04 using key A, why is it not possible to send an answer which will be read out of a previously  generated plaintext file ?

Iam new in the RFID business, so dont blame me to much wink

Re: Mifare Classic 1K Emulator

Hello,

nicnoc wrote:

Iam looking for a piece of code which allows me to emulate together with the libNFC + ACR122 an entire 1K Mifare Classic tag. If I have to do that work by my own I will start with the tag emulation example code from the manual ...

There is no more work than nfc-emulate in libnfc but you must know that you can't "correctly" emulate Mifare Classic using ACR122 due to timing issue. The easier device to do this seems to be the Snapper, ATM

nicnoc wrote:

Starting in line 126 we are listen to reader requests and send, depending on the number of bits our tag response. If we will receive i.e. a request for block 0x04 using key A, why is it not possible to send an answer which will be read out of a previously  generated plaintext file ?

AFAIK, it's not a "possibility" problem, nfc-emulate is just a "proof of concept"... an experimental example but a good start for people who want to do more.

Many people are looking for Mifare Classic emulation, so maybe we should start something here..
Does anybody have done some work around this subject ?

Romuald Conty

Re: Mifare Classic 1K Emulator

The easier device to do this seems to be the Snapper, ATM

hi rconty !
sorry but .....what do  you have said that snapper is  emulating mifare 1k?
is really success 100%?

developing the future!

Re: Mifare Classic 1K Emulator

*dudux wrote:

sorry but .....what do  you have said that snapper is  emulating mifare 1k?

Your question seems to be "Did you said that Snapper is able to emulate Mifare 1k?", if so, the answer is absolutely not !
I didn't pratice emulation myself wink but talked to Roel and read his answers about this subject and I know that full-emulation can be a problem with device which doesn't provide raw access to pn53x like Touchatag.

*dudux wrote:

is really success 100%?

No, it's a 0% success to emulate Mifare Classic by myself.

Romuald Conty

Re: Mifare Classic 1K Emulator

I have had similar lack of success when trying to emulate a Mifare classic 1K, and I have direct access to the PN532 chip in my design.  I have tried some examples that come with libnfc, as well as many "examples" from the PN532 documents (UM and Application Notes), and all these tests basically end the same way: MiFare Authentication Errors (status - 0x14), or Timeout Error (status = 0x01) or Target Released (status = 0x26). 

I get past the anti-collision without any issues using the InListPassiveTarget and InSelect, but for some reason when the 4 byte random number (nonce) is sent in response to a Mifare authentication command (0x60 0x40 for example) the reader (initiator) does not respond with the pro forma 8 bytes (4 should be the response to the challenge and 4 should be an initiator issued challenge)

See a similar post I have that goes into a bit more detail of my setup: http://www.libnfc.org/community/post/3524/#p3524

In the meantime I am taking Romuald's suggestion (from this and other posts) to try to use ISO 14443-4 PICC Emulation, which is explained in more detail in the PN532 documents

However, if anyone from this forum would like to team up to figure this out I would be interested in that collaboration.  The Datasheet for the PN532 clearly states that Mifare Classic 1K emulation is supported, so there should be a way to figure this out.

Re: Mifare Classic 1K Emulator

Hi Papyrus,
see my answer to your post: http://www.libnfc.org/community/post/3524/#p3524
I'm afraid ISO 14443-4 PICC emulation won't help much for Mifare Classic which is only compliant to ISO 14443-3