2019-05-02

PN532 Disappointing electronics

Playing around with some electronics is fun, and usually things work well, but I have hit a slight snag.

I am trying to make a more secure door entry reader using NFC. The main idea is to work with Mifare DESFire EV1 cards using AES. This would be secure.

The first reader I tried was an MFR522. This works well on the Mifare Classic cards, and it is easy to make something that uses the card ID (4 bytes) as an access control. But they can be copied. Even using the encryption is pointless as Mifare Classic cards have been well cracked.

Apparently the RC522 cannot handle the better cards, so I got a PN532 based reader. One of these red ones...


They are readily available on Amazon (with a header, card, and fob).

I got one, tried it, it worked. It would read a card or a fob, and would read the 7 byte ID from the better Mifare DESFire EV1 tags. This is excellent. It even got an ID (randomised) from my passport!

I then 3D printed a nice case for it, and reconnected it, backwards! I have since changed to properly polarised connectors, but I was cursing. It stopped working, unsurprisingly.

So I got another one. It reads the Mifare classic cards, but has to be very close to the reader. It won't read the Mifare classic fob that came with it even. It won't read my passport not the Mifare DESFire EV1 card.

So I got another one, and the same. Arrrg!

So I got another make, a keyestudio one. It won't read the Mifare DESfire EV1.

This is really frustrating. Looking around the internet it seems some of the red boards work and some don't. There are reports of changing some components on them. There is talk of cheap Chinese clones which don't work well. The elechouse website even has details of the cheap copies being sold.

However, it seems I can buy genuine parts from elechouse, so I'll try that. Fingers crossed.

P.S.... 

Hi,
It is Holiday of Labor's Day here.
We will ship your order next week. The shipping would take 5~7 days.

5 comments:

  1. Hello RevK, my PN532 stop working suddenly, I never could read a passport chip or ID card, at least with the original configuration, you did some RF reconfiguration on the PN532 to be able to read this type of chip ?
    Thank you.

    ReplyDelete
    Replies
    1. My stuff is on GitHub if that helps.
      https://github.com/revk/ESP32-PN532

      Delete
  2. Hi RevK,

    I am using the library from your github page and have managed to get it to read MiFare card IDs, but am a bit lost on authentication and reading data from the sectors. I would also like to be able to use the DesFire EV1 cards. Is there any chance that you would share examples on the github respository to cover both of these scenarios?

    I am currently using one of the red PN532 readers, but may end up using your Kicad designs.

    Thanks

    Vance

    ReplyDelete
    Replies
    1. I can when I am back. There is a DESFire library on my GitHub as well. The mifare is pretty noddy if I recall.

      Delete
    2. Sorry for the delay, I have an example of PN532 library and DESFire library being used in https://github.com/revk/SolarSystem/blob/master/ESP32/main/nfc.c

      Delete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Playing with microphones

The latest LED board designs have included a TDK PDM I2S microphone  - the idea was to make sound reactive LED strips. It is tiny (3.5mm x 2...