xiongxinbobo / libnfc

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

SCL3711 device disappear after a nfc-list #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Plug SCL3711
2. Run nfc-list with a tag (in my case Mifare DESFire)
Note: nfc-list is correctly run and result a good output
3. Re-run nfc-list: "INFO: No device found."
4. Run lsusb, SCM device disappear
5. You can see this in dmesg:
[23680.772016] usb 2-2: reset full speed USB device using uhci_hcd and address 
64
[23680.932173] usb 2-2: device firmware changed
[23680.932411] usb 2-2: USB disconnect, address 64
[23681.044016] usb 2-2: new full speed USB device using uhci_hcd and address 65
[23681.213177] usb 2-2: config index 0 descriptor too short (expected 9, got 0)
[23681.213181] usb 2-2: can't read configurations, error -22
[23681.324012] usb 2-2: new full speed USB device using uhci_hcd and address 66
[23681.493179] usb 2-2: config index 0 descriptor too short (expected 9, got 0)
[23681.493184] usb 2-2: can't read configurations, error -22
[23681.604011] usb 2-2: new full speed USB device using uhci_hcd and address 67
[23681.664178] usb 2-2: config index 0 descriptor too short (expected 9, got 0)
[23681.664182] usb 2-2: can't read configurations, error -22
[23681.776014] usb 2-2: new full speed USB device using uhci_hcd and address 68
[23681.836182] usb 2-2: config index 0 descriptor too short (expected 9, got 0)
[23681.836186] usb 2-2: can't read configurations, error -22
[23681.838179] hub 2-0:1.0: unable to enumerate USB device on port 2

Original issue reported on code.google.com by romu...@libnfc.org on 26 Jul 2010 at 1:19

GoogleCodeExporter commented 9 years ago
May you give the following patch a try?

http://marvin.blogreen.org/~romain/libnfc.diff

According to the libusb-0.1 code, the *BSD init function is empty (ATW I am not 
even sure that it's the code that is actually used in FreeBSD's libusb), but 
the Linux code set up a lot of things and don't setup a "already_initialized" 
flag.  Thus, I am not sure that calling the usb_init() function twice is not a 
problem.

Original comment by romain.t...@gmail.com on 6 Aug 2010 at 10:04

GoogleCodeExporter commented 9 years ago
Add me to Cc

Original comment by romain.t...@gmail.com on 6 Aug 2010 at 10:04

GoogleCodeExporter commented 9 years ago
I've seen the same disappearance before with PN533-USB (in-house device). So I 
try again with current tip of the trunk (r505) and see that it's been fixed. 
Doing bisect I found that the fix was actually introduced in r485.

Original comment by tha...@gmail.com on 9 Aug 2010 at 12:26

GoogleCodeExporter commented 9 years ago
The funny thing about this bug is that the chip only disappears when I nfc-list 
a DESFire tag, no tag or Mifare Classic causes no problem.

Original comment by tha...@gmail.com on 9 Aug 2010 at 12:32

GoogleCodeExporter commented 9 years ago
Fixed in r479 and r519.

Original comment by romu...@libnfc.org on 12 Aug 2010 at 12:52