LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-28-2008, 10:44 PM   #1
Centurion030
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Rep: Reputation: 0
Using the GemPC USB-SW smartcard reader with Debian "etch" distro (Xandros OCE 4.5)


Hello,


I am trying to get a smart card reader and my CAC card to work with a Debian "etch" based distro, Xandros 4.5 OCE. Here are results of lsusb and pcsc_scan:

xandroslaptop:~# lsusb
Bus 003 Device 005: ID 08e6:3437 Gemplus GemPC Twin SmartCard Reader
Bus 003 Device 004: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

xandroslaptop:~# pcsc_scan
PC/SC device scanner
V 1.4.8 (c) 2001-2006, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.3.2
Scanning present readers
0: Gemplus GemPC Twin 00 00

Sun Dec 28 23:16:34 2008
Reader 0: Gemplus GemPC Twin 00 00
Card state: Card inserted,
ATR: (removed)

ATR: (removed)
+ TS = 3B --> Direct Convention
+ T0 = 6B, Y(1): 0110, K: 11 (historical bytes)
TB(1) = 00 --> VPP is not electrically connected
TC(1) = 00 --> Extra guard time: 0
+ Historical bytes: (removed)
Category indicator byte: 80 (compact TLV data object)
Tag: 6, len: 5 (pre-issuing data)
Data: B0 83 01 04 74
Tag: 8, len: 3 (status indicator)
LCS (life card cycle): 00 (No information given)
SW: 9000 (Normal processing.)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
(removed)
Gemplus GXP3 64V2N
U.S. Department of Defense Common Access Card (DoD CAC)

I have the following packages installed on my system:

libccid 1.1.0-1
libopenct1 0.6.11-1
libopensc2 0.11.1-2etch2
mozilla-opensc 0.11.1-2etch2
libp11-0 0.2.2-2
libpcsclite1 1.3.2-5
libpcsc-perl 1.4.4-1
openct 0.6.11-1
opensc 0.11.1-2etch2
pcscd 1.3.2-
pcsc-tools 1.4.8-1
coolkey 1.1.0-7
(converted from a deb package by alien version 8.64)

It seems I have the correct drivers and pcscd restart works correctly and the pcsc_scan gives me a correct result. The problem is that when I am trying to add a new device module in Firefox, using the coolkey package and the module from that library, it says "unable to install module."

I am wondering if I should go with the driver and software from gemalto itself. Here is their readme:

"Readme for the Gemalto CCID Smart Card reader driver for the DEBIAN "Sarge".

Gemalto CCID Smart card reader drivers for Debian Sarge 3.1 Linux distribution
and x86 processor architecture.

Version 1.2.4, March 2006.

Before proceeding, you might want to check whether a new driver version
is available from http://support.gemalto.com/


Contents:
---------

0. License
1. Description
2. Installation
3. Troubleshooting
4. Release notes
5. Support

0. License
----------

All included programs are free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.

All included programs are distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Lesser Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


1. Description
--------------
This archive contains DEB packages of the CCID device driver for the Gemplus
CCID based devices and the PCSC-Lite daemon.

The CCID device driver:
* libccid_1.2.4-0_i386.deb

The pcsc-lite :

( from http://www.backports.org/debian/pool/main/p/pcsc-lite/)

* libpcsclite1_1.2.9-beta9-0bpo1_i386.deb
* libpcsclite-dev_1.2.9-beta9-0bpo1_i386.deb
* pcscd_1.2.9-beta9-0bpo1_i386.deb

This archive contains the source code of the CCID device driver for
the Gemplus CCID based devices and the PCSC-Lite daemon.

The CCID device driver:
* ccid-1.2.4.tar.gz

The pcsc-lite:
* pcsc-lite-1.2.9-beta10.tar.gz

It requires:
* A Debian Sarge 3.1 platform based on a x86 processor architecture,
* A Gemplus CCID based device

If you intend to use this driver with a different configuration (such
as a non x86 platform), please contact the support at the address
indicated at the very end of this document.


2. Installation
---------------

- Install the driver: # dpkg -i libccid_1.2.4-0_i386.deb

- Install the pcscd provided with this package:
# dpkg -i pcscd_1.2.9-beta9-0bpo1_i386.deb
libpcsclite-dev_1.2.9-beta9-0bpo1_i386.deb
libpcsclite1_1.2.9-beta9-0bpo1_i386.deb

The pcsc-lite daemon will (re)start automatically during installation.


3. Troubleshooting
------------------

For some Linux distributions, the pcmcia daemon should be loaded after
the pcscd daemon. As the pcscd daemon does not manage PCMCIA smart card
reader as hotplug devices, it might not take into account your GemPCCard
presence. To solve this issue, please restart the pcscd daemon as
explained below:

# /etc/init.d/pcscd restart


4. Release notes
----------------

Version 1.0.0: This is the initial driver version.
Version 1.1.0: Support of PCCard smart card reader and improvements.
Version 1.2.4: Support of PCPin PAD and GemPC Xpress smart card readers. "

This is a Debian Sarge package, I believe that I can use the alien trick on this package for OCE 4.5.

I can remove all of the packages I have installed before I run this. Please note, I am able to restart the pcscd dameon and also get a pcsc_scan result with my CAC card installed.

Essentially, I am unable to get Firefox to load a CAC module and use it. I have the required certs.

It seems that my middleware is missing. Coolkey is made for Lenny or Sid. I have seen some other middleware packages but they don't seem to help out at all. openct seems to create an installable device-yet is remains detached all the time.

I have also tried using the opensc/openct module *.s0 and that results in devices that are detached.

Thoughts?

Regards,

James

Last edited by Centurion030; 12-30-2008 at 11:35 PM.
 
Old 12-30-2008, 11:34 PM   #2
Centurion030
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Thumbs up

First, I want to thank all the great folks from the Xandros forums, the AKO CAC forum, the Debian CoolKey maintainers, guys from work, and others for the help and assisstance in getting this project to work.

Here is how I got CoolKey to work on my Xandros OCE 4.5. (Debian "etch" Linux distro)

I first used Synaptic Package Manager with the following repositories (/etc/apt/sources.list)

deb http://xnv45.xandros.com/4.5oc/pkg/ oc4.5-xn main contrib non-free
deb http://xnv45unsup.xandros.com/4.5oc/upkg/ etch main contrib non-free
deb http://update.eeepc.asus.com/p701/ p701 main
deb http://update.eeepc.asus.com/p900/ p900 main
deb http://update.eeepc.asus.com/1.6/ p901 main
deb http://update.eeepc.asus.com/1.6/ p904 main
deb http://update.eeepc.asus.com/1.6/ p904hd main
deb http://update.eeepc.asus.com/1.6/ p1000 main
deb http://update.eeepc.asus.com/1.6/ p1000h main
deb http://update.eeepc.asus.com/1.6/ p1000hd main
deb http://download.tuxfamily.org/xepcrepo/ p701 main
deb http://download.tuxfamily.org/eeepcrepos/ p701 main etch
deb http://asusxntest.xandros.com/asus-source/p7xx/1.0.4/ v104 main contrib non-free
deb http://asusxntest.xandros.com/asus-source/p7xx/1.0.6/ v106 main contrib non-free

And, I got the following Libraries/Packages:
libccid 1.1.0-1
libpcsclite1 1.3.2-5
libpcsclite-dev 1.3.2-5
pcscd 1.3.2-5
pcsc-tools 1.4.8-1
libpcsc-perl 1.4.4-1

Because CoolKey doesn't exist as a package for my "etch" based distro, I got the source code for CoolKey.

site:
http://packages.debian.org/lenny/armel/coolkey

files:
* [coolkey_1.1.0-5.dsc] Description file
* [coolkey_1.1.0.orig.tar.gz] Actual code
* [coolkey_1.1.0-5.diff.gz] Patch

I saved them to a /coolkey/ directory.

I then used the following commands while in the coolkey directory.

commands:
tar -xvvzf coolkey_1.1.0.orig.tar.gz extract the files-creates coolkey-1.1.0/
gunzip coolkey_1.1.0-5.diff.gz unzip the diff file
patch --dry-run -p1 -i coolkey_1.1.0-5.diff do a dry run and test
patch -p0 <coolkey_1.1.0-5.diff patch the diff file to the source
cd coolkey-1.1.0/ cd to the directory
ls list everything
./configure configure
make compile
make install install

cd /
/etc/init.d/pcscd restart restart the pcscd daemon
pcsc_scan | more check for my card reader/card

find / -name *pk11.so find the device module

/coolkey/coolkey-1.1.0/src/coolkey/.libs/libcoolkeypk11.so

/usr/local/lib/pkcs11/libcoolkeypk11.so this is what will be used

I installed the certificate authorities in Firefox. (Edit/Advanced/Security/View Certificates/
Authorities/Import)

I then installed the security device in Firefox. (Edit/Advanced/Security Devices/Load)
I gave it a name "CAC Module" and browsed to /usr/local/lib/pkcs11/libcoolkeypk11.so

I clicked "OK", clicked "OK" again for confirmation, and got the confirmation that a new security module was installed.

You can also login to your card in this menu as well. I tried out AKO and CAC login and it worked fine!

This was a good learning experience.

James
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Debian etch with usb pen - "ethernet card not found" alfmarius Linux - Networking 3 06-24-2008 09:51 AM
LXer: Installing Debian Etch From A Windows System With "Debian-Installer Loader" LXer Syndicated Linux News 0 09-28-2007 12:41 AM
LXer: DistroWatch Weekly: Overview of Debian and Mandriva, Debian 4.0 "Etch", SimplyMEPIS 6.5 LXer Syndicated Linux News 0 04-09-2007 05:46 AM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
USB smartcard reader akilles Linux - Newbie 3 11-16-2005 03:11 PM


All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration