nfc-tools / mfoc

Mifare Classic Offline Cracker
GNU General Public License v2.0
1.26k stars 267 forks source link

No NFC device found with mfoc, but it does work with libnfc examples/utils with adafruit pn532 #61

Open l337Rooster opened 5 years ago

l337Rooster commented 5 years ago

Hello, I have build mfoc and libnfc, and the example programs with libnfc seem to be working, however I get the "No NFC device found with mfoc". Any advice here would be appreciated. Is there some specific output I should share?

Am I perhaps not getting the correct config or building libnfc improperly? Is mfoc not detecting its configuration? (I can successfully run their ./examples/nfc-poll program to detect an nfc card)

(For some context, I was getting this error before with libnfc, but then I followed the instructions in the last post here by webnology.ch by on nov 19, 2013.) Which I used to build libnfc: `$ sudo apt-get install autoconf automake libtool $ sudo apt-get install libusb-0.1-4 libusb-dev libpcsclite1 libpcsclite-dev libccid pcscd $ sudo apt-get install git $ sudo git clone https://code.google.com/p/libnfc/ $ cd libnfc $ mkdir /etc/nfc $ mkdir /etc/nfc/devices.d/ $ sudo nano /etc/nfc/devices.d/pn532_via_uart2usb.conf

paste the following 5 lines into the pn532_via_uart2usb.conf:

Typical configuration file for PN532 board (ie. microbuilder.eu / Adafruit) device

name = "Adafruit PN532 board via UART" connstring = pn532_uart:/dev/ttyUSB0 allow_intrusive_scan = true log_level = 3

$ sudo autoreconf -vis $ ./configure --prefix=/usr --with-drivers=pn532_uart --sysconfdir=/etc $ sudo make clean $ sudo make $ sudo make install all

plugin ure ftdi usb

$ cd examples $ sudo ./nfc-poll`

I rebuilt mfoc after getting the libnfc examples to work,

This is how I am build mfoc on my linux PC. `

git clone https://github.com/nfc-tools/mfoc && cd mfoc

Then, we start the installation in the same way:

autoreconf -vis

./configure --with-drivers=pn532_uart --enable-serial-autoprobe

sudo make clean all

sudo make

sudo make install`

This is what happens when I run mfoc mfoc -P 500 -O dump_first_try.dmp No NFC device found.

doccaz commented 5 years ago

Unload the modules first and the device should be available for mfoc.

sudo modprobe -r pn533_usb 
sudo modprobe -r pn533
sudo modprobe -r nfc