Forum › MIFARE and NFC Reader IC`s › CLRC663 family › RC663 Anticollision › Re: RC663 Anticollision
Here is one example of scanning ISO14443 -A type cards based on NXPRdLib. Please let me know if it is you are looking for or you want a script like running in joiner.
static void ScanTags(void)
{
uint8_t bMoreCardsAvailable;
uint8_t bSak[1];
uint8_t numTags = 0;
bLastUidLength = 0;
/* Activate the communication layer part 3
* of the ISO 14443A standard. */
status = phpalI14443p3a_Sw_ActivateCard(&I14443p3a, NULL, 0x00, bUid,
&bUidLength, bSak, &bMoreCardsAvailable);
numTags = 1;
while(PH_ERR_SUCCESS == status)
{
bLastUidLength = bUidLength;
memcpy(bSelectedUid,bUid,bUidLength);
debug_printf_msg("Tag number:");
debug_printf_hex_msg(&numTags, 1);
debug_printf_msg("UID:");
debug_printf_hex_msg(bUid, bUidLength);
//halt the tag
status = phpalI14443p3a_Sw_HaltA(&I14443p3a);
/* move on to activating the next card */
status = phpalI14443p3a_Sw_ActivateCard(&I14443p3a, NULL, 0x00,bUid,
&bUidLength, bSak, &bMoreCardsAvailable);
if(status != PH_ERR_SUCCESS)
debug_printf_msg("No more tags detected");
else
numTags++;
}
}
static void ScanTags(void)
{
uint8_t bMoreCardsAvailable;
uint8_t bSak[1];
uint8_t numTags = 0;
bLastUidLength = 0;
/* Activate the communication layer part 3
* of the ISO 14443A standard. */
status = phpalI14443p3a_Sw_ActivateCard(&I14443p3a, NULL, 0x00, bUid,
&bUidLength, bSak, &bMoreCardsAvailable);
numTags = 1;
while(PH_ERR_SUCCESS == status)
{
bLastUidLength = bUidLength;
memcpy(bSelectedUid,bUid,bUidLength);
debug_printf_msg("Tag number:");
debug_printf_hex_msg(&numTags, 1);
debug_printf_msg("UID:");
debug_printf_hex_msg(bUid, bUidLength);
//halt the tag
status = phpalI14443p3a_Sw_HaltA(&I14443p3a);
/* move on to activating the next card */
status = phpalI14443p3a_Sw_ActivateCard(&I14443p3a, NULL, 0x00,bUid,
&bUidLength, bSak, &bMoreCardsAvailable);
if(status != PH_ERR_SUCCESS)
debug_printf_msg("No more tags detected");
else
numTags++;
}
}
+ 0
|
- 0