nfcpy and ACR122

Asked by Michael_r52

Hi,
I'm trying to use nfcpy with ACS ACR122u reader, but get USB errors.
I have added:
     supported_devices.append((0x072f,0x2200)) # ACS
and changed output and input endpoints to:
        self.usb_out = intf[0].endpoints[1].address
        self.usb_inp = intf[0].endpoints[2].address
(because ACR reader interface has 3 endpoints descriptors:
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 2
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x02 EP 2 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
)
After that inp/out are the following: self.usb_out=2 self.usb_inp:130

The following exception appears:
Exception usb.USBError: 'No error' (on any self.dh.bulkWrite() command)
I tried to add 'except usb.USBError: return None', to avoid it, anyway there is no any response from the reader.

Am I doing something wrong? Is ACR122 really not supported?
Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#1

As far as I know the ACR 122 requires a pc/sc stack for communication and this is not supported by nfcpy. Well working readers are the Sony RC-S 330/60/70 and SCM SCL3711. A reader sold as part of a Stollmann development kit does also work but is not really an end-user product. Some reported that an APPUSB from Arygon should work as well but I don't know this reader myself..

Revision history for this message
Richard Grundy (richard-p7) said :
#2

Has anyone worked on implementing support for PC/SC interfaces on nfcpy?? Seems like it would be an interesting project and expand the reach of the code base... what are the main challenges here?

Revision history for this message
Bartosz Woronicz (mastier1) said :
#3

@richard-p7: I think you'd find interest in this : http://code.google.com/p/pynfc/

Revision history for this message
Richard Grundy (richard-p7) said :
#4

thanks lol24h, I checked out that project before but their codebase is kinda thrown together and tough to read. I'm just reimplementing the PCSC interface over the nfcpy baseline... it's not too much code, I should have something today.

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#5

Richard, would be fantastic if you then push the branch to launchpad.
/Stephen

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#6

ACR122U is now supported in trunk. Beware that listening for p2p connection can't work with a timeout, the listen period is always 5 seconds dictated by the reader's mcu.

Revision history for this message
Richard Grundy (richard-p7) said :
#7

Took me a month to get this done, but I pushed it anyway... lp:~richard-p7/nfcpy/pcsc

Stephen's version is much more complete and robust so I'll be merging into that, but I wanted to capture my work anyway.

Can you help with this problem?

Provide an answer of your own, or ask Michael_r52 for more information if necessary.

To post a message you must log in.