xiongxinbobo / libnfc

Automatically exported from code.google.com/p/libnfc
0 stars 0 forks source link

"No NFC device found." with touchatag, nfc-list use libnfc 1.5.0 (r1019), Ubuntu 11.04 #172

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. On Ubuntu 11.04, install libusb-dev, libpcsclite-dev and libccid. Download, 
configure, make, sudo make install libnfc-1.5.0.tar.gz, then "sudo ldconfig".
The touchatag is connected and is seen by lsusb: "Bus 002 Device 005: ID 
072f:90cc Advanced Card Systems, Ltd ACR38 SmartCard Reader"
2. nfc-list says "No NFC device found."
3. edited /etc/libccid_Info.plist to change the value at 
<key>ifdDriverOptions</key> from <string>0x0000</string> to 
<string>0x0005</string> (as described on 
http://code.google.com/p/libnfc/issues/detail?id=131)
4. nfc-list still says "No NFC device found."
5. rebooted, nfc-list still says "No NFC device found."

FWIW: the green LED of the Touchatag is blinking once per two seconds.

Expected output is below, which is copy from Ubuntu 10.10, on which everyting 
works OK:

$ nfc-list 
nfc-list use libnfc 1.4.1 (r869)
Connected to NFC device: ACS ACR 38U-CCID 00 00 / ACR122U102 - PN532 v1.4 (0x07)
1 ISO14443A passive target(s) was found:
    ATQA (SENS_RES): 00  02  
       UID (NFCID1): 33  c7  76  6c  
      SAK (SEL_RES): 18  

$ 

What version of the product are you using? On what operating system?
Ubuntu 11.04, with libusb-dev, libpcsclite-dev and libccid installed. Download, 
configure, make, sudo make install libnfc-1.5.0.tar.gz, then "sudo ldconfig".

Any tips very appreciated.

Relevant part from sudo lsusb -vvv

Bus 002 Device 005: ID 072f:90cc Advanced Card Systems, Ltd ACR38 SmartCard 
Reader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x072f Advanced Card Systems, Ltd
  idProduct          0x90cc ACR38 SmartCard Reader
  bcdDevice            1.00
  iManufacturer           1    
  iProduct                2 CCID USB Reader
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           93
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11 Chip/SmartCard
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.00
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V

Original issue reported on code.google.com by sander.j...@gmail.com on 24 Sep 2011 at 11:45

GoogleCodeExporter commented 9 years ago
FWIW: here's the exact output of nfc-list:

sander@R540:~$ nfc-list 
nfc-list use libnfc 1.5.0 (r1019)
No NFC device found.
sander@R540:~$ 

sander@R540:~$ sudo nfc-list 
nfc-list use libnfc 1.5.0 (r1019)
No NFC device found.
sander@R540:~$ 

sander@R540:~$ 
sander@R540:~$ lsusb 
Bus 002 Device 005: ID 072f:90cc Advanced Card Systems, Ltd ACR38 SmartCard 
Reader
Bus 002 Device 004: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel 
Mouse
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1210:25f4 DigiTech 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
sander@R540:~$ 

sander@R540:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
sander@R540:~$ 

Original comment by sander.j...@gmail.com on 24 Sep 2011 at 12:01

GoogleCodeExporter commented 9 years ago
Just to be sure, I repeated the plaing install procedure on Ubuntu 10.10, and 
nfc-list indeed works there. So there's something in Ubuntu 11.04 or it's 
libraries that prohibits correct functioning ...

ubuntu@ubuntu:~$ nfc-list 
nfc-list use libnfc 1.5.0 (r1019)
Connected to NFC device: ACS ACR 38U-CCID 00 00 / ACR122U102 - PN532 v1.4 (0x07)
1 ISO14443A passive target(s) found:
    ATQA (SENS_RES): 00  02  
       UID (NFCID1): 83  55  70  e7  
      SAK (SEL_RES): 18  

ubuntu@ubuntu:~$ 

ubuntu@ubuntu:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
ubuntu@ubuntu:~$ 

Generic install procedure on Ubuntu (and probably Debian), with universe and 
multiverse activated:

sudo apt-get install libusb-dev libpcsclite-dev libccid
wget http://libnfc.googlecode.com/files/libnfc-1.5.0.tar.gz
tar xvzf libnfc-1.5.0.tar.gz
cd libnfc-1.5.0/
./configure
make
sudo make install
sudo ldconfig

Original comment by sander.j...@gmail.com on 24 Sep 2011 at 1:05

GoogleCodeExporter commented 9 years ago
I might wrong with my above issue report:

After installing pcscd, and a reboot, and some waiting (for pcscd to come up?), 
nfc-list is working correct:

ubuntu@ubuntu:~$ nfc-list 
nfc-list use libnfc 1.5.0 (r1019)
Connected to NFC device: ACS ACR 38U-CCID 00 00 / ACR122U102 - PN532 v1.4 (0x07)
ubuntu@ubuntu:~$

And libccid seems NOT to be needed. And no tweaking to the mentioned config 
file.

Check for pcscd running:

ubuntu@ubuntu:~$ ps -ef | grep pcscd
ubuntu   14751     1  0 15:57 ?        00:00:00 pcscd --auto-exit
ubuntu   14760 14608  0 15:58 pts/0    00:00:00 grep --color=auto pcscd
ubuntu@ubuntu:~$

Original comment by sander.j...@gmail.com on 24 Sep 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Hello,

Yep, pcscd is a requierement as written here:
http://www.libnfc.org/documentation/installation#debian_ubuntu

As many users come with this invalid issue, I added a sentence in README in 
r1146.

Original comment by romu...@libnfc.org on 29 Sep 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Thanks for your confirmation.

I have a question: without pcscd installed/running, the command nfc-list says 
"No NFC device found.", which confused me because the touchatag reader was 
connected. My question is: could nfc-list make a difference between 'no 
nfc-device found' and 'no pcscd found'? That would have been more helpful more 
me.

Original comment by sander.j...@gmail.com on 29 Sep 2011 at 10:42

GoogleCodeExporter commented 9 years ago
About your suggestion, to turn "No NFC device found" in "No pcscd found" when 
that's the problem, we can't do it due to several reasons (some are explained 
here):
1) Under Windows there no pcscd, so the message could be disturbing for Windows 
users.
2) The message "No NFC device found" is reported by the nfc-list example not by 
the library itself. (libraries should not print on stdout/stderr BTW).
3) An PCSC error exception could not be send throw libnfc: libnfc is not 
"directly" related to PCSC, that's only ACR122 driver that can fail this way 
(PCSC is ONLY a requirement for ACR122).

BTW, your remark is actually good, so I raise up the level (from TRACE to WARN) 
of "PCSC context not found" message that is sent to the logger when ACR122 
attempt to probe devices.
So, if you enable the loggin system (which depends on log4c) a more 
appropriated message is shown (r1148):
"PCSC context not found (make sure PCSC daemon is running)."

Thanks.

Original comment by romu...@libnfc.org on 29 Sep 2011 at 12:08

GoogleCodeExporter commented 9 years ago
Hi,
Its great to see all your suggestions.
I am having the problem with " RFID NFC device  " .
am using ubuntu-11.04, device manufacturer is MStar Semiconductors i,e MSR3100 
in my device.
When i give the command nfc-list, giving as NO NFC Device found.
when i saw dmesg its like "couldn't able to find input interrupt end point".

Can any one help me to resolve this issue...

Original comment by bachinav...@gmail.com on 1 Dec 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Your device (MStar Semiconductors i,e MSR3100) is not a supported device.

Original comment by romu...@libnfc.org on 1 Dec 2011 at 3:46