Android Question NFC problem in android 11+

Pxs

Member
Licensed User
Hello

I'm writing an app for managing some new nfc-v tags (ST25DV).

on Android 10, everything works flawlessly.
Same identical code, on android 11, 12 and 13, calling TagTechnology.transceive fails (success=false), and then unfiltered logs start getting endlessly spammed by Invalid ID (im not sure if its related or another issue)

NB: I'm NOT using EnableReaderMode

B4X:
Invalid ID 0x00000017.
Reading from 0 | 003300000400
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
    at anywheresoftware.b4a.objects.NFC$TagTechnologyWrapper$2.call(NFC.java:306)
    at anywheresoftware.b4a.objects.NFC$TagTechnologyWrapper$2.call(NFC.java:1)
    at anywheresoftware.b4a.BA$3.run(BA.java:478)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:923)
Caused by: android.nfc.TagLostException: Tag was lost.
    at android.nfc.TransceiveResult.getResponseOrThrow(TransceiveResult.java:48)
    at android.nfc.tech.BasicTagTechnology.transceive(BasicTagTechnology.java:154)
    at android.nfc.tech.NfcV.transceive(NfcV.java:115)
    ... 10 more
Invalid ID 0x00000017.
Invalid ID 0x00000017.
Invalid ID 0x0000000f.
Invalid ID 0x0000000f.
Invalid ID 0x0000000a.
Invalid ID 0x0000000a.
Invalid ID 0x0000000f.
uid=10292(com.pixsys.omnireader) identical 2 lines
Invalid ID 0x0000000f.
Invalid ID 0x0000000a.
Invalid ID 0x0000000a.
Invalid ID 0x0000000f.
Invalid ID 0x0000000f.
Invalid ID 0x0000000f.
Invalid ID 0x0000000f.
Invalid ID 0x0000000a.
Invalid ID 0x0000000a.
Invalid ID 0x0000000f.
uid=10292(com.pixsys.omnireader) identical 2 lines
Invalid ID 0x0000000f.
Invalid ID 0x0000000a.
Invalid ID 0x0000000a.
Invalid ID 0x0000000f.

Anyone had similar NFC issues going from android 10 to 11+?
 
Solution
For anyone having problems with the same tag model, i'll just leave this here :

Seems like using the addressed version of the command (passing the 64bit UID of the specific tag) works.
Unaddressed mode only works on android 10 or lower.
Don't forget to also set the request header bit for addressed mode ( 0x20h).




The invalid ID log spam continues , but seems to be unrelated
Edit: Found something about the ID spam. I recently switched from AHViewPager / DSTabLayout to a solution based on TabStrip, and my issue is similar to this https://stackoverflow.com/questions/66340454/invalid-id-0x00000001-errors-after-viewpager2-migration

Just as that post, the app is still functional , just the unfiltered logs become unusable

Pxs

Member
Licensed User
For anyone having problems with the same tag model, i'll just leave this here :

Seems like using the addressed version of the command (passing the 64bit UID of the specific tag) works.
Unaddressed mode only works on android 10 or lower.
Don't forget to also set the request header bit for addressed mode ( 0x20h).




The invalid ID log spam continues , but seems to be unrelated
Edit: Found something about the ID spam. I recently switched from AHViewPager / DSTabLayout to a solution based on TabStrip, and my issue is similar to this https://stackoverflow.com/questions/66340454/invalid-id-0x00000001-errors-after-viewpager2-migration

Just as that post, the app is still functional , just the unfiltered logs become unusable
 
Last edited:
Upvote 0
Solution
Top