‎2019-02-22 02:14 AM
I can not detect the UID through the CR95HF_TagDetect sample program. The program only detects the tag type but not the UID as described on page 15/21 of the UM2045 document (Figure 7). Where is this program described whose output is described in figure 7? Thanks to those who want to answer me.
Solved! Go to Solution.
‎2019-02-27 02:25 AM
Hi,
here is the modified main.c file (in C language, your modification are not valid).
Rgds
BT
‎2019-02-22 05:59 AM
‎2019-02-22 06:16 AM
Thanks but i have a problem.
I would like to make a door opener with a relay via the NFC03A1 module. To do this I need the tag identification code. But I can not take it. What example files should I use? I do not need the TYPE of TAG but the CODE UID or HEX CODE.
‎2019-02-22 09:00 AM
Hi,
based on X-CUBE-NFC3 1.4.0, you can use:
For example, if you dump (ISO14443A_Card.UID, ISO14443A_Card.UIDsize); in case TRACK_NFCTYPE4A, you will have:
TRACK_NFCTYPE4A NFC tag detected nearby 02A30000C79071
where 02A30000C79071 is the tag UID (double size UID)
Feel free to share more details on your applications such as the type of tag you plan to use.
Rgds
BT
‎2019-02-27 01:24 AM
I tried but I can not compare the UID on teraterm far.
I have a type 2 tag. What should I enter here to make the uid appear on the terminal?
case TRACK_NFCTYPE2:
{
LED_Off(GREEN_LED1);
LED_On(BLUE_LED2);
TagDetected = true;
if(terminal_msg_flag == true )
{
terminal_msg_flag = false ;
/*---HT UI msg----------*/
sprintf( dataOut, "\r\n\r\nTRACK_NFCTYPE2 NFC tag detected nearby " );
HAL_UART_Transmit( &UartHandle, ( uint8_t * )dataOut, strlen( dataOut ), 500 );
}
}
break;
Thanks
‎2019-02-27 01:41 AM
Hi,
just modify the HT UI msg code to add a call to Dump the UID
/*---HT UI msg----------*/
sprintf( dataOut, "\r\n\r\nTRACK_NFCTYPE2 NFC tag detected nearby " );
HAL_UART_Transmit( &UartHandle, ( uint8_t * )dataOut, strlen( dataOut ), 500 );
HexDump(ISO14443A_Card.UID, ISO14443A_Card.UIDsize);
Add the following simple function in main.c:
static void HexDump(uint8_t *s, uint8_t lg)
{
static char dataOut[3];
while (lg-- > 0)
{
sprintf( dataOut, "%2.2X", *s++);
HAL_UART_Transmit( &UartHandle, ( uint8_t * )dataOut, strlen( dataOut ), 500 );
}
}
This should display the hex value of the UID on the terminal.
Rgds
BT
‎2019-02-27 01:50 AM
Okay i modify UIT msg code
and i add this on main.c
ERROR MESSAGE
But ISO14443A_Card is not diclared
‎2019-02-27 02:00 AM
Hi
as explained in my answer from February 22, 2019 at 6:01 PM, you have to add extern declaration:
extern ISO14443A_CARD ISO14443A_Card;
Rgds
BT
‎2019-02-27 02:15 AM
Error..:confounded_face:
‎2019-02-27 02:25 AM