coinkite / coinkite-tap-proto

SATSCARD and TAPSIGNER from Coinkite
https://dev.coinkite.cards
Other
50 stars 18 forks source link

observations: ACS ACR122U on linux works reliably #37

Closed tapmybtc closed 1 year ago

tapmybtc commented 1 year ago

I'm not sure why the ACS ACR122U is listed as not recommended. Thus, I'm not ready to update the README.md, but I wanted to leave these notes for later.

On Ubuntu 22.04.1 LTS, I was able to get this reader working quickly and reliably (after a few second initial startup that culminates with the reader's light illuminating) with SATSCARD.

The following two links helped overcome the Can't claim interface LIBUSB_ERROR_BUSY errors displayed while running pcscd --foreground --debug. https://stackoverflow.com/a/33790442 https://wiki.archlinux.org/title/Touchatag_RFID_Reader

In summary, if you plug in the reader, and then see the following modules loaded when you run:

> lsmod | grep -i pn533
pn533_usb              20480  0
pn533                  45056  1 pn533_usb
nfc                   122880  1 pn533

Then you can run sudo modprobe -r pn533_usb and restart pcscd to get a temporary fix. Or, you can add a blacklist like the following when run as root: echo 'blacklist pn533_usb' > /etc/modprobe.d/blacklist-nfc.conf

I verified that this works with the drivers: pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so version 1.1.8 and pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so version 1.5.0

> lsusb -v -d '072f:'

Bus 003 Device 024: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x072f Advanced Card Systems, Ltd
  idProduct          0x2200 ACR122U
  bcdDevice            2.07
  iManufacturer           1 ACS
  iProduct                2 ACR122U PICC Interface
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x005d
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    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 
        dwProtocols             2  T=1
        dwDefaultClock       4000
        dwMaxiumumClock      4000
        bNumClockSupported      0
        dwDataRate          10752 bps
        dwMaxDataRate      250000 bps
        bNumDataRatesSupp.      0
        dwMaxIFSD             256
        dwSyncProtocols  00000000 
        dwMechanical     00000000 
        dwFeatures       00020040
          Auto parameter negotiation made by CCID
          Short APDU level exchange
        dwMaxCCIDMsgLen       271
        bClassGetResponse      00
        bClassEnvelope         00
        wlcdLayout           none
        bPINSupport             0 
        bMaxCCIDBusySlots       1
      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              50
      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               1
      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               1
Device Status:     0x0000
  (Bus Powered)
tapmybtc commented 1 year ago

Closing since I don't think this is actionable as-is. Hopefully the notes help someone though.