New to mifare and the samples aren't working for me

Forum / MIFARE SDK / New to mifare and the samples aren't working for me

  • 9. February 2017 at 11:18
    Hi hello

    I'm trying to get started with the mifare sdk and I seem to have hit a hurdle very early on. I'm trying to run some of the sample code in the mifare sdk (c#), and I don't appear to be able to authenticate against the card? (right terminology?). The cards I'm using are straight from the manufacture (I've also got a couple of mibands which I'm also having the same problem with). As far as I've read, the KeyA should be a default? But if I try and read a sector I'm getting login exceptions, so I'm wondering if it's the *right* default?

    Lost! :)

    I've tried 000000000000 and FFFFFFFFFFFF

    Any guidance would be greatly appreciated!

    (for reference, I'm using this nuget library: https://github.com/onovotny/MiFare .. someone shout if it's the wrong thing to be using)

    Thanks! P
    + 0  |  - 0

    Re: New to mifare and the samples aren't working for me

    9. February 2017 at 15:28
    Hello Paul,

    It seems that this library “onovotny/MiFare” only supports MIFARE Classic. I cannot say anything about this library, it is not maintained by NXP.

    If you want to use to authenticate, read and write to a Classic, it could be much easier to use PC/SC which is an official interface in Windows. Here it is important to read the manual of the used NFC reader, because the APDU commands usually wrapped into other commands. This wrapping depends on implementation of the manufacturer of the reader.

    At the end there are only a couple of commands you have to implement in your software. So a library might not be necessary in this case.

    The Taplinx team

    + 0  |  - 0

    Re: New to mifare and the samples aren't working for me

    9. February 2017 at 15:33
    Oh thank you, that does help. Is there an official MiFare SDK for c# that I shoudl work with?

    Thanks! P
    + 0  |  - 0

    Re: New to mifare and the samples aren't working for me

    10. February 2017 at 17:41
    Hello Paul,

    No sorry, C# is not supported by NXP libraries. There is a Java SDK available which can be used on a PC. This SDK also supports the PC/SC interface, because it is widely used on desktop systems.

    As I said, for a MIFARE Classic you deal only with the three main commands authenticate(), read() and write(). For value blocks you can use increment(), decrement() restore() and transfer(). You have to implement this function calls to APDU byte sequences which are sent to the PC/SC interface. How the APDU byte sequence is defined, you have to check the public datasheet of the MIFARE Classic and the user manual of the PC/SC reader.

    Regards,
    The TapLinx team
    + 0  |  - 0
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.