grundid / nfctools

nfctools library for Java
http://www.grundid.de/nfc/
Other
305 stars 92 forks source link

Crash while reading Mifare Ultralight C tags using ACR 122U reader #31

Open maskaravivek opened 7 years ago

maskaravivek commented 7 years ago
FATAL EXCEPTION: Thread-422
Process: in.zeta.android.pos.debug, PID: 11584
org.nfctools.NfcException: org.nfctools.NfcException: Unknown tag contents
at org.nfctools.mf.ul.Type2NfcTagListener.createNdefOperations(Type2NfcTagListener.java:93)
at org.nfctools.mf.ul.Type2NfcTagListener.handleTag(Type2NfcTagListener.java:51)
at in.zeta.android.nfc.ReaderStateChangeListener.onStateChange(ReaderStateChangeListener.java:48)
at com.acs.smartcard.Reader$1.run(SourceFile:4097)
at java.lang.Thread.run(Thread.java:818)
Caused by: org.nfctools.NfcException: Unknown tag contents
at org.nfctools.mf.ul.Type2NfcTagListener.createNdefOperations(Type2NfcTagListener.java:89)
skjolber commented 6 years ago

The tags might not contain Ndef data, so you should catch that execption and fall back to binary reading.

Bubumuk commented 6 years ago

@skjolber

catch that execption and fall back to binary reading.

Can you show me the way to binary reading?

SuneethaYamani commented 5 years ago

I am also facing same issue with mifare classic card.can you please share sample

maskaravivek commented 5 years ago

I wasn't able to figure out the issue using the library so i manually wrote/read the data page by page and then parsed it to read the actual messages.