Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot detect reader #16

Open
lesbeben opened this issue Apr 10, 2015 · 7 comments
Open

Cannot detect reader #16

lesbeben opened this issue Apr 10, 2015 · 7 comments

Comments

@lesbeben
Copy link

Hi,

I apologize in advance for posting this here, there just does not seem to be a forum dedicated to rfidiot.

I'm starting a project for an NFC toolkit GUI based on rfidiot, but I cannot seem to make it detect my reader (a PN533-based Ask LoGo). I thought rfidiot was based on libnfc, but nfc-list can access my reader without trouble, whereas rfidiot gives me:
"There is no such reader #0, PCSC sees only 0 reader(s)".

I'm using libnfc 1.7.0 in a Kali Linux VM, running in VMWare, my C programs based on libnfc work perfectly on it.

When I try using the VMWare CCID driver instead of the libnfc one, rfidiot detects my reader but is still unable to select any card I present.

Any thoughts on that? Is this a compatibility issue with the newest API? Should I downgrade to libnfc 1.6 ?

Sorry and thank you!

@kirelagin
Copy link

Well, judging by PCSC in your output, I’d guess you don’t actually tell RFIDIOt to use libnfc.
What does running with -N output?

@kirelagin
Copy link

Ah, I assumed you were using one of RFIDIOt example tools. If you are talking to the rfidiot class directly, then the reader option is your friend.

If you study the rfidiot class you’ll notice that the error you are referring to is output only

if self.readertype == self.READER_PCSC`

@lesbeben
Copy link
Author

Actually it was both...
I feel stupid, I don't know why I was under the impression that rfidiot was built on top of libnfc.
Anyway, thanks for your answer, I tried readtag.py -N, I now get:

"error libnfc.driver.pn53x_usb Unable to set USB configuration (Device or resource busy)
LibNFC ver 1.7.0 devices (0):
no supported devices!"

when nfc-list gives me:
"nfc-list uses libnfc 1.7.0
NFC device: ASK / LoGO opened
1 ISO14443A passive target(s) found:
ISO/IEC 14443A (106 kbps) target:"
Etc...

Do you have any idea why this could happen?

@lesbeben
Copy link
Author

Also, when I run an rfidiot script, my reader's LEDs turn on and stay on, at least until I run some other tool, such as nfc-list.

@kirelagin
Copy link

Hm…

  1. Does your nfc reader have proper permissions for you to access it? I mean, if you can use nfc-list, it probably does… but are you running nfc-list and RFIDIOt scripts as the same user? Might it be that nfc-list is setuid or something?
  2. libnfc is known to interfere with certain kernel nfc modules, so check that they are not loaded (lsmod | grep nfc and lsmod | grep pn53). Well, since nfc-list works, again, this is probably not the case, but I don’t have any other ideas.

@lesbeben
Copy link
Author

I'm sudoing both programs, so they are both running with root privileges.

lsmod shows no nfc or pn53 module loaded, before or after running 'nfc-list' or 'script.py -N'.

The weirdest thing is, the rfidiot scripts are actually communicating with my reader, since running them puts it in 'read mode' (two green lights on) however, they still output

"error libnfc.driver.pn53x_usb Unable to set USB configuration (Device or resource busy)"

and the reader is then stuck until I unplug it or until I run 'nfc-list'.

I have yet to try the reader option you mentionned in my own program, but I figured since the rfidiot-provided scripts won't run, I should focus on that before moving on to more complicated issues.

Thanks again for your help, I'll look into it and come back if I ever find something relevant!

Cheers.

@niklasent
Copy link

niklasent commented Aug 31, 2020

I know that it's a bit late (>5 years) but did you solve the issue?
I encounter the same problem now. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants