nfc-tools / nfc-iclass Goto Github PK
View Code? Open in Web Editor NEWiClass / Picopass tool for libnfc
iClass / Picopass tool for libnfc
In trying to compile under Windows, I've run into a couple of issues. Some I've been able to workaround, and some I have not.
The pkg-config seems to be unable to detect that libnfc is installed so I have to manually edit some library paths to point to the right /libnfc/include folder and all is well eventually.
err.h is not a supported header under Windows, but it doesn't seem to be actually used by nfc-iclass so commenting that out seems to resolve that issue, but this is the compilation error I cannot resolve:
nfc-iclass.h:2:6: error: conflicting types for 'strncasecmp'
2 | bool strncasecmp(char *s1, char *s2, int len);
| ^~~~~~~~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/io.h:10,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/unistd.h:10,
from nfc-iclass.c:48:
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:116:28: note: previous definition of 'strncasecmp' was here
116 | __CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
| ^~~~~~~~~~~
nfc-iclass.c: In function 'main':
nfc-iclass.c:228:55: error: 'S_IRUSR' undeclared (first use in this function)
228 | if((outfile= open(optarg, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) <= 0)
| ^~~~~~~
nfc-iclass.c:228:55: note: each undeclared identifier is reported only once for each function it appears in
nfc-iclass.c:228:65: error: 'S_IWUSR' undeclared (first use in this function)
228 | if((outfile= open(optarg, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) <= 0)
| ^~~~~~~
nfc-iclass.c:228:75: error: 'S_IRGRP' undeclared (first use in this function)
228 | if((outfile= open(optarg, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) <= 0)
| ^~~~~~~
nfc-iclass.c:228:85: error: 'S_IWGRP' undeclared (first use in this function)
228 | if((outfile= open(optarg, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) <= 0)
| ^~~~~~~
nfc-iclass.c: At top level:
nfc-iclass.c:629:6: error: conflicting types for 'strncasecmp'
629 | bool strncasecmp(char *s1, char *s2, int len)
| ^~~~~~~~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/io.h:10,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/unistd.h:10,
from nfc-iclass.c:48:
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:116:28: note: previous definition of 'strncasecmp' was here
116 | __CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
| ^~~~~~~~~~~
make[2]: *** [Makefile:404: nfc-iclass.o] Error 1
I understand this is probably not something that was tested to compile under Windows, but I would be happy to help test any proposed fixes as needed. I've also compiled this successfully under an Ubuntu VM but for some reason performance with a PN533 seems to be really spotty and tags only detect intermittently.
Hi
My ACR122U-A9 is working for mifare related stuff, but I cannot seem to make it work for ICLASS.
I verified my ICLASS legacy tag on a proxmark to make sure it is not the tag that is the problem.
Any ideas on troubleshooting this issue?
[root@mint:~/nfc-iclass# nfc-scan-device
nfc-scan-device uses libnfc libnfc-1.8.0-41-gd9a04a5
1 NFC device(s) found:
- ACS / ACR122U PICC Interface:
acr122_usb:002:004]
root@mint:~/nfc-iclass# nfc-iclass
NFC device: ACS / ACR122U PICC Interface opened
nfc-iclass: ERROR: no tag was found
error libnfc.driver.acr122_usb Command Code verification failed
Based on the following, I tried one of the suggested fixes, which did not work either.
https://gist.github.com/danieloneill/3be43d5374c80d89ea73
root@mint:~/nfc-iclass# nfc-list
NFC device: ACS / ACR122U PICC Interface opened
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.