nfctools icon indicating copy to clipboard operation
nfctools copied to clipboard

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

Open maskaravivek opened this issue 6 years ago • 4 comments

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)

maskaravivek avatar Sep 08 '17 06:09 maskaravivek

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

skjolber avatar Oct 21 '17 10:10 skjolber

@skjolber

catch that execption and fall back to binary reading.

Can you show me the way to binary reading?

Bubumuk avatar Aug 10 '18 15:08 Bubumuk

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

SuneethaYamani avatar Sep 19 '19 05:09 SuneethaYamani

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.

maskaravivek avatar Sep 19 '19 08:09 maskaravivek