2 ============================================================================
7 Description : Very simple test of uFR library
8 ============================================================================
16 #define READER_TYPE 1 //uFR type (1Mbps)
17 #define PORT_NAME "/dev/ttyUSB0" //"" to check all
18 #define PORT_INTERFACE 1 //Serial
24 printf("uFCoder library version: %s\n", GetDllVersionStr());
26 status = ReaderOpenEx(READER_TYPE, PORT_NAME, PORT_INTERFACE, 0);
27 printf("ReaderOpenEx: %s\n", UFR_Status2String(status));
29 //status = ReaderUISignal(0, 0);
30 //printf("ReaderUISignal: %s\n", UFR_Status2String(status));
32 puts(GetReaderDescription());
35 status = GetDlogicCardType(&lpucCardType);
36 printf("GetDlogicCardType: %s\n", UFR_Status2String(status));
37 if (status != UFR_OK) {
40 printf("card type: %x\n", lpucCardType);
45 status = GetCardIdEx(&lpucSak, aucUid, &lpucUidSize);
46 printf("GetCardIdEx: %s\n", UFR_Status2String(status));
47 if (status != UFR_OK) {
50 printf("lpucSak: %d, lpucUidSize: %d, aucUid: ", lpucSak, lpucUidSize);
51 for (uint8_t i = 0; i < lpucUidSize; i++) {
52 printf("%x", aucUid[i]);
56 status = ReaderClose();
57 printf("ReaderClose: %s\n", UFR_Status2String(status));