Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
RThie
Posts: 5
Registered: ‎04-09-2013
My Device: Z10

nfc_get_tag_id not working properly on all NFC Variants

I try to get an id for a nfc card, but the nfc_get_tag_id does not provide me one. I tried to get it working, but even with the sample nfctool the method does not work.

 

Is there anyway to get an Unique Identifier of an ISO14443_4 card? I know that the card has one, as I can retrieve one with the Android NFC Api.

 

Thank you in advance.

 

Yours sincerely

Raphael

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: nfc_get_tag_id not working properly on all NFC Variants

Hi,

 

What type of card are you reading?

What length is returned?

What is the actual card number?

Are you treating it as binary data, or as a string? (It's binary).

Do you have sample code?

Which OS version are you using?

Which device are you using?

 

The following code snippet displays an ID and type for me (testing with a tag)

 

ID "047b1942eb2584"
Name 9 Mifare UL

 

                size_t idLength = 0;
                uchar_t id[100];

                size_t nameLength = 0;
                char name[100];

                rc = nfc_get_tag_id(target, id,100,&idLength);

                if (rc==NFC_RESULT_SUCCESS) {
                    QString idString("");
                    for (int i=0; i<idLength; ++i) {
                    	if (id[i]<16) {
                    		idString += "0";
                    	}
                    	idString += QString::number(id[i],16);
                    }

                    qDebug() << "ID" << idString;
                }


                rc = nfc_get_tag_name(target,name,100,&nameLength);
                if (rc==NFC_RESULT_SUCCESS) {
                    qDebug() << "Name" << nameLength << name;
                }

 

 

--
Rob is no longer associated with BlackBerry.
New Contributor
RThie
Posts: 5
Registered: ‎04-09-2013
My Device: Z10

Re: nfc_get_tag_id not working properly on all NFC Variants

Hi,

Thank you for your response.


I tried the code-snippet in your post, but unfortunately the result is the same. I got an empty String for the id (as the length returned by nfc_get_tag_id is 0) and the name, returned by the nfc_get_tag_name method is “Unknown”.

We are using nfc-cards with SECCOS 6 Operating System, which is based on ISO 7816.


The returned length, as mentioned above, is 0.

I am treating the data as binary.

I can write you our code, but it is pretty similar to the snippet posted by you, so I do not think this will not help in solving this matter.

I am currently using a Blackberry Z10 device with OS 10 with version 10.0.10.90.

Thank you in advance

Yours sincerely

Raphael

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: nfc_get_tag_id not working properly on all NFC Variants

I've requested input from development...

--
Rob is no longer associated with BlackBerry.
Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: nfc_get_tag_id not working properly on all NFC Variants

Development sees no reason why we shouldn't be getting the ID...

 

Could you let us know the model, and capture logs with BlackBerry Link shortly after reproducing?

--
Rob is no longer associated with BlackBerry.