{"id":14,"date":"2007-01-10T11:54:40","date_gmt":"2007-01-10T11:54:40","guid":{"rendered":"http:\/\/cyberelk.net\/tim\/?page_id=14"},"modified":"2026-02-27T17:57:15","modified_gmt":"2026-02-27T16:57:15","slug":"libieee1284","status":"publish","type":"page","link":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/","title":{"rendered":"libieee1284"},"content":{"rendered":"<h2>What is it?<\/h2>\n<p>This library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. It is written under the GNU General Public License.<\/p>\n<p>It currently works on Linux, Windows (with <a href=\"http:\/\/sources.redhat.com\/cygwin\">Cygwin<\/a>), OpenBSD (i386 only), FreeBSD\/i386 and Solaris\/x86.<\/p>\n<p>The reason for writing it originally was that for Linux, there are some wrinkles in communicating with devices on parallel ports:<\/p>\n<ul>\n<li>Applications that want to harvest IEEE 1284 Device ID information can look in \/proc for it, but it is in a different location in 2.4 kernels than it was in 2.2 kernels, and is completely absent in 2.0 kernels.<\/li>\n<li>There is an extra location to look for this information in 2.6.<\/li>\n<li>All kernels allow ioperm\/inb\/outb-style I\/O, but it requires root privilege. In addition, string I\/O (such as outsb) is not available on some architectures.<\/li>\n<li>Since 2.4, Linux has \/dev\/parport[0,1,2,&#8230;] device nodes which applications can use; applications don&#8217;t need to be run as root, but they obviously need appropriate permissions set on the device node they want to use.<\/li>\n<li>When capabilities catch on, \/dev\/port will be another alternative to ioperm that doesn&#8217;t require root privilege, although it does require RAWIO capabilities.<\/li>\n<\/ul>\n<p>The aim of this library is to take all the worry about the above wrinkles from the application. It will figure out which method is appropriate for the currently running kernel. For instance, if the application wants to know the device ID of a device on a particular port, it will ask the library for the the device ID. The library will then figure out if it&#8217;s available via \/proc (in any of the possible locations), and if not then it will try asking the device itself. If \/dev\/parport0 isn&#8217;t available for use, it will try ioperm; if that fails, it will try \/dev\/port. And the application doesn&#8217;t have to care.<\/p>\n<h2>Documentation:<\/h2>\n<ul>\n<li><a href=\"https:\/\/cyberelk.net\/tim\/libieee1284\/interface\/index.html\">HTML<\/a> | <a href=\"https:\/\/cyberelk.net\/tim\/libieee1284\/interface.pdf\">PDF<\/a> : <strong>Public interface of libieee1284<\/strong> (2002-09-19) : This is API 3.1.<\/li>\n<\/ul>\n<h2>Where is it?<\/h2>\n<p>On <a href=\"https:\/\/github.com\/twaugh\/libieee1284\">GitHub<\/a>. Tarballs are also here: <a href=\"https:\/\/cyberelk.net\/tim\/data\/libieee1284\/\">https:\/\/cyberelk.net\/tim\/data\/libieee1284\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is it? This library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. It is written under the GNU General Public License. It currently works on Linux, Windows (with Cygwin), OpenBSD (i386 only), FreeBSD\/i386 and Solaris\/x86. The reason for [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":8,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-14","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>libieee1284 - PRINT HEAD<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"libieee1284 - PRINT HEAD\" \/>\n<meta property=\"og:description\" content=\"What is it? This library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. It is written under the GNU General Public License. It currently works on Linux, Windows (with Cygwin), OpenBSD (i386 only), FreeBSD\/i386 and Solaris\/x86. The reason for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/\" \/>\n<meta property=\"og:site_name\" content=\"PRINT HEAD\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-27T16:57:15+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/libieee1284\\\/\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/libieee1284\\\/\",\"name\":\"libieee1284 - PRINT HEAD\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#website\"},\"datePublished\":\"2007-01-10T11:54:40+00:00\",\"dateModified\":\"2026-02-27T16:57:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/libieee1284\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/libieee1284\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/libieee1284\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"My Projects\",\"item\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"libieee1284\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#website\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/\",\"name\":\"PRINT HEAD\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\",\"name\":\"Tim Waugh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"contentUrl\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"width\":731,\"height\":140,\"caption\":\"Tim Waugh\"},\"logo\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\"},\"sameAs\":[\"http:\\\/\\\/cyberelk.net\\\/tim\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"libieee1284 - PRINT HEAD","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/","og_locale":"en_GB","og_type":"article","og_title":"libieee1284 - PRINT HEAD","og_description":"What is it? This library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. It is written under the GNU General Public License. It currently works on Linux, Windows (with Cygwin), OpenBSD (i386 only), FreeBSD\/i386 and Solaris\/x86. The reason for [&hellip;]","og_url":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/","og_site_name":"PRINT HEAD","article_modified_time":"2026-02-27T16:57:15+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/","url":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/","name":"libieee1284 - PRINT HEAD","isPartOf":{"@id":"https:\/\/cyberelk.net\/tim\/#website"},"datePublished":"2007-01-10T11:54:40+00:00","dateModified":"2026-02-27T16:57:15+00:00","breadcrumb":{"@id":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cyberelk.net\/tim\/software\/libieee1284\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cyberelk.net\/tim\/software\/libieee1284\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cyberelk.net\/tim\/"},{"@type":"ListItem","position":2,"name":"My Projects","item":"https:\/\/cyberelk.net\/tim\/software\/"},{"@type":"ListItem","position":3,"name":"libieee1284"}]},{"@type":"WebSite","@id":"https:\/\/cyberelk.net\/tim\/#website","url":"https:\/\/cyberelk.net\/tim\/","name":"PRINT HEAD","description":"","publisher":{"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cyberelk.net\/tim\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6","name":"Tim Waugh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","url":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","contentUrl":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","width":731,"height":140,"caption":"Tim Waugh"},"logo":{"@id":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png"},"sameAs":["http:\/\/cyberelk.net\/tim"]}]}},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PnnS2-e","_links":{"self":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/pages\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":1,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":1296,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/pages\/14\/revisions\/1296"}],"up":[{"embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}