How can I use the CLRC663 chip to read HID iClass tags

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I use the CLRC663 chip to read HID iClass tags

4,880 Views
martinchowell
Contributor I

We are using the CLRC663 chip in an RFID reader design and we have used the provided NXP driver library to successfully read MIFARE and ISO15693 cards, but we also wish to read HID iClass tags, is it possible to do this and if so how?

Labels (1)
16 Replies

3,130 Views
martinhowell1
Contributor III

here is the function I used to read the iClass card with my library functions. I do not use the discovery loop as I foud it a bit cumbersome.

For the function you can get pHal by:

/* Set the generic pointer */
void *pHal = phNfcLib_GetDataParams(PH_COMP_HAL);

/*==============================================================================================
* FUNCTION: DetectTagIclass
*
* Description:
*
---------------------------------------------------------------------------------------------*/
static uint8_t DetectTagiClass(void *pHal)
{
uint8_t rt = false;
phStatus_t status;
uint8_t bMask[PHPAL_SLI15693_UID_LENGTH];
uint8_t Dsfid;
uint8_t bUid[10];
uint8_t bMoreCardsAvailable;
uint8_t bLength;
phpaliClass_Sw_DataParams_t paliClass;

/* init. 15693 pal */
PH_CHECK_SUCCESS_FCT(status, phpaliClass_Sw_Init(&paliClass,
sizeof(phpaliClass_Sw_DataParams_t), pHal));

/* Apply the 15693 protocol settings */
PH_CHECK_SUCCESS_FCT(status, phhalHw_ApplyProtocolSettings(pHal,
PHHAL_HW_CARDTYPE_ICLASS));

/* Activate 15693 tags */
memset(bMask, 0, sizeof(bMask));
status = phpaliClass_Sw_ActivateCard(&paliClass,
PHPAL_ICLASS_ACTIVATE_DEFAULT,
(PHPAL_ICLASS_FLAG_NBSLOTS | PHPAL_ICLASS_FLAG_DATA_RATE),
0,
bMask,
0,
&Dsfid, bUid, &bMoreCardsAvailable);


if (PH_ERR_SUCCESS == status)
{
#if 0
if(compatabilityMode)
{
status = phpaliClass_GetAcNo (&paliClass, bUid, &bLength);
}
else
#endif
{
status = phpaliClass_GetSerialNo (&paliClass, bUid, &bLength);
}
debug_printf("ICLASS tag detected : ");
if(bLength > 0)
{
int i;
debug_printf("Length %d : ", bLength);
if(bLength > 10)
bLength = 10;
for (i=0; i< bLength; i++)
debug_printf("%02X ", bUid[i]);
debug_printf("\r\n");
//RC663ReadTxAmp();
}

rt = true;
}


return rt;
}

3,130 Views
roberto74
Contributor I

Hi Martin,

Can you tell me where PHHAL_HW_CARDTYPE_ICLASS is defined?

Or should phhalHw_xxxxx_ApplyProtocolSettings() use the same settings as for PHHAL_HW_CARDTYPE_ISO15693?
(where xxxxx is the targeted chip)

Kind regards,

Robert

0 Kudos

3,130 Views
martinhowell1
Contributor III

Yes just use the same settings as ISO15693

0 Kudos

3,130 Views
lequanghuy
Contributor II

Hello Martin Howell,

it works impecable for me. Thank you for your help. It saves me days and days of coding

0 Kudos

3,130 Views
martinhowell1
Contributor III

Files are here:

https://www.dropbox.com/s/dpqrk6bd3t72nxe/phpaliClass.zip?dl=0

I should say I may have tweaked them a bit but originally found them somewhere on the net, so credit to the original author (referenced in the files)

0 Kudos

3,130 Views
jackylam8
Contributor II

Hi Martin,

May I got the file too ? 

Thanks

0 Kudos

3,130 Views
martinhowell1
Contributor III

For those who still want this file here is a working link to it

https://www.dropbox.com/s/dpqrk6bd3t72nxe/phpaliClass.zip?dl=0

Well NXP seem to do something with links, so I have attached the file (hopefully) to this thread also

3,130 Views
jackylam8
Contributor II

Thanks Martin, it is helpful

0 Kudos

3,130 Views
emotipl
Contributor I

Hi Martin, 

Could you share "phpaliClass.zip", the link above is not valid anymore. 

Best regards

Darek

0 Kudos

3,130 Views
lucamoreschi
Contributor I

Hi Martin,

thank you very much for your code.

I tried to use you code inside the "NfcrdlibEx1_BasicDiscoveryLoop" project from CLEV663B eval board with no success.

Unfortunately my experience with NXP code is really poor and I’m not sure how to call your functions and how to set parameters.

It will be very appreciated if you can send me a complete project that use your code.

Thanks.

Luca

Da: martinhowell1

Inviato: mercoledì 10 ottobre 2018 17:02

A: Luca Moreschi

Oggetto: Re: - Re: How can I use the CLRC663 chip to read HID iClass tags

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg> NXP Community

Re: How can I use the CLRC663 chip to read HID iClass tags

reply from Martin <https://community.nxp.com/people/martinhowell1?et=watches.email.thread> Howell in NFC - View <https://community.nxp.com/message/1066369?commentID=1066369&et=watches.email.thread#comment-1066369> the full discussion

0 Kudos

3,130 Views
lequanghuy
Contributor II

Hello Luca,

you have successfully read the iClass card with these files ? I tried but did not succeed

0 Kudos

3,130 Views
lucamoreschi
Contributor I

Hi Martin, I'm starting right now with CLRC633 and I have the same problem reading iCard. Have you solve the problem?

Thanks

Luca

0 Kudos

3,130 Views
martinhowell1
Contributor III

Luca,

 

I can read the card UID which is all I wanted to do. It doesn’t go through the whole anti-collision algorithm as for our application there is only going to be one card in the field at a time.

 I can upload the files if you want

Martin

0 Kudos

3,130 Views
lucamoreschi
Contributor I

Hi Martin,
great!!!! please send me your code, I have your same needed, just read the ID from one card at time (no anti-collision)

Luca

luca.moreschi@libero.it

0 Kudos

3,130 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi

HID iClass tag is compatible with ISO 15693 and other ISOs like ISO 14443 TYPE A/B, but as it uses dynamic authentication key, as well as required by the reader, so please contact HID for tech support on this.


Wish it helps.

Have a great day,
Kan Li
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,130 Views
senimanseniman
Contributor I

Hello Kan Li

Is it possible to read HID iclass tags serial number/card number directly without authentication key? 

I do not need read the content of memory inside the card. 

0 Kudos