Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software doesn't work on Ubuntu 22.04 but works fine on 20.04 #146

Closed
Fossil01 opened this issue Aug 23, 2022 · 1 comment
Closed

Software doesn't work on Ubuntu 22.04 but works fine on 20.04 #146

Fossil01 opened this issue Aug 23, 2022 · 1 comment

Comments

@Fossil01
Copy link

Fossil01 commented Aug 23, 2022

Versions

  • smart card reader driver name and version: None, should be included in OS. See below:
# apt-cache show libacsccid1
Package: libacsccid1
Architecture: amd64
Version: 1.1.8-1
  • pcsc-lite version: 1.9.5
  • --version Output:

pcsc-lite version 1.9.5. Copyright (C) 1999-2002 by David Corcoran <[email protected]>. Copyright (C) 2001-2018 by Ludovic Rousseau <[email protected]>. Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>. Report bugs to <[email protected]>. Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d

Platform

  • OS: Ubuntu 22.04 LTS amd64
  • Smart card middleware name and version: ?
  • Reader Advanced Card Systems, Ltd ACR122U
  • Card Type: Mifare 4K

Issue

  • What do you do?
    We have our own small software program that takes the card data from pcscd and provides the UID to a webapp over a local websocket.

  • What result do you get instead?
    Nothing. The card data seems not to be read. When I run pcsc_scan and present a card it lseems to work fine, but in syslog I see the following pcscd[848]: 00000000 ifdhandler.c:754:IFDHSetProtocolParameters() Protocol T=0 not supported by reader and our own application acts like a card never got presented.

On Ubuntu 20.04 the pcscd version was 1.8.26, I also tried this version on Ubuntu 22.04 but same errors.

I am not sure where the problem lies exactly so any pointers would be greatly appreciated.

Log

00000000 debuglog.c:299:DebugLogSetLevel() debug level=debug
00000010 debuglog.c:320:DebugLogSetCategory() Debug options: APDU
00000001 [140155096318464] pcscdaemon.c:353:main() Force colored logs
00000018 [140155096318464] utils.c:82:GetDaemonPid() Can't open /run/pcscd/pcscd.pid: No such file or directory
00000045 [140155096318464] configfile.l:293:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000008 [140155096318464] configfile.l:329:DBGetReaderListDir() Skipping non regular file: ..
00000002 [140155096318464] configfile.l:329:DBGetReaderListDir() Skipping non regular file: .
00000001 [140155096318464] configfile.l:369:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000021 [140155096318464] pcscdaemon.c:663:main() pcsc-lite 1.9.5 daemon ready.
00002629 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000094 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000106 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC31C, path: /dev/bus/usb/001/006
00000106 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC31C, path: /dev/bus/usb/001/006
00000091 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000097 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1A86, PID: 0x7523, path: /dev/bus/usb/001/002
00000089 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000097 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x072F, PID: 0x2200, path: /dev/bus/usb/001/003
00000003 [140155096318464] hotplug_libudev.c:441:HPAddDevice() Adding USB device: ACS ACR122U PICC Interface
00000023 [140155096318464] readerfactory.c:1097:RFInitializeReader() Attempting startup of ACS ACR122U PICC Interface 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000119 [140155096318464] readerfactory.c:972:RFBindFunctions() Loading IFD Handler 3.0
00000010 [140155096318464] ifdhandler.c:2071:init_driver() Driver version: 1.5.0
00000441 [140155096318464] ifdhandler.c:2088:init_driver() LogLevel: 0x0003
00000003 [140155096318464] ifdhandler.c:2099:init_driver() DriverOptions: 0x0000
00000149 [140155096318464] ifdhandler.c:2112:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000003 [140155096318464] ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:072f/2200:libudev:0:/dev/bus/usb/001/003
00000002 [140155096318464] ccid_usb.c:252:OpenUSBByName() Reader index: 0, Device: usb:072f/2200:libudev:0:/dev/bus/usb/001/003
00000004 [140155096318464] ccid_usb.c:284:OpenUSBByName() interface_number: 0
00000002 [140155096318464] ccid_usb.c:285:OpenUSBByName() usb bus/device: 1/3
00000001 [140155096318464] ccid_usb.c:317:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000436 [140155096318464] ccid_usb.c:335:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000003 [140155096318464] ccid_usb.c:336:OpenUSBByName() ifdProductString: Generic CCID driver
00000002 [140155096318464] ccid_usb.c:337:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00002210 [140155096318464] ccid_usb.c:421:OpenUSBByName() Try device: 1/3
00000005 [140155096318464] ccid_usb.c:431:OpenUSBByName() vid/pid : 072F/2200
00000001 [140155096318464] ccid_usb.c:502:OpenUSBByName() Checking device: 1/3
00000001 [140155096318464] ccid_usb.c:573:OpenUSBByName() Trying to open USB bus/device: 1/3
00114833 [140155096318464] ccid_usb.c:679:OpenUSBByName() Found Vendor/Product: 072F/2200 (ACS ACR122U PICC Interface)
00000021 [140155096318464] ccid_usb.c:681:OpenUSBByName() Using USB bus/device: 1/3
00000007 [140155096318464] ccid_usb.c:744:OpenUSBByName() bNumDataRatesSupported is 0
00001475 [140155096318464] ccid_usb.c:1473:InterruptRead() before (0), timeout: 100 ms
00017828 [140155096318464] ccid_usb.c:1519:InterruptRead() after (0) (0)
00000029 [140155096318464] NotifySlotChange: 50 02
00000011 [140155096318464] -> 000000 65 00 00 00 00 00 00 00 00 00
00000604 [140155096318464] <- 000000 81 00 00 00 00 00 00 02 81 00
00000025 [140155096318464] -> 000000 65 00 00 00 00 00 01 00 00 00
00000586 [140155096318464] <- 000000 81 00 00 00 00 00 01 02 81 00
00000025 [140155096318464] ifdhandler.c:388:IFDHGetCapabilities() tag: 0xFB3, usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000008 [140155096318464] readerfactory.c:400:RFAddReader() Using the reader polling thread
00000006 [140155096318464] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000010 [140155096318464] -> 000000 65 00 00 00 00 00 02 00 00 00
00000526 [140155096318464] <- 000000 81 00 00 00 00 00 02 02 81 00
00000022 [140155096318464] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000124 [140155096318464] ifdhandler.c:388:IFDHGetCapabilities() tag: 0xFAE, usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000013 [140155096318464] ifdhandler.c:484:IFDHGetCapabilities() Reader supports 1 slot(s)
00000065 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000026 [140155079284288] -> 000000 65 00 00 00 00 00 03 00 00 00
00000572 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000161 [140155079284288] <- 000000 81 00 00 00 00 00 03 02 81 00
00000023 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000009 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000009 [140155079284288] -> 000000 65 00 00 00 00 00 04 00 00 00
00000243 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1B52, PID: 0x4211, path: /dev/bus/usb/001/004
00000393 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000026 [140155079284288] <- 000000 81 00 00 00 00 00 04 02 81 00
00000012 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000009 [140155079284288] ifdhandler.c:317:IFDHPolling() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000007 [140155079284288] ccid_usb.c:1473:InterruptRead() before (0), timeout: 600000 ms
00000403 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC077, path: /dev/bus/usb/001/005
00000698 [140155096318464] hotplug_libudev.c:300:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/002/001
00027320 [140155079284288] ccid_usb.c:1519:InterruptRead() after (0) (0)
00000027 [140155079284288] NotifySlotChange: 50 03
00000011 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000010 [140155079284288] -> 000000 65 00 00 00 00 00 05 00 00 00
00000539 [140155079284288] <- 000000 81 00 00 00 00 00 05 02 81 00
00000021 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000009 [140155079284288] ifdhandler.c:317:IFDHPolling() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000007 [140155079284288] ccid_usb.c:1473:InterruptRead() before (0), timeout: 600000 ms
00031395 [140155079284288] ccid_usb.c:1519:InterruptRead() after (0) (0)
00000027 [140155079284288] NotifySlotChange: 50 02
00000010 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000010 [140155079284288] -> 000000 65 00 00 00 00 00 06 00 00 00
00000569 [140155079284288] <- 000000 81 00 00 00 00 00 06 02 81 00
00000020 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000009 [140155079284288] ifdhandler.c:317:IFDHPolling() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000007 [140155079284288] ccid_usb.c:1473:InterruptRead() before (0), timeout: 600000 ms



<CARD PRESENTED NOW>


18975475 [140155079284288] ccid_usb.c:1519:InterruptRead() after (0) (0)
00000028 [140155079284288] NotifySlotChange: 50 03
00000010 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000009 [140155079284288] -> 000000 65 00 00 00 00 00 07 00 00 00
00000548 [140155079284288] <- 000000 81 00 00 00 00 00 07 00 81 00
00000020 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card present
00000008 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000009 [140155079284288] -> 000000 65 00 00 00 00 00 08 00 00 00
00000529 [140155079284288] <- 000000 81 00 00 00 00 00 08 00 81 00
00000020 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card present
00000009 [140155079284288] ifdhandler.c:1216:IFDHPowerICC() action: PowerUp, usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000010 [140155079284288] -> 000000 62 00 00 00 00 00 09 01 00 00
00001011 [140155079284288] <- 000000 80 14 00 00 00 00 09 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00 00 00 00 69
00000025 [140155079284288] eventhandler.c:406:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000007 [140155079284288] eventhandler.c:423:EHStatusHandlerThread() Card inserted into ACS ACR122U PICC Interface 00 00
00000012 [140155079284288] Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00 00 00 00 69
00000009 [140155079284288] ifdhandler.c:317:IFDHPolling() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0) 5000 ms
00000006 [140155079284288] ccid_usb.c:1473:InterruptRead() before (0), timeout: 5000 ms
00477865 [140155079284288] ccid_usb.c:1519:InterruptRead() after (0) (0)
00000027 [140155079284288] NotifySlotChange: 50 02
00000011 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000010 [140155079284288] -> 000000 65 00 00 00 00 00 0A 00 00 00
00000523 [140155079284288] <- 000000 81 00 00 00 00 00 0A 02 81 00
00000026 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000007 [140155079284288] eventhandler.c:482:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
00000008 [140155079284288] ifdhandler.c:1925:IFDHICCPresence() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000008 [140155079284288] -> 000000 65 00 00 00 00 00 0B 00 00 00
00000535 [140155079284288] <- 000000 81 00 00 00 00 00 0B 02 81 00
00000021 [140155079284288] ifdhandler.c:2051:IFDHICCPresence() Card absent
00000008 [140155079284288] eventhandler.c:358:EHStatusHandlerThread() Card Removed From ACS ACR122U PICC Interface 00 00
00000009 [140155079284288] ifdhandler.c:317:IFDHPolling() usb:072f/2200:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000007 [140155079284288] ccid_usb.c:1473:InterruptRead() before (0), timeout: 600000 ms


<CARD REMOVED>
@Fossil01
Copy link
Author

So I disabled the nfc module yesterday, don't remember why but it looked it was necessary for another device. pcsc_scan kept working so I figured it would be ok.

Just removed nfc from the blacklist and now everything works as intended :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant