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

I can't find my Ledger Nano S smartcard with pcsc_scan #32

Closed
ghost opened this issue Feb 12, 2020 · 5 comments
Closed

I can't find my Ledger Nano S smartcard with pcsc_scan #32

ghost opened this issue Feb 12, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 12, 2020

I can still load my apps to the device, however I can't generate a hardware wallet.

pscs_scan doesn't find a reader.

I'm using ubuntu 18.04

`chris@chris:~/electroneum$ systemctl status pcscd.socket
Failed to dump process list, ignoring: No such file or directory
● pcscd.socket - PC/SC Smart Card Daemon Activation Socket
Loaded: loaded (/lib/systemd/system/pcscd.socket; enabled; vendor preset: ena
Active: active (running) since Wed 2020-02-12 11:03:13 GMT; 3min 52s ago
Listen: /var/run/pcscd/pcscd.comm (Stream)
CGroup: /system.slice/pcscd.socket

Feb 12 11:03:13 chris systemd[1]: Listening on PC/SC Smart Card Daemon Activatio

The NanoS is device 5:

chris@chris:~/electroneum$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1c4f:0034 SiGma Micro
Bus 001 Device 003: ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
Bus 001 Device 005: ID 2c97:0001
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

libccid is the latest version and I ran the commands you suggested to another user for removing a kernel module.

@LudovicRousseau
Copy link
Owner

This device should work with the CCID driver version 1.4.28 or above.
https://ccid.apdu.fr/ccid/shouldwork.html#0x2C970x0001

Please follow https://ccid.apdu.fr/#support

@ghost
Copy link
Author

ghost commented Feb 12, 2020

$ sudo apt-get install libccid
Reading package lists... Done
Building dependency tree
Reading state information... Done
libccid is already the newest version (1.4.29-1).
The following packages were automatically installed and are no longer required:
gir1.2-geocodeglib-1.0 libldns2 libllvm8 ubuntu-web-launchers
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

@ghost
Copy link
Author

ghost commented Feb 12, 2020

/usr/sbin/pcscd --version
pcsc-lite version 1.8.23.
Copyright (C) 1999-2002 by David Corcoran [email protected].
Copyright (C) 2001-2015 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=/var/run/pcscd configdir=/etc/reader.conf.d

sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee log.txt
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000050 debuglog.c:310:DebugLogSetCategory() Debug options: APDU
00000008 pcscdaemon.c:352:main() Force colored logs
00000066 utils.c:82:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory
00000176 configfile.l:285:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000032 configfile.l:322:DBGetReaderListDir() Skipping non regular file: ..
00000007 configfile.l:361:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000079 configfile.l:322:DBGetReaderListDir() Skipping non regular file: .
00000020 pcscdaemon.c:662:main() pcsc-lite 1.8.23 daemon ready.
00003492 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000120 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000136 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x2C97, PID: 0x0001, path: /dev/bus/usb/001/005
00000003 hotplug_libudev.c:436:HPAddDevice() Adding USB device: Ledger Nano S
00000062 readerfactory.c:1075:RFInitializeReader() Attempting startup of Ledger Nano S [Nano S] (0001) 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000168 readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000028 ifdhandler.c:1961:init_driver() Driver version: 1.4.29
00000361 ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000002 ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000142 ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000002 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:2c97/0001:libudev:0:/dev/bus/usb/001/005
00000002 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:2c97/0001:libudev:0:/dev/bus/usb/001/005
00000023 ccid_usb.c:269:OpenUSBByName() interface_number: 0
00000002 ccid_usb.c:270:OpenUSBByName() usb bus/device: 1/5
00000001 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000345 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000003 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000001 ccid_usb.c:322: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.
00001343 ccid_usb.c:406:OpenUSBByName() Try device: 1/5
00000005 ccid_usb.c:416:OpenUSBByName() vid/pid : 2C97/0001
00000001 ccid_usb.c:483:OpenUSBByName() Checking device: 1/5
00000001 ccid_usb.c:554:OpenUSBByName() Trying to open USB bus/device: 1/5
00000050 ccid_usb.c:613:OpenUSBByName() Can't find a CCID interface on 1/5
00000035 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000092 ccid_usb.c:789:OpenUSBByName() Device not found?
00000004 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
00000004 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:2c97/0001:libudev:0:/dev/bus/usb/001/005)
00000003 readerfactory.c:376:RFAddReader() Ledger Nano S [Nano S] (0001) init failed.
00000005 readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000004 readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Ledger Nano S [Nano S] (0001) 00 00.
00000002 readerfactory.c:987:RFUnloadReader() Unloading reader driver.
00000150 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x2C97, PID: 0x0001, path: /dev/bus/usb/001/005
00000010 hotplug_libudev.c:436:HPAddDevice() Adding USB device: Ledger Nano S
00000031 readerfactory.c:1075:RFInitializeReader() Attempting startup of Ledger Nano S [Nano S] (0001) 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000146 readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000010 ifdhandler.c:1961:init_driver() Driver version: 1.4.29
00000327 ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000002 ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000082 ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000002 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:2c97/0001:libudev:1:/dev/bus/usb/001/005
00000002 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:2c97/0001:libudev:1:/dev/bus/usb/001/005
00000004 ccid_usb.c:269:OpenUSBByName() interface_number: 1
00000001 ccid_usb.c:270:OpenUSBByName() usb bus/device: 1/5
00000001 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000287 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau ([email protected])
00000010 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000001 ccid_usb.c:322: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.
00001686 ccid_usb.c:406:OpenUSBByName() Try device: 1/5
00000005 ccid_usb.c:416:OpenUSBByName() vid/pid : 2C97/0001
00000002 ccid_usb.c:483:OpenUSBByName() Checking device: 1/5
00000001 ccid_usb.c:554:OpenUSBByName() Trying to open USB bus/device: 1/5
00000028 ccid_usb.c:613:OpenUSBByName() Can't find a CCID interface on 1/5
00000033 ccid_usb.c:189:close_libusb_if_needed() libusb_exit
00000044 ccid_usb.c:789:OpenUSBByName() Device not found?
00000003 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
00000003 readerfactory.c:1106:RFInitializeReader() Open Port 0x200000 Failed (usb:2c97/0001:libudev:1:/dev/bus/usb/001/005)
00000001 readerfactory.c:376:RFAddReader() Ledger Nano S [Nano S] (0001) init failed.
00000002 readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000001 readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Ledger Nano S [Nano S] (0001) 00 00.
00000001 readerfactory.c:987:RFUnloadReader() Unloading reader driver.
00000096 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000072 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0461, PID: 0x0010, path: /dev/bus/usb/001/003
00000071 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0461, PID: 0x0010, path: /dev/bus/usb/001/003
00000061 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000078 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1C4F, PID: 0x0034, path: /dev/bus/usb/001/004
00000109 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/002/001

@ghost
Copy link
Author

ghost commented Feb 12, 2020

Also I don't know if it helps you, but I did this too which is reccomended by Ledger:

/etc/libccid_Info.plist:

add 0x2C97 under ifdVendorID
add 0x0001 under ifdProductID</key
add Ledger Token under ifdFriendlyName

This results in me having two entries of 0x2C97, two entries of 0x0001, and one entry of Ledger Token. (I've researched that double entries are ok -even required).

@ghost
Copy link
Author

ghost commented Feb 12, 2020

Never matter. It's fixed. PCSC is no longer required for the version of the app I was using. It was a case of missing dependencies in a readme. Thanks for your help.

@ghost ghost closed this as completed Feb 12, 2020
This issue was closed.
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