{"id":635,"date":"2010-05-10T00:36:41","date_gmt":"2010-05-09T22:36:41","guid":{"rendered":"http:\/\/raftaman.net\/?p=635"},"modified":"2022-05-25T05:04:13","modified_gmt":"2022-05-25T03:04:13","slug":"omnikey-cardman-4000-and-pcsc","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=635","title":{"rendered":"Omnikey CardMan 4000 and pcsc"},"content":{"rendered":"\n<p>There are basically two ways of getting the <em>Omnikey CardMan 4000<\/em> to work: You can either use the original driver from <a href=\"http:\/\/www.hidglobal.com\/\">HID<\/a> (without CT-API support) or the free version from <a href=\"http:\/\/www.opensc-project.org\/openct\">OpenCT<\/a><br \/>\n<!--more--><\/p>\n<h2>1. Installing pcsc<\/h2>\n<p>Well, this is the easiest part. Just pull the packages from with yum:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nyum install pcsc-lite\r\n<\/pre>\n<p>For other distros (openSuse, debian, Ubuntu etc.) ymmv here.<\/p>\n<h2>2. Using the omnikey driver<\/h2>\n<p>The driver is available at <a href=\"http:\/\/www.hidglobal.com\/driverDownloads.php?techCat=19&#038;prod_id=204\">HID&#8217;s download archive<\/a>. Download <strong><code>cm4000_installer_v2_4_0_src.tar.gz<\/code><\/strong>, extract the tar archive, and copy the shared object <strong><code>libcm4000.so<\/code><\/strong> to an appropiate place (probably <code>\/usr\/lib\/pcsc\/drivers\/libcm4000.so<\/code>)<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ tar xvfz cm4000_installer_v2_4_0_src.tar.gz\r\n$ cp cm4000_installer_v2_4_0_src\/libcm4000.so \/usr\/lib\/pcsc\/drivers\/libcm4000.so\r\n<\/pre>\n<h2>2.1 Configuring pcsc<\/h2>\n<p>Now that the driver is in place, we create a configuration file for the reader called <code>cm4000.conf<\/code>:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ touch \/etc\/readers.conf.d\/cm4000.conf\r\n<\/pre>\n<p>with the following content<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n# Configuration file for CardMan 4000 smartcard reader.\r\n\r\nFRIENDLYNAME  &quot;OMNIKEY CardMan 4000 Socket 0&quot;\r\nDEVICENAME  \/dev\/cmm0\r\nLIBPATH   \/usr\/lib\/pcsc\/drivers\/libcm4000.so\r\nCHANNELID 0\r\n<\/pre>\n<p>Don&#8217;t put the configuration directly into <code>\/etc\/reader.conf<\/code> since the pcscd init script automatically merges all files in <code>\/etc\/reader.conf.d\/*<\/code> into <code>\/etc\/reader.conf<\/code><\/p>\n<p>After restarting pcscd you&#8217;re done<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ service pcscd restart\r\n<\/pre>\n<h2>3. Using OpenCT driver<\/h2>\n<p>It may be a good idea, to user the OpenCT driver instead of the original one. You don&#8217;t have to compromise your file tree (because everything can be pulled via yum) and theoretically OpenCT also provides a CT-API interface (although I did not get this to work).<\/p>\n<p>So once again, we pull the necessary packages with yum:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ yum install openct pcsc-lite-openct\r\n<\/pre>\n<h2>3.1 Configuring pcsc for use with OpenCT<\/h2>\n<p>Instead of <code>cm4000.conf<\/code> (so make sure, it is renamed to <code>cm4000.conf.bak<\/code> or similar) we use use <code>openct.conf<\/code> which is already part of <code>pcsc-lite-openct<\/code>. So all we have to do is uncomment the lines in <strong><code>\/etc\/readers.conf.d\/openct.conf<\/code><\/strong>:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n# OpenCT configuration file for pcsc-lite\r\n# http:\/\/www.opensc.org\/openct\/\r\n\r\n FRIENDLYNAME     &quot;OpenCT&quot;\r\n DEVICENAME       \/dev\/cmm0\r\n LIBPATH          \/usr\/lib\/pcsc\/drivers\/openct-ifd.bundle\/Contents\/Linux\/openct-ifd.so\r\n CHANNELID        0 \r\n\r\n# End of file\r\n<\/pre>\n<p>Eventually restart openct and pcscd:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ service openct restart\r\n$ service pcscd restart\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are basically two ways of getting the Omnikey CardMan 4000 to work: You can either use the original driver from HID (without CT-API support) or the free version from OpenCT<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,58],"class_list":["post-635","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fedora","tag-hardware"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=635"}],"version-history":[{"count":33,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions"}],"predecessor-version":[{"id":2753,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions\/2753"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}