Forum / MIFARE SDK / SmartCardException with UltralightC and Nexus 7 2012
-
so this line is not being printed:
Log.i("TAG","UltralightC card Detected" );
?
could you also just in case put
private String TAG = "TAG";
so that it won't be null.
BR,
David
+ 0 | - 0
Hi David,
Thanks a lot for your help.
I finally got it.. I added a print line for each of the card types and it looks the tag is being recognized as NTag203x ... grgrgrgrgr
I'm copying here the final version of this sample just in case it helps someone.
http://pastebin.com/1ZaEEd5k
The question is, will the SDK allow me to use the features of the UltraLightC at a high level?? or should I stick to data sheets and do it myself?
Thanks,
Emmanuel.
+ 0 | - 0
Yes, but weren't these lines implemented automaticly when you created those methods ? They should've been. Maybe you have missed it in Logcat? ;)
Well no problem, now we know what's going on.
To be honest, if it detects it as NTag203, it probably is the NTag203 and not an UltraLightC Card.
What you can try is to add some function asociated with NTag203 (inside the method) to see if it really is NTAG203.
Use:
arg0.getCardDetails();
and search for sCardName (maybe arg0.getCardDetails.sCardName ?)
I haven't used NTag203x yet, so I don't know how it builds this..but getCardDetails() is an Object that contains sCardName, so try to get to sCardName.
And check it in LogCat what it returns, and the we get some details if this really NTag203, or is something wrong going on here.
BR,
David
+ 0 | - 0
Hi,
Something weird is happening here.
I modified the method to look like this:
public void onNTag203xCardDetected(NTag203x arg0) {
// TODO Auto-generated method stub
Log.i("TAG","NTag203x card Detected" );
arg0.getCardDetails();
}
When I execute it I get no more lines than previously..
05-12 17:47:11.531 4200-4200/com.mifaresdktest I/TAG? Going to execute filterIntent
05-12 17:47:11.566 4200-4200/com.mifaresdktest I/SDK? This is NXP Card
05-12 17:47:11.706 4200-4200/com.mifaresdktest W/System.err? com.nxp.nfclib.exceptions.SmartCardException: Unknown Error.
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at com.nxp.nfclib.ntag.NTag.?(:239)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at com.nxp.nfclib.ntag.NTagFactory.getNTAG(:223)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at com.nxp.nfcliblite.Interface.NxpNfcLibLite.filterIntent(:276)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at com.mifaresdktest.MainActivity.onNewIntent(MainActivity.java:80)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1210)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2430)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread.performNewIntents(ActivityThread.java:2443)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2452)
05-12 17:47:11.707 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread.access$1600(ActivityThread.java:144)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1350)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at android.os.Handler.dispatchMessage(Handler.java:102)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at android.os.Looper.loop(Looper.java:135)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at android.app.ActivityThread.main(ActivityThread.java:5221)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at java.lang.reflect.Method.invoke(Native Method)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at java.lang.reflect.Method.invoke(Method.java:372)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
05-12 17:47:11.708 4200-4200/com.mifaresdktest W/System.err? at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
05-12 17:47:11.744 4200-4200/com.mifaresdktest I/TAG? NTag203x card Detected
Is it something else needed to get the details from the SDK?
Thanks
+ 0 | - 0
You said previously that it detected it as NTag203.. so now it doesnt?
Because I don't see "NTag203 card Detected" inside your LogCat.
David
+ 0 | - 0
Uhm, yes it does..
05-12 17:47:11.744 4200-4200/com.mifaresdktest I/TAG? NTag203x card Detected
Thanks!!
+ 0 | - 0
Great!
So did you check if it really is NTAg203 ? Try one of the methods for the NTag203 from LITE Library and you'll see if it works. Then you'll know if it really NTAg203 or some weird issue with Ultralight.
No problem!
Cheers,
David
+ 0 | - 0
-
AuthorPosts
You must be logged in to reply to this topic.