Open GoogleCodeExporter opened 9 years ago
Please provide a trace of the execution with:
LIBNFC_LOG_LEVEL=3 mifare_classic_authenticate
I don't have such card so I cannot test myself.
Original comment by yob...@gmail.com
on 20 Dec 2013 at 3:58
debug libnfc.chip.pn53x InDataExchange
debug libnfc.chip.pn53x No timeout
debug libnfc.driver.acr122_usb TX: 6f 14 00 00 00 00 00 00 00 00 ff 00 00 00 0f
d4 40 01 60 04 ff ff ff ff ff ff a0 d9 89 78
debug libnfc.driver.acr122_usb RX: 80 07 00 00 00 00 00 00 81 00 d5 41 00 67 00
90 00
error libnfc.chip.pn53x Buffer size is too short: 1 available(s), 2 needed
Original comment by maximch...@gmail.com
on 20 Dec 2013 at 5:11
For regular Mifare Classic card it's a little bit different:
debug libnfc.chip.pn53x InDataExchange
debug libnfc.chip.pn53x No timeout
debug libnfc.driver.acr122_usb TX: 6f 14 00 00 00 00 00 00 00 00 ff 00 00 00 0f
d4 40 01 60 04 ff ff ff ff ff ff e7 38 a1 4a
debug libnfc.driver.acr122_usb RX: 80 05 00 00 00 00 00 00 81 00 d5 41 00 90 00
so I guess second byte of RX is a length of response that probably was
hardcoded somewhere.
Original comment by maximch...@gmail.com
on 20 Dec 2013 at 5:49
Ok I figured out that this issue is a duplicate of
https://code.google.com/p/libnfc/issues/detail?id=229
I added:
nfc_set_property_bool(pnd, NP_AUTO_ISO14443_4, false)
before calling mifare_classic_connect
and it fixed my problem
Original comment by maximch...@gmail.com
on 20 Dec 2013 at 8:26
As mifare_classic_connect() implies connecting to MIFARE Classic, which is not
a ISO14443-4 card, we maybe could disable NP_AUTO_ISO14443_4 feature in
libfreefare ?
Note: we will need to re-enable it before connection to DESFire.
Original comment by romu...@libnfc.org
on 20 Dec 2013 at 10:47
This makes sense to me, yes.
Note that at the moment current examples mifare-classic-format etc are also
buggy.
Original comment by yob...@gmail.com
on 20 Dec 2013 at 11:31
Original issue reported on code.google.com by
maximch...@gmail.com
on 20 Dec 2013 at 11:38