I recently got a card reader for the nPA (new German identification card). SCM Microsystems provides a binary x86 and amd64 driver for pcsc-lite. I wrote a small ebuild for it to ease installation. I'll attach it and it is also available in my overlay: http://cgit.freedesktop.org/~cbrill/egore911-overlay Reproducible: Always
Created attachment 265339 [details] scl011-bin-2.06.ebuild
Created attachment 265341 [details] SCM-MICRO necessary license file
@base-system / @crypto: Anyone interested in this package?
@base-system: Sorry for the noise but I misread the metadata for pcsc-lite.
I think this needs at least an udev file to set the proper permission on the device or it won't work with modern pcsc-lite at least when starting pcscd as a service. Christoph do you feel like being the proxy maintainer? It really isn't the kind of package that we can deal with without the hardware unfortunately; that's why I keep hardware around just to test this stuff. License team can you please verify the license as well? Thanks.
Comment on attachment 265341 [details] SCM-MICRO (In reply to comment #5) > License team can you please verify the license as well? I think that the license should be added to the @EULA group. And by clause 3 of the license, the ebuild needs RESTRICT="mirror bindist".
(In reply to comment #5) > I think this needs at least an udev file to set the proper permission on the > device or it won't work with modern pcsc-lite at least when starting pcscd as a > service. I plugged in the device and started pcscd manually, worked flawless. Having a udev rule tarting pcscd would be much better though. > Christoph do you feel like being the proxy maintainer? It really isn't the kind > of package that we can deal with without the hardware unfortunately; that's why > I keep hardware around just to test this stuff. Sure! I'm interested in keeping the package up to date. The device will become quite common in Germany as it's being offered for free to increase acceptance of the nPA. I'm currently trying to get access to the "big brother" of this device (an SDI011). (In reply to comment #6) > I think that the license should be added to the @EULA group. > And by clause 3 of the license, the ebuild needs RESTRICT="mirror bindist". Both sounds reasonable to me (I'm very far from knowning licenses). Can someone comment on how the ebuild was written? I'm especially interested in the 32 vs. 64 bit stuff I did.
Uhm how did you start pcscd? AFAICT the device wouldn't be accessible by default by the user nobody pcscd init script starts it from. Can you provide the lsusb -v output for that device? You can just look up the basic udev rules used by app-crypt/ccid to see how it should be auto-started (setting the PCSCD env variable is enough, pcsc-lite takes care of changing owner and starting the service). The ebuild looks good to me; I'd have used a more compact form to switch between the two files during install but it's fine. I guess the only last thing to do is prepending -* in front of KEYWORDS: binary packages cannot work on other architectures anyway, and it's a signal for arches not to bother trying.
Created attachment 265491 [details] lsusb.txt
Created attachment 265493 [details] 92_pcscd_scl011-bin.rules
Created attachment 265495 [details] scl011-bin-2.06.ebuild
Rules look good (although for consistency I'd suggest naming them 92-pcscd-scl011-bin.rules — I should rename ccid's as well). Now though I'm wondering whether the SCM is not a standard CCID device in hiding.. would you be up to doing some hacking at ccid and see if it behaves? :) Keep the rules file, but don't install the driver itself, then hack ccid's readers/supported_readers.txt to list your device VID/PID as well. Restart pcsc-lite and use pcsc_scan (from pcsc-tools) to see if it detects your card. I'm sure Ludovic would love to hear if it works.
(In reply to comment #8) > Uhm how did you start pcscd? AFAICT the device wouldn't be accessible by > default by the user nobody pcscd init script starts it from. I basically did a "pcscd -fd" and a "pcsc_scan" to verify reading the cards data works. > Can you provide the lsusb -v output for that device? Sure, see attachment #265491 [details] > You can just look up the basic udev rules used by app-crypt/ccid to see how it > should be auto-started (setting the PCSCD env variable is enough, pcsc-lite > takes care of changing owner and starting the service). I added an experimental udev file (attachment #265493 [details]) but I don't really know udev rules (yet). It does not seem to work and I don't really really know how to debug this (cause I don't really know what to expect). > The ebuild looks good to me; I'd have used a more compact form to switch > between the two files during install but it's fine. I guess the only last thing > to do is prepending -* in front of KEYWORDS: binary packages cannot work on > other architectures anyway, and it's a signal for arches not to bother trying. I uploaded an updated version with adapted keywords.
Tried hacking around, but didn't get it to work. And according to supported_readers.txt this won't work ... > # Bogus readers but partly supported > # See the http://pcsclite.alioth.debian.org/ccid/unsupported.html for a > # description of the problem(s) > ... > #0x04E6:0x5292:SCM SCL01x Contactless Reader
Something seems to be wrong with the rules file, I think. If I "/etc/init.d/pcscd start" and plug in the device it works. If I stop pcscd (and restart udev) and plug in the device i get: pcscd: *** glibc detected *** /usr/sbin/pcscd: free(): invalid pointer: 0x000000000260e600 ***
Okay if you start it as root or as your user you shouldn't have the problem with nobody, but the udev file is required to get it to set the proper device permissions. Which version of pcsc-lite are you using? 1.7.0 has changed the hotplug system and I wouldn't be surprised if it failed to work properly, if you were using that try 1.6.7, otherwise do the other way around ;) If you are around on IRC tomorrow we can debug the udev rules together, then I'll import this and seeing whether ccid can work or not should become a non-issue (although I wouldn't mind if you were to help me out to take a further look at that — I have already had to work on ccid to make two of my devices work properly, but now it's much less painful to deal with them).
(In reply to comment #16) > Okay if you start it as root or as your user you shouldn't have the problem > with nobody, but the udev file is required to get it to set the proper device > permissions. Yeah, always did this as root. > Which version of pcsc-lite are you using? 1.7.0 has changed the hotplug system > and I wouldn't be surprised if it failed to work properly, if you were using > that try 1.6.7, otherwise do the other way around ;) I was using 1.7.0. Using scl011-bin together with 1.6.7 the udev rule file works flawless. It also allows a normal user (non-root) to run pcsc_scan sucessfully. Thanks for the suggestion! > If you are around on IRC tomorrow we can debug the udev rules together, then > I'll import this and seeing whether ccid can work or not should become a > non-issue (although I wouldn't mind if you were to help me out to take a > further look at that — I have already had to work on ccid to make two of my > devices work properly, but now it's much less painful to deal with them). Using ccid together with 1.6.7 seems to bring up the device (LED is on) but pcsc_scan does not find a reader. I'll try to join #gentoo tonight, should be much faster than "chatting" using bugzilla ;-) Having ccid to support the device would be much better than shipping a binary blob, IMO.
Sorry for the delay, RL interrupted me. I could find you on IRC, guess I don't know your nickname :-) The usual suspects (e.g. "flameeyes", "dpetteno", etc.) did not show any results (or maybe I was blind). Anyway, I'll try to find you again.
Just query me as Flameeyes ;)
Christoph can you try and see if the crash is gone with pcsc-lite-1.7.1 that I just added to the tree? Thanks!
(In reply to comment #20) > Christoph can you try and see if the crash is gone with pcsc-lite-1.7.1 that I > just added to the tree? Thanks! Still the same. Starting pcscd manually using "/etc/init.d/pcscd start" works. Plugging in the device causes pcsc-lite to crash (even though it no longer prints an error to the log) :-/
(In reply to comment #21) > Still the same. Starting pcscd manually using "/etc/init.d/pcscd start" works. > Plugging in the device causes pcsc-lite to crash (even though it no longer > prints an error to the log) :-/ Also tested against 1.7.2 no changes :-(
Just tested the driver against pcsc-lite 1.7.2-r1 and it works.
Thanks Christoph, committed now with you as proxy maintainer. I have made a couple of changes to the ebuild btw, nothing major though, but give it a look.