Android Question NFC for 15693

bartj

Member
Hello,

I am brand new to B4A. I am using b4a version 10.0.

I have successfully downloaded and run the "Advanced NFC" program. I see that the NFC library shows as 2.01. I would like to read 15693 tags (NfcV). I have read a lot of posts on the forum on this topic (NFC/15693) and I saw a lot of activity from back in 2014/15/16 on this topic but I never saw any links to a working implementation. There were some who claimed to have it working but there was never a working example posted.

Is there a working example for reading 15693?

Thanks!
 

f0raster0

Well-Known Member
Licensed User
Longtime User
Have you tried this demo:
 
Upvote 0

bartj

Member
Yes, I am able to load and run the Advanced NFC program referenced in that thread. However it only supports NDEF (14443) tags. I understand that the native library does not support 15693 tags and I also understand that the 15693 APIs are available but one must know java(which I do not) and also be a relatively accomplished b4x developer.

I have modified the Advanced NFC program to determine if a tag is 15693 and if so, initialize it and attempt to connect. It however returns a false for success when connecting.

B4X:
If techs.IndexOf("android.nfc.tech.Ndef") > -1 Then
            TagTech.Initialize("TagTech", "android.nfc.tech.Ndef" , si)
            'Connect to the tag
            TagTech.Connect
        else if techs.IndexOf("android.nfc.tech.NfcV") > -1 Then
            TagTech.Initialize("TagTech", "android.nfc.tech.NfcV" , si)
            'Connect to the tag
            TagTech.Connect
        Else
            ToastMessageShow("Tag does not support Ndef.", True)
        End If

I was hoping that someone has moved ahead with this. Any other references appreciated.

Thanks for your response!
 
Upvote 0

bartj

Member
Hello,

I find that the value passed to "Sub TagTech_Connected" is true. I was obviously wrong about the source of the error. The value of last exception at that point is "not initialized". However, checking the last exception at the start of "Sub ReadNdef_RunAsync" does show a last exception:

B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Techs: [android.nfc.tech.NfcV, android.nfc.tech.NdefFormatable]
Connected: true
Last Exception in TagTech_Connected: (Exception) Not initialized
Reading completed. Success=false, Flag=0
Last Exception in ReadNdef_RunAsync: (RuntimeException) java.lang.RuntimeException: Method: getNdefMessage not found in: android.nfc.tech.NfcV

Obviously trying to get an Ndef message from a 15693 tag is not going to work too well. What are my options for reading a 15693 tag?

Also, and please tell me if I should start a new thread, I would like to know more about addressing specific areas of memory for both NDEF and 15693 tags. The example only appears to want to read/write some default number of "records".

Thanks!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
he value of last exception at that point is "not initialized".
This is expected. You previously wrote that it failed to connect.

As this is not a NDEF tag, you will need to use transceive method to communicated with it:

 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
...However it only supports NDEF (14443) tags.
Can you try to read your tag using the .apk attached, it's a demo-App from this forum to read tags NfcVReader ISO-IEC 15693.
What will be the problem..maybe
there was used a library version NFC library 1.25 (don't remember, but was something not official) then if the .apk works I can look my backups to find the source code

Edit: it worked OK with my Samsung S3 (back in 2015 or so :p ) but doesn't work with all the Smartphone (looks like that Smartphone has a "nice" antenna).. I will look for my tags to check if this app work with my S30
 

Attachments

  • NfcVReader.apk
    191.9 KB · Views: 353
Last edited:
Upvote 0

bartj

Member
Hello,

Yes, the NfcVReaker.apk works on my pixel xl phone with 15693 tags. It does give me a warning at startup that it was designed for older phones, but it does read the UII. If you have source code for this, and are willing to share, let me know.

Much thanks!
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Hello,

Yes, the NfcVReaker.apk works on my pixel xl phone with 15693 tags. It does give me a warning at startup that it was designed for older phones, but it does read the UII. If you have source code for this, and are willing to share, let me know.

Much thanks!
looking my backup in my Laptop this week.. for now check this:
(I'm sure you need the library version NFC library 1.25 ) but maybe fro that link it also works for you.
 
Upvote 0

bartj

Member
RE: Last response sample code ( 210038 )

Any idea where I can get v1.25 of the NFC lib? I found version 1.23 but its missing:
NFCForeground

And also missing in one of the libraries is:
Byteconverter

Thanks!
 
Upvote 0

bartj

Member
Am new to B4A. I installed it about a month ago(v10.0).

Is there a way to determine if the NFC lib has updated from 2.01 in B4A 10.0 to B4A 10.2? I was using older versions of the NFC library to support some old code that was referenced above.

And the next posts in 210038 reference more resources that may need to use eclipse, etc which is beyond my current level of ability.

Thanks for all your assistance!
 
Upvote 0

Similar Threads

  • Question
Android Question NFC Reading
Replies
6
Views
1K
Replies
2
Views
2K
  • Question
Android Question NFC-V
Replies
3
Views
2K
  • Question
Android Question NFCV Tag
Replies
8
Views
1K
Top