libnfc icon indicating copy to clipboard operation
libnfc copied to clipboard

Cannot detect Yubikey 5 NFC with PN532

Open agorgl opened this issue 2 years ago • 12 comments

I have a PN532 module plugged in HSU (UART) mode with a usb serial adapter. Using nfc-poll -v and scanning various RFID cards and tags works flawlessly, but trying to scan a YubiKey 5 NFC doesn't read anything.

I tried two different PN532 modules, one ITEAD PN532 NFC MODULE and an ELECHOUSE NFC RFID MODULE V3 that exhibit same behavior.

Any idea on how to debug / diagnose the problem?

agorgl avatar Mar 10 '23 12:03 agorgl

Scanning yubikey with NFC Tools on Android it shows up as having a tag type of ISO 14443-4 with the description NXP - Mifare Plus. Same behavior is observed with another (train) nfc card that I have with tag type of ISO 14443-4 and description NXP - Mifare DESFire EV1 4k.

Are these kinds of cards supported by libnfc / nfc-poll? I also tried using another USB UART / TTL adapter, even serial over BT with a HC-05 module, powering module with separate supply etc. just to be sure that it was not the problem of any other component in the equation.

agorgl avatar Mar 15 '23 11:03 agorgl

Did you find out anything?

gianklug avatar Nov 20 '23 20:11 gianklug

Nop, I kinda gave up after a while (I even tried to make my own NFC antenna!). I think that these cheap PN532 modules are not powerful enough to interact with Yubikey NFC / Mifare DESFire EV1 4k cards

agorgl avatar Nov 22 '23 22:11 agorgl

I have it detecting a Yubikey 5 NFC just fine, even via pcsc_scan. (Running on a Raspberry Pi 4 with PN532 connected via i2c) It also works just fine with a Codewave NFC Micro Sticker Tag, so this isn't a size or antenna issue.

libnfc + ifdnfc built from source using latest master of both repos.

3rdIteration avatar Nov 25 '23 16:11 3rdIteration

I tried only using uart, can you try and tell us if it works with uart too? If so, what board do you have exactly?

agorgl avatar Nov 25 '23 17:11 agorgl

Can't test UART at the moment, but it's this board here https://a.aliexpress.com/_mqQRXte

It also detects the yubikey with plain old nfc-poll.

3rdIteration avatar Nov 26 '23 00:11 3rdIteration

Are you sure this is your board? Because I have a similar chinese board that looks exactly the same, and I could not make yubikey scanning work with it in UART mode

agorgl avatar Nov 26 '23 10:11 agorgl

That's the exact board that I am using.

I actually have a second one coming in a few days, so can see if ur works the same and also test UART mode.

3rdIteration avatar Nov 26 '23 12:11 3rdIteration

So I just checked and basically the quality varies dramatically between these cheap clone boards from AliExpress or Amazon... One of them ones that I have here has very poor range and struggles to even reliability detect full sized smart card, let alone a Yubikey...

3rdIteration avatar Dec 06 '23 22:12 3rdIteration

Even from the same seller/vendor?

agorgl avatar Dec 07 '23 07:12 agorgl

Haven't tried but I would imagine so, these clones are never consistent...

3rdIteration avatar Dec 07 '23 10:12 3rdIteration