Closed GoogleCodeExporter closed 9 years ago
I cant reproduce this bug myself...
Original comment by romu...@libnfc.org
on 28 Jan 2013 at 3:29
Just to add some doc:
* With a ACR122U I've also TX:6b/RX:83 (PCSC Escape) frames but I don't have
any problem.
* With a Touchatag I've TX:6f/RX:80 (PCSC Transmit) frames and I have the same
kind of bug but only once every two tests:
$ nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc2
NFC device: / CCID USB Reader opened
$ nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc2
error libnfc.driver.acr122_usb Too small reply
nfc-list: ERROR: Unable to open NFC device: acr122_usb:002:036
$ nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc2
NFC device: / CCID USB Reader opened
$ nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc2
error libnfc.driver.acr122_usb Too small reply
nfc-list: ERROR: Unable to open NFC device: acr122_usb:002:036
$ nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc2
NFC device: / CCID USB Reader opened
Full trace of a failure:
$ LIBNFC_LOG_LEVEL=3 nfc-list
info libnfc.config Unable to open file: /etc/nfc/libnfc.conf
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
nfc-list uses libnfc libnfc-1.7.0-rc2
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb device found: Bus 002 Device 031 Name Touchatag
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:002:031"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 13 00 00 00 00 00 00 00 00 3b
be 96 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6f 05 00 00 00 00 00 00 00 00 ff
00 51 00 00
debug libnfc.driver.acr122_usb RX: 80 02 00 00 00 00 00 00 00 00 63
00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6f 07 00 00 00 00 00 00 00 00 ff
00 00 00 02 d4 02
debug libnfc.driver.acr122_usb RX: 80 02 00 00 00 00 00 00 00 00 63
01
debug libnfc.driver.acr122_usb TX: 6f 05 00 00 00 00 00 00 00 00 ff
c0 00 00 01
debug libnfc.driver.acr122_usb RX: 80 01 00 00 00 00 00 00 00 00 d5
error libnfc.driver.acr122_usb Too small reply
debug libnfc.general Unable to open "acr122_usb:002:031".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:002:031
Original comment by yob...@gmail.com
on 29 Jan 2013 at 11:13
This issue was closed by revision 5446242094ab.
Original comment by yob...@gmail.com
on 30 Jan 2013 at 12:27
This fixed the problem with my touchatag, please confirm with yours.
Original comment by yob...@gmail.com
on 30 Jan 2013 at 12:28
I still get "too small reply" with my Touchatag reader. Verbose logfile
attached.
# nfc-list
nfc-list uses libnfc
NFC device: ACS ACR122U 00 00 / ACR122U103 opened
error libnfc.driver.acr122_usb Too small reply
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:007
# dpkg -l libnfc4 | grep ^ii
ii libnfc4:amd64 1.7.0~rc4-0ppa1 amd64 Near Field Communication (NFC)
library
# LIBNFC_LOG_LEVEL=3 nfc-list 2> /tmp/too-small-reply.log
nfc-list uses libnfc
NFC device: ACS ACR122U 00 00 / ACR122U103 opened
Original comment by jdthood
on 5 Feb 2013 at 1:53
Attachments:
Original comment by yob...@gmail.com
on 5 Feb 2013 at 11:16
Please use only one of the two acr122 drivers, either acr122_usb (preferred) or
acr122_pcsc.
If you use acr122_usb and have sometimes errors, better to stop pcscd or to
remove acr122 from libccid detection list to avoid any conflict.
I've re-opened the issue, just in case...
Original comment by yob...@gmail.com
on 5 Feb 2013 at 11:20
Romuald, maybe we should do something to prevent people to activate both
drivers simultaneously??
Original comment by yob...@gmail.com
on 5 Feb 2013 at 11:22
Issue 224 has been merged into this issue.
Original comment by yob...@gmail.com
on 7 Feb 2013 at 11:42
still the same error (with turning off acr122_pcsc in compile) on nfc-poll:
#sudo nfc-poll
nfc-poll uses libnfc libnfc-1.7.0-rc4
NFC reader: ACS / ACR122U PICC Interface opened
NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations)
error libnfc.driver.acr122_usb Too small reply
nfc_initiator_poll_target: Input / Output Error
#dpkg -l libnfc4 | grep ^ii
ii libnfc4:amd64 1.7.0~rc3-1 amd64 Near Field Communication (NFC) library
#sudo LIBNFC_LOG_LEVEL=3 nfc-poll 2> too-small-replay.log
nfc-poll uses libnfc libnfc-1.7.0-rc4
NFC reader: ACS / ACR122U PICC Interface opened
NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations)
BUT nfc-list is ok:
#sudo nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc4
NFC device: ACS / ACR122U PICC Interface opened
Original comment by peter.bu...@gmail.com
on 8 Feb 2013 at 11:15
Attachments:
That's not the same problem...
In short answer:
nfc-poll can not work on ACR122U
In long answer:
ACR122 is a device that have a front MCU that does CCID compliance and a PN532
as RFID/NFC modem.
With libnfc, we drive directly PN532 by using CCID escape sequence.
When we try to do a nfc-poll, we start polling on PN532 but if front MCU have
no reply within 5 sec, it cancel command and reset PN532. So, nfc-poll cannot
run on ACR122.
As we said, ACR122 is not a good product to use NFC with libnfc...
Original comment by neomil...@gmail.com
on 14 Feb 2013 at 1:21
Could you confirm this message on nfc-poll comes after around 5 sec ?
Original comment by romu...@libnfc.org
on 14 Feb 2013 at 2:30
I can confirm the 5 sec for ACR122U.
Original comment by peter.bu...@gmail.com
on 14 Feb 2013 at 3:22
Ok, so I'll set this issue to fixed as the first reported issue here is fixed...
I think its possible to do some work to enable ACR122 polling in libnfc, but
that's not a few minutes question...
I think this need to hack polling method to cut polling in 4 seconds long
passes... Patches are welcome.
Original comment by romu...@libnfc.org
on 14 Feb 2013 at 7:16
> better to stop pcscd or to remove acr122 from libccid detection list to
avoid any conflict.
Hi. Can you please point me to documentation (if there is any, e.g., in one of
the wikis) about how to change the libccid detection list and/or deactivate one
or another driver?
Original comment by jdthood
on 14 Feb 2013 at 8:23
> Hi. Can you please point me to documentation (if there is any, e.g., in one
of the wikis) about how to change the libccid detection list and/or deactivate
one or another driver?
Changing the libccid list of supported readers is not documented. But is easy:
1. get the libccid source code
2. edit the file readers/supported_readers.txt
3. remove the line with the VID/PID of the reader you want to disable
4. reinstall the libccid driver, or just the regenerated src/Info.plist
Original comment by ludovic....@gmail.com
on 15 Feb 2013 at 8:29
easy:
Thanks � added to the libnfc wiki.
Original comment by jdthood
on 15 Feb 2013 at 8:38
The "Too small reply" problem for acr122_usb seems to be happening again with
the latest sources:
pi@raspberrypi:~/libnfc$ sudo ./utils/nfc-list
info libnfc.config Unable to open file:
/home/pi/local/packages/libnfc-1.7.0-rc6/etc/nfc/libnfc.conf
debug libnfc.config Unable to open directory:
/home/pi/local/packages/libnfc-1.7.0-rc6/etc/nfc/devices.d
unknown libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
/home/pi/libnfc/utils/.libs/lt-nfc-list uses libnfc libnfc-1.7.0-rc6-81-g542622a
debug libnfc.driver.acr122_usb device found: Bus 001 Device 006 Name ACS ACR122
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:001:006"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 02 00 00 00 00 00 00 81 00 3b 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6b 00 00 00 05 00 00 00 00 00 ff 00 51 00 00
debug libnfc.driver.acr122_usb RX: 83 02 00 00 00 00 00 00 81 00 63 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6b 00 00 00 07 00 00 00 00 00 ff 00 00 00 02
d4 02
debug libnfc.driver.acr122_usb RX: 83 02 00 00 00 00 00 00 81 00 63 00
error libnfc.driver.acr122_usb Too small reply
debug libnfc.general Unable to open "acr122_usb:001:006".
lt-nfc-list: ERROR nfc-list.c:128
lt-nfc-list: Unable to open NFC device: acr122_usb:001:006
pi@raspberrypi:~/libnfc$ git rev-parse HEAD
542622a2f55c2c7147b8819f92e13580713bef09
Original comment by niall.sm...@gmail.com
on 24 Mar 2013 at 4:42
Same problem with latest git:
# LIBNFC_LOG_LEVEL=3 nfc-list
info libnfc.config Unable to open file: /etc/nfc/libnfc.conf
debug libnfc.config Unable to open directory: /etc/nfc/devices.d
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
nfc-list uses libnfc libnfc-1.7.0-rc6-84-g3eb1ee3
debug libnfc.driver.acr122_usb device found: Bus 003 Device 006 Name Touchatag
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:003:006"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 13 00 00 00 00 00 00 00 00 3b be 96 00 00
41 03 00 00 00 00 00 00 00 00 00 02 90 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6f 00 00 00 05 00 00 00 00 00 ff 00 51 00 00
debug libnfc.driver.acr122_usb RX: 80 00 00 00 00 00 00 40 01 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6f 00 00 00 07 00 00 00 00 00 ff 00 00 00 02
d4 02
debug libnfc.driver.acr122_usb RX: 80 00 00 00 00 00 00 40 01 00
error libnfc.driver.acr122_usb Wrong reply
debug libnfc.general Unable to open "acr122_usb:003:006".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:003:006
# LIBNFC_LOG_LEVEL=3 nfc-list
info libnfc.config Unable to open file: /etc/nfc/libnfc.conf
debug libnfc.config Unable to open directory: /etc/nfc/devices.d
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
nfc-list uses libnfc libnfc-1.7.0-rc6-84-g3eb1ee3
debug libnfc.driver.acr122_usb device found: Bus 003 Device 007 Name ACS ACR122
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:003:007"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 02 00 00 00 00 00 00 81 00 3b 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6b 00 00 00 05 00 00 00 00 00 ff 00 51 00 00
debug libnfc.driver.acr122_usb RX: 83 02 00 00 00 00 00 00 81 00 63 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6b 00 00 00 07 00 00 00 00 00 ff 00 00 00 02
d4 02
debug libnfc.driver.acr122_usb RX: 83 02 00 00 00 00 00 02 81 00 63 00
error libnfc.driver.acr122_usb Too small reply
debug libnfc.general Unable to open "acr122_usb:003:007".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:003:007
Original comment by alx...@gmail.com
on 29 Mar 2013 at 1:08
Could you all check if latest commit fixed this problem for you?
Thanks!
Original comment by yob...@gmail.com
on 30 Mar 2013 at 4:56
Still not working.
$ LIBNFC_LOG_LEVEL=3 nfc-list
debug libnfc.config key: [allow_autoscan], value: [true]
debug libnfc.config key: [device.connstring], value:
[pn532_uart:/dev/tty.NearFieldBridge-DevB]
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 1 device(s) defined by user
debug libnfc.general #0 name: "", connstring:
"pn532_uart:/dev/tty.NearFieldBridge-DevB"
nfc-list uses libnfc libnfc-1.7.0-rc7-2-g0841a94
debug libnfc.driver.acr122_usb device found: Bus 250 Device 006 Name ACS ACR122
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.pn532_uart Attempt to open: /dev/tty.NearFieldBridge-DevB
at 115200 bauds.
error libnfc.driver.pn532_uart Invalid serial port:
/dev/tty.NearFieldBridge-DevB
debug libnfc.general Unable to open "pn532_uart:/dev/tty.NearFieldBridge-DevB".
nfc-list: ERROR: Unable to open NFC device:
pn532_uart:/dev/tty.NearFieldBridge-DevB
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:250:006"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 13 00 00 00 00 00 00 00 00 3b be 95 00 00
41 03 00 00 00 00 00 00 00 00 00 02 90 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6b 05 00 00 00 00 00 00 00 00 ff 00 51 00 00
debug libnfc.driver.acr122_usb RX: 83 00 00 00 00 00 00 40 05 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6b 07 00 00 00 00 00 00 00 00 ff 00 00 00 02
d4 02
debug libnfc.driver.acr122_usb RX: 83 00 00 00 00 00 00 40 07 00
error libnfc.driver.acr122_usb Too small reply
debug libnfc.general Unable to open "acr122_usb:250:006".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:250:006
Is there anything I can do to work out what is wrong?
Original comment by t...@jin.me.uk
on 13 Apr 2013 at 8:19
still same problem here
sudo LIBNFC_LOG_LEVEL=3 ./nfc-list
info libnfc.config Unable to open file: /usr/local/etc/nfc/libnfc.conf
debug libnfc.config Unable to open directory: /usr/local/etc/nfc/devices.d
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
/home/parallels/Workspace/libnfc/libnfc/utils/.libs/lt-nfc-list uses libnfc
libnfc-1.7.0-rc7-16-gf0471eb
debug libnfc.driver.acr122_usb device found: Bus 002 Device 015 Name ACS ACR122
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from
"acr122_usb:002:015"
debug libnfc.driver.acr122_usb TX: 62 00 00 00 00 00 00 01 00 00
debug libnfc.driver.acr122_usb RX: 80 13 00 00 00 00 00 00 00 00 3b be 95 00 00
41 03 00 00 00 00 00 00 00 00 00 02 90 00
debug libnfc.driver.acr122_usb ACR122 PICC Operating Parameters
debug libnfc.driver.acr122_usb TX: 6b 05 00 00 00 00 00 00 00 00 ff 00 51 00 00
debug libnfc.driver.acr122_usb RX: 83 00 00 00 00 00 00 40 05 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.driver.acr122_usb TX: 6b 07 00 00 00 00 00 00 00 00 ff 00 00 00 02
d4 02
debug libnfc.driver.acr122_usb RX: 83 00 00 00 00 00 00 40 07 00
error libnfc.driver.acr122_usb Too small reply
debug libnfc.general Unable to open "acr122_usb:002:015".
lt-nfc-list: ERROR: Unable to open NFC device: acr122_usb:002:015
Original comment by jelmer.t...@gmail.com
on 13 Jun 2013 at 10:48
Original comment by romu...@libnfc.org
on 13 Jun 2013 at 11:56
Please check latest commit as a few changes have been made.
With my devices all I get now is at rare occasions a failure at initialization
and an automatic retry, which gives when opening the device:
error libnfc.driver.acr122_usb PN532 didn't reply
error libnfc.driver.acr122_usb PN532 init failed, trying again...
NFC reader: ACS / ACR122U PICC Interface opened
This happens very rarely, both for ACR122U and for Touchatag.
What's your experience?
Thanks for your feedback.
Original comment by yob...@gmail.com
on 14 Jun 2013 at 11:05
That fixed it for me!
note that I have a Touchatag branded reader and a Tikitag branded one. The
tikitag worked all along but the touchatag gave the "too small reply" error. I
presume the tikitag ones have a newer firmware version.
But now all my readers work, thanks.
Original comment by jelmer.t...@gmail.com
on 15 Jun 2013 at 11:23
Thanks for the feedback.
I will close this bugreport.
Maybe some people will still get problems but anyways the faulty behavior will
be quite different so better to open a new bugreport if needed.
Original comment by yob...@gmail.com
on 15 Jun 2013 at 10:26
Original issue reported on code.google.com by
schma...@googlemail.com
on 9 Jan 2013 at 12:31