<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>
<channel>
	<title>G-Loaded Journal &#187; Hardware</title>
	<atom:link href="http://www.g-loaded.eu/tag/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Mon, 05 Dec 2011 19:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>DD-WRT support for Wireless N Routers</title>
		<link>http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/</link>
		<comments>http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 06:16:39 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[DD-WRT]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Router]]></category>
		<category><![CDATA[Wireless]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=2194</guid>
		<description><![CDATA[It&#8217;s been a long time since I last checked the market for WLAN routers. Although I don&#8217;t intend buying one right now, I think staying up to date with the latest advancements in the technology used in these devices is a good idea, because I might need to buy one in the near future. And [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I last checked the market for WLAN routers. Although I don&#8217;t intend buying one right now, I think staying up to date with the latest advancements in the technology used in these devices is a good idea, because I might need to buy one in the near future. And this time I want to make the right choice, which practically means I want to choose a <em>wireless N router</em> that is <strong>fully supported</strong> by the open source router firmware <a href="http://www.dd-wrt.com">DD-WRT</a>. For those not familiar with DD-WRT:<br />
<span id="more-2194"></span></p>
<blockquote><p>DD-WRT is a Linux based alternative Open Source firmware suitable for a great variety of WLAN routers and embedded systems. The main emphasis lies on providing the easiest possible handling while at the same time supporting a great number of functionalities within the framework of the respective hardware platform used.</p></blockquote>
<p>You can check whether a device is supported by DD-WRT or not by checking the device&#8217;s model name in the <a href="http://www.dd-wrt.com/site/support/router-database">database of supported routers</a>. If you are like me and prefer to read an overview of the wireless N devices instead of querying a database, there is a <a href="http://www.dd-wrt.com/wiki/index.php/Supported_Devices_802.11n">page</a> in the project&#8217;s wiki that lists all these devices.</p>
<p>After checking the technical specifications of several routers on their manufacturer web sites, it is quite clear that at this moment there are not many wireless N routers &#038; ADSL2+ modem combos that are fully supported by DD-WRT. In my case that won&#8217;t be a big problem, but I&#8217;d really like the device to have a <em>DSL port</em> so as to keep the number of devices around the house at a minimum. But anyway, this is not a big deal.</p>
<p>Some other things I&#8217;d consider a plus for such a device are:</p>
<ol>
<li>Support for <em>Wireless Client Mode</em> by the manufacturer&#8217;s firmware</li>
<li>Support for a <em>VPN Server</em> by the manufacturer&#8217;s firmware</li>
</ol>
<p>I know that these functions are available anyway if the DD-WRT firmware is used, but, if the default firmware supported these functions, it would definitely make a difference for me. Another useful feature would be the existence of a <em>USB port</em>, but this would greatly limit the available supported devices, so this is not a mandatory feature.</p>
<p>So, if anyone has a suggestion for such a router or if you own one, please let me know about your experience with it. I am particularly interested for devices that are 100% supported by the DD-WRT open source firmware.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/">DD-WRT support for Wireless N Routers</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/" rel="bookmark">Viceo Backend for SANE with libusb support</a></li>
<li><a href="http://www.g-loaded.eu/2010/04/16/software-that-detects-violations-of-open-source-licenses/" rel="bookmark">Software that detects violations of open source licenses</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/" rel="bookmark">Creative PC-CAM 750 on Fedora 10</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2006/12/19/howto-dhcp-server-dhcpd-configuration/" rel="bookmark">Howto: DHCP Server (dhcpd) Configuration</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Partition Misalignment Slows Down 4096-Byte Sector Hard Disks</title>
		<link>http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/</link>
		<comments>http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 23:32:01 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[System]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1662</guid>
		<description><![CDATA[I just read this very interesting article about the new 4096-byte sector hard disks, like the new Western Digital Caviar Green drives, and the impact a partition misalignment might have on the drive&#8217;s write performance. The problem most likely to hit you with one of these drives is very slow write performance. This is caused [...]]]></description>
			<content:encoded><![CDATA[<p>I just read this very interesting article about the new 4096-byte sector hard disks, like the new Western Digital Caviar Green drives, and the impact a partition misalignment might have on the drive&#8217;s write performance.<br />
<span id="more-1662"></span></p>
<blockquote><p>The problem most likely to hit you with one of these drives is very slow write performance. This is caused by improper logical-to-physical sector alignment. OS&#8217;s like Linux use 4K blocks (or multiples of 4K) to store data, which matches well with the physical sector. However, nothing restricts you from creating a partition that starts on an odd-numbered 512-byte logical sector. This misalignment causes a performance hit since the drive has to read and rewrite the 4K sectors with whatever 512-byte slices changed.</p></blockquote>
<p>The article author continues with a test he performed on two identical WD Green drives containing one partition. On the first drive he used fdisk defaults for the partition boundaries, while on the second drive he manually aligned the partition. The results show that a misaligned drive can be up to 3 times slower than a properly aligned one.</p>
<blockquote><p>&#8230;I formatted both drives using the command &#8220;time mke2fs /dev/sdc1&#8243; (and sdd1).</p>
<p>/dev/sdc, which was aligned, took 5m 45.716s to format.<br />
/dev/sdd, which was not aligned, took 19m 53.609s to format.</p>
<p>That&#8217;s a difference of greater than a factor of three!</p></blockquote>
<p>The article author conducted several other tests. This is a very good read. Read the <a href="http://www.osnews.com/story/22872/Linux_Not_Fully_Prepared_for_4096-Byte_Sector_Hard_Drives">full article</a>.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/">Partition Misalignment Slows Down 4096-Byte Sector Hard Disks</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/" rel="bookmark">Howto: Run VMWare on a Physical Windows Partition</a></li>
<li><a href="http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/" rel="bookmark">Effective data wiping with a single complete overwrite</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/06/partition-images-with-partimage-and-partimaged/" rel="bookmark">Partition images with Partimage and Partimaged</a></li>
<li><a href="http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/" rel="bookmark">Hard disk upgrade on an old motherboard</a></li>
<li><a href="http://www.g-loaded.eu/2009/04/10/windows-7-opensolaris-put-to-the-test/" rel="bookmark">Windows 7, OpenSolaris &#8211; put to the test</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Effective data wiping with a single complete overwrite</title>
		<link>http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/</link>
		<comments>http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 21:56:16 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Filesystem]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=863</guid>
		<description><![CDATA[One of the first things computer users, who are concerned with security, learn is that multiple overwrites with ones and zeros are required in order to wipe data to the extent that it is unrecoverable by any forensic analysis tools. According to this article on Softpedia, on which I stumbled while searching for something else, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the first things computer users, who are concerned with security, learn is that <em>multiple overwrites</em> with ones and zeros are required in order to <strong>wipe data</strong> to the extent that it is <strong>unrecoverable</strong> by any <em>forensic analysis tools</em>. According to this <a href="http://news.softpedia.com/news/Data-Wiping-Myth-Put-to-Rest-102376.shtml">article on Softpedia</a>, on which I stumbled while searching for something else, the above statement is a <strong>myth</strong>; a busted myth actually. Experts now claim that a <em>single complete overwrite</em> is enough to render the data unrecoverable.</p>
<p>Refering to the myth, the author of the article writes:</p>
<blockquote><p>
One of the reasons behind this idea is that the positioning of a hard disk drive&#8217;s head is not precise enough to ensure that the data is overwritten with new information from the exact same byte.
</p></blockquote>
<p>A <a href="http://www.springerlink.com/content/408263ql11460147/">study</a>, published on December 2008, claims that tests performed on both last and older generation hard drives have shown that recovering even a single byte of data after a complete overwrite is practically impossible.</p>
<blockquote><p>
Security researchers from Heise Security, who have reviewed the paper presented at last year&#8217;s edition of the International Conference on Information Systems Security (ICISS), explain that a single byte of data can be recovered with a 56 percent probability, but only if the head is positioned precisely eight times, which in itself has a probability of occurring of only 0.97%.
</p></blockquote>
<p>Since I was one of those who believed the statement about the multiple overwrites, I found the article very interesting. I haven&#8217;t read the study itself though.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/">Effective data wiping with a single complete overwrite</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/" rel="bookmark">Partition Misalignment Slows Down 4096-Byte Sector Hard Disks</a></li>
<li><a href="http://www.g-loaded.eu/2010/10/29/sphinx-documentation-single-file/" rel="bookmark">How to create a single file of Sphinx based documentation</a></li>
<li><a href="http://www.g-loaded.eu/2007/12/01/choosing-a-format-for-data-backups-tar-vs-cpio/" rel="bookmark">Choosing a format for data backups &#8211; tar vs cpio</a></li>
<li><a href="http://www.g-loaded.eu/2009/01/23/shred-changes-default-number-of-passes-to-3/" rel="bookmark">Shred changes default number of passes to 3</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/14/the-complete-fedora-kernel-headers/" rel="bookmark">The Complete Fedora Kernel Headers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/01/22/effective-data-wiping-with-a-single-complete-overwrite/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Creative PC-CAM 750 on Fedora 10</title>
		<link>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/</link>
		<comments>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 14:03:40 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[WebCam]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=735</guid>
		<description><![CDATA[About two years ago, I had published some notes about how to use the good old Creative PC-CAM 750 digital camera/webcam combo under Linux using the spca5xx kernel module. Many things have changed since then. The &#8216;spca5xx&#8216; driver has been re-released under the name GSPCA, which has lately made its way into the kernel. This [...]]]></description>
			<content:encoded><![CDATA[<p>About two years ago, I had <a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/">published</a> some notes about how to use the good old Creative PC-CAM 750 digital camera/webcam combo under Linux using the <a href="http://mxhaard.free.fr/spca5xx.html">spca5xx</a> kernel module. Many things have changed since then. The &#8216;<em>spca5xx</em>&#8216; driver has been re-released under the name <a href="http://mxhaard.free.fr/spca5xx.html">GSPCA</a>, which has lately made its way into the <a href="http://kernel.org/">kernel</a>. This should have made things simpler, but, apparently, the fact that this device can be used both as a digital camera and a webcamera complicates its use under <a href="http://gnome.org/">GNOME</a>. By default, GNOME <strong>mounts</strong> the device&#8217;s internal flash memory, so you can pull those digital photographs you have taken. This is a rather expected behaviour despite the fact that this is an old-tech digital camera. The main problem though is that there is no obvious way to switch to <strong>webcam-mode</strong> from within GNOME. Below are some notes about how to do it.<br />
<span id="more-735"></span><br />
The following steps have been tested on Fedora 10 (GNOME v2.24.2). Most probably, they will work on other recent Linux distributions (Ubuntu, OpenSUSE, Mandriva, etc).</p>
<p>As mentioned previously, as soon as the device is plugged into the USB port, GNOME mounts its internal flash memory.</p>
<p>Looking at <strong>dmesg</strong> output as <strong>root</strong>:</p>
<pre class="codesnp">
# dmesg
usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
usb 3-1: New USB device found, idVendor=041e, idProduct=4013
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: Creative PC-CAM 750
usb 3-1: Manufacturer: ViewQuest Technologies INC.
Linux video capture interface: v2.00
gspca: main v2.2.0 registered
gspca: probing 041e:4013
gspca: probe ok
gspca: probing 041e:4013
usbcore: registered new interface driver sunplus
sunplus: registered
gspca: disconnect complete
</pre>
<p>As you can see, despite the fact that the webcam has been recognized by the <strong>gspca-sunplus</strong> driver, gspca loses control of the webcam. This happens because GNOME (<strong>gvfs</strong>) has mounted its memory. Obviously, the device cannot operate as a webcam while its internal memory is mounted.</p>
<p>To list the currently mounted block devices by gvfs run the following command as your currently logged in <strong>user</strong>:</p>
<pre class="codesnp">
$ gvfs-mount -l
Drive(0): CD-RW/DVD±RW Drive
Drive(1): Mass Storage Drive
...
...
Mount(0): Creative Technology, Ltd PC-Cam 750 -> gphoto2://[usb:003,002]/
</pre>
<p>So, there it is. The <strong>gphoto2</strong> driver has been used to mount the device&#8217;s flash memory.<br />
To <strong>unmount</strong> it run (as the currently logged in <strong>user</strong>):</p>
<pre class="console">
$ gvfs-mount -u gphoto2://[usb:003,002]/
</pre>
<p>Replace the usb port reference according to your <code>gvfs-mount -l</code> output.</p>
<p>Alternatively, you can unmount all devices mounted by the gphoto2 driver with the following command:</p>
<pre class="console">
$ gvfs-mount --unmount-scheme gphoto2
</pre>
<p>Now, the camera&#8217;s memory shouldn&#8217;t be listed in <code>gvfs-mount -l</code> output.</p>
<p>All you have to do now to get to webcam-mode is reload the gspca-sunplus module.</p>
<p>As root:</p>
<pre class="console">
# /sbin/modprobe -vr gspca-sunplus
# /sbin/modprobe -v gspca-sunplus
</pre>
<p>Running <strong>dmesg</strong> we confirm that the <strong>gspca-sunplus</strong> module controls the device</p>
<pre class="codesnp">
# dmesg
...
...
Linux video capture interface: v2.00
gspca: main v2.2.0 registered
gspca: probing 041e:4013
gspca: probe ok
gspca: probing 041e:4013
usbcore: registered new interface driver sunplus
sunplus: registered
</pre>
<p>Also, the <strong>ls</strong> command shows that our v4l device has been created:</p>
<pre class="console">
# ls -l /dev/video*
lrwxrwxrwx  1 root root     6 2008-12-08 15:49 /dev/video -> video0
crw-rw----+ 1 root root 81, 0 2008-12-08 15:49 /dev/video0
</pre>
<p>That&#8217;s it. As a user, run <a href="http://projects.gnome.org/cheese/">cheese</a> and say <em>hello</em> to yourself!</p>
<p>This should work for all other digital-camera / web-camera combo devices as well, provided that you use the appropriate gspca driver as shown in the dmesg output.</p>
<p>Your feedback is welcome.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/">Creative PC-CAM 750 on Fedora 10</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/" rel="bookmark">Access gvfs mounts from the command line</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/19/a-different-approach-hal/" rel="bookmark">A different approach&#8230;HAL</a></li>
<li><a href="http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/" rel="bookmark">Viceo Backend for SANE with libusb support</a></li>
<li><a href="http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/" rel="bookmark">Blanking a rewritable CD/DVD in GNOME</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Viceo Backend for SANE with libusb support</title>
		<link>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/</link>
		<comments>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 15:00:43 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Imaging]]></category>
		<category><![CDATA[SANE]]></category>
		<category><![CDATA[Scanner]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/</guid>
		<description><![CDATA[After many years of failure, countless hours of digging into the World Wide Web for information, numerous failed attempts due to lack of knowledge to modify the v0.6 E3 driver for USB scanners (Viceo backend) and add support for libusb, yesterday I was sent a patch, which contained the Viceo backend for SANE with libusb [...]]]></description>
			<content:encoded><![CDATA[<p>After many years of failure, countless hours of digging into the World Wide Web for information, numerous failed attempts due to lack of knowledge to modify the v0.6 <a href="http://viceo.orcon.net.nz/">E3 driver</a> for USB scanners (Viceo backend) and add support for <a href="http://libusb.sourceforge.net/">libusb</a>, yesterday I was sent a patch, which contained the <em>Viceo</em> backend for <a href="http://www.sane-project.org/">SANE</a> with libusb support. My old <strong>Primax Colorado 19200 USB</strong> scanner worked for the first time under Linux. If you own such an old scanner and care to make it work under a modern Linux distribution, read on for instructions and files.<br />
<span id="more-481"></span><br />
It all happened when I stumbled upon Pat&#8217;s <a href="http://www.engsoc.org/~pat/log/index.cgi/2004/05/25#1085543907">blog post</a> a couple of days ago, which gave me hope that someone had cared to modify the E3 USB scanner driver and make it work with libusb. I sent an email to Pat and received a patch (<em>thanks a million</em>!) for <em>sane-backends-1.0.14</em>. The patch did not work initially with today&#8217;s <em>sane-backends-1.0.18</em>, but this would not stop a determined soul from fixing it. Adding support for libusb was completely out of my league, but fixing that particular patch was definitely something I could deal with. It took me some hours, but, finally, I, not only had a patch that could be applied succesfully into the sane-backends-1.0.18 source, but also had a working Viceo backend for SANE, which means&#8230; a working scanner under Linux. I admit that I use the scanner rather rarely, but knowing that this piece of hardware can work under Linux is good.</p>
<h4>Driver History</h4>
<p>Here goes some brief history about the driver.</p>
<p>The E3 driver was initially developed by Steven Ellis (<a href="http://viceo.orcon.net.nz/">http://viceo.orcon.net.nz/</a>). 0.6 was the last released version (2002), which lacked support for libusb. It seems that Steven abandoned the development of the driver at that point. Until a few days ago, the 0.6 release was what I had considered as the latest available version of the E3 driver.</p>
<p>What I missed, was the fact that Jimmy Nguyen had modified the 0.6 driver and had added support for libusb. I had spent countless hours searching the web in the past but I could not locate such a release of the driver. Anyhow, Jimmy&#8217;s patch was released in 2004 for sane-backends-1.0.14.</p>
<p>The rest has been already described above.</p>
<h4>Supported Devices</h4>
<p>This driver works with <strong>USB scanners</strong> equipped with the <strong>E3 chipset</strong>. Some of these scanner models (if not all) are the following:</p>
<ul>
<li>Genius Vivid Pro USB</li>
<li>Primax Colorado USB 19200</li>
<li>Visioneer OneTouch 7600</li>
<li>Visioneer OneTouch 6100</li>
<li>IBM IdeaScan 2000 USB</li>
<li>LG Electronics Scanworks 600U</li>
</ul>
<h4>Download</h4>
<p>I have modified the original patch in order to make it work with <code>sane-backends-1.0.18</code> and also wrote a <em>SPEC</em> file for RPM packaging. Using a package will greatly simplify the installation procedure.</p>
<p>Here follows a list of files you can download:</p>
<dl>
<dt>RPM &#8211; <a href="http://www.codetrax.org/attachments/download/42/sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm">sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm</a></dt>
<dd>RPM package of Viceo backend. <strong>Requires sane-backends-1.0.18</strong>. Installs the Viceo backend only and will not touch any other files. Please read the <em>Installation</em> and <em>Configuration</em> sections for instructions.</dd>
<dt>DEB &#8211; TODO</dt>
<dd>A DEB file for debian-based distributions is not currently available. You can still generate a deb package from the RPM using <strong>alien</strong>. In order to convert the the RPM package to a DEB, use alien like: <code>alien -k sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm</code> and a deb package will be generated for you. You can install the DEB package with: <code>dpkg -i sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.deb</code>. Please note that this procedure <strong>has not been tested</strong>.</dd>
<dt>SPEC &#8211; <a href="http://www.codetrax.org/attachments/download/44/viceo.spec">viceo.spec</a></dt>
<dd>Required if you need to build the RPM package.</dd>
<dt>Patch &#8211; <a href="http://www.codetrax.org/attachments/download/41/sane-backends-1.0.18-viceo.diff.gz">sane-backends-1.0.18-viceo.diff.gz</a></dt>
<dd><strong>New</strong> Viceo backend patch for <strong>sane-backends 1.0.18</strong>. Note, that in addition to the required modifications in order to make this patch suitable for sane-backends-1.0.18, this diff does not include the modifications of the core SANE file <code>sanei/sanei_usb.c</code>. Everything seems to work just fine without having to patch any core SANE file.</dd>
<dt>Patch &#8211; <a href="http://www.codetrax.org/attachments/download/45/viceoDriver4Sane1.0.14.tar.gz">viceoDriver4Sane1.0.14.tar.gz</a></dt>
<dd><strong>Old</strong> package with Viceo patch for <em>sane-backends 1.0.14</em> and some notes by Jimmy Nguyen about the release. Reading them is recommended.</dd>
</dl>
<p>All versions are available from the development web site&#8217;s <a href="http://www.codetrax.org/projects/viceo-sane-backend/files">download area</a>.</p>
<h4>Installation</h4>
<p>Using the RPM or DEB package (see above for info) is the recommended method of installing. This package has been built in Fedora 8, but, since it is rather generic and does not contain any Fedora-specific information, it should work on any RPM-based distribution.</p>
<h5>Using the RPM</h5>
<p>The package <strong>sane-backends-1.0.18</strong> is a <em>dependency</em>. Make sure you have installed it.</p>
<pre class="console">
# wget http://www.codetrax.org/attachments/download/42/sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm
# rpm -ivh sane-backends-viceo-1.0.18-0.7-rcnst.1.i386.rpm
</pre>
<p>Please make sure you read the Configuration section for instructions on how to setup the scanner.</p>
<h5>Manual installation</h5>
<p>This information has been written with as much detail as possible, if you still have questions, please use the forums.</p>
<p>Note: The compilation of the backend should be performed by a regular user and not root.</p>
<p>First, download and extract the required packages. Although the sane-backends-1.0.18 package is used, we will only use it in order to build the Viceo backend.</p>
<pre class="console">
$ wget ftp://ftp.sane-project.org/pub/sane/sane-backends-1.0.18/sane-backends-1.0.18.tar.gz
$ tar -xzf sane-backends-1.0.18.tar.gz
$ wget http://www.codetrax.org/attachments/download/41/sane-backends-1.0.18-viceo.diff.gz
$ gunzip sane-backends-1.0.18-viceo.diff.gz
</pre>
<p>Patch the sane-backends source code:</p>
<pre class="console">
$ patch -p1 -b -d sane-backends-1.0.18/ < sane-backends-1.0.18-viceo.diff
</pre>
<p>Change to the sane-backends source code top-directory:</p>
</pre>
<pre class="console">
$ cd sane-backends-1.0.18/
</pre>
<p>We only care to build the Viceo backend, so set the <code>BACKENDS</code> environment variable to &#8220;<em>viceo</em>&#8220;.</p>
<pre class="console">
$ export BACKENDS=viceo
</pre>
<p>Compile the backend:</p>
<pre class="console">
$ ./configure --prefix=/usr --sysconfdir=/etc
$ make
</pre>
<p>We perform an installation in a temporary directory (<code>1_test_install</code>). This will help you pick up the correct files for the manual installation later. Also, you do not need root privileges for this.</p>
<pre class="console">
$ mkdir 1_test_install
$ make DESTDIR="$PWD/1_test_install" install
</pre>
<p>Now, SANE and the viceo backend have been temporarily installed in the 1_test_install/ directory.</p>
<p>The following actions need to be performed by root or you can use sudo.</p>
<p>Make sure that <strong>sane-backends</strong> has been installed using your distribution&#8217;s package manager. Then copy the following files to the proper locations:</p>
<pre class="console">
# cp 1_test_install/etc/sane.d/{e1.ini,lut.plg,viceo.conf} /etc/sane.d/
# cp 1_test_install/usr/lib/sane/libsane-viceo.so.1.0.18 /usr/lib/sane/
</pre>
<p>Finally, create a needed symbolic link to libsane-viceo.so.1.0.18.</p>
<pre class="console">
# ln -s /usr/lib/sane/libsane-viceo.so.1.0.18 /usr/lib/sane/libsane-viceo.so.1
</pre>
<p>Update the library database. Run:</p>
<pre class="console">
# ldconfig
</pre>
<p>That will be it.</p>
<h4>SANE Configuration</h4>
<p>The scanner configuration needs to be performed by root or you need to use sudo<br />
The first thing to do is to add the viceo backend in <code>/etc/sane.d/dll.conf</code>. Note that the RPM will not do this, so you need to perform this step manually. Either add the work &#8220;<strong>viceo</strong>&#8221; (without quotes) at the end of <code>/etc/sane.d/dll.conf</code> or use the following command:</p>
<pre class="console">
# echo "viceo" &gt;&gt; /etc/sane.d/dll.conf
</pre>
<p>If your scanner is not connected, please do so now.</p>
<p>Run the following command:</p>
<pre class="console">
# sane-find-scanner
</pre>
<p>Your scanner should be identified:</p>
<pre class="codesnp">
[...]
found USB scanner (vendor=0x0461 [Primax], product=0x0360 [Colorado USB 19200]) at libusb:002:003
[...]
</pre>
<p>Take a note of the vendor and product codes and add a line using the following format to <code>/etc/sane.d/viceo.conf</code>:</p>
<pre class="codesnp">
usb &lt;vendor&gt; &lt;product&gt;
</pre>
<p>For me, that line inside <strong>/etc/sane.d/viceo.conf</strong> should be:</p>
<pre class="codesnp">
usb 0x0461 0x0360
</pre>
<p>Now list the available imaging devices. You scanner should be listed:</p>
<pre class="console">
# scanimage -L
</pre>
<p>And this was the device listing:</p>
<pre class="codesnp">
device `viceo:usb 0x0461 0x0360' is a Visioneer Genius ColorPage-Vivid Pro USB flatbed scanner
</pre>
<h4>Scanning</h4>
<p>You can use the scanner either from the command-line or from within GIMP, provided that you have installed the <strong>xsane-gimp</strong> package.</p>
<p>If you use the scanner from the <strong>command line</strong>, wherever a device name is needed, use the device name that scanimage -L lists. For example:</p>
<pre class="console">
# scanimage -d "viceo:usb 0x0461 0x0360" --mode Color --format=tiff --resolution 200 > z_out.tiff
</pre>
<p>Alternatively, you can set the following environment variable:</p>
<pre class="console">
# export SANE_DEFAULT_DEVICE="viceo:usb 0x0461 0x0360"
</pre>
<p>Please read the SANE documentation for more information.</p>
<h4>Licensing</h4>
<p>The viceo backend is accompanied by two files which were included in the drivers for Windows, <code>e1.ini</code> and <code>lut.plg</code>. Although, you, as the owner of the hardware may use these files since you have paid for them, it is unclear whether there is a problem or not with distributing these files separately from the Windows driver package. The fact that these files are available from the home of the E3 driver v0.6, and are also included in <code>sane-backends-1.0.14-viceo.diff</code>, has led me to the conclusion that there is no problem in distributing these files. So, they are included in the my modified patch and RPM package. Please note that the aforementioned files <code>e1.ini</code> and <code>lut.plg</code> have neither been released nor distributed under the terms of a free license, eg GPL, so <strong>they are not free software</strong>.</p>
<h4>Conclusion</h4>
<p>Although the scanner is pretty old, it performs quite well. The driver won&#8217;t let you use resolutions over 600dpi, but I guess this is acceptable.</p>
<p>This article has been written in a fast pace. I have tried to provide as much detail as possible. If you still need help, please use our forums for your questions.</p>
<p>Happy scanning!</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/">Viceo Backend for SANE with libusb support</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/12/03/pdf2email-cups-backend/" rel="bookmark">pdf2email CUPS Backend</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/06/meld/" rel="bookmark">Meld&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2011/03/28/dd-wrt-support-for-wireless-n-routers/" rel="bookmark">DD-WRT support for Wireless N Routers</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/09/kernel-2617-and-lirc_gpio-driver/" rel="bookmark">Kernel 2.6.17 and lirc_gpio driver</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/01/24/viceo-backend-for-sane-with-libusb-support/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Hard disk upgrade on an old motherboard</title>
		<link>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/</link>
		<comments>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 20:51:28 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/</guid>
		<description><![CDATA[Hardware either works or does not work. Two pieces of hardware are either compatible or icompatible. This is the rule. However, when the incompatibility-gap between the two pieces of hardware is small, there is almost always a way to make these two pieces work together as if they were fully compatible. This generally involves the [...]]]></description>
			<content:encoded><![CDATA[<p>Hardware either works or does not work. Two pieces of hardware are either compatible or icompatible. This is the rule. However, when the <em>incompatibility-gap</em> between the two pieces of hardware is small, there is almost always a way to make these two pieces work together as if they were fully compatible. This generally involves the use of one of the various types of adapters or converters. But, it may happen that the adapter is not 100% compatible with the rest of the hardware! So, what comes next in such cases? An adapter for the adapter maybe? Fortunately, in my case it was a small piece of software that came to the rescue and saved my day.<br />
<span id="more-428"></span></p>
<h4>The issue</h4>
<p>Last weekend, I decided to replace the two 10-year-old <strong>Quantum</strong> hard disks, which have heroicly powered my home server for the last years, with a newer <strong>Serial ATA</strong> hard drive. The goal was to buy more drives and build a <strong>RAID 5</strong> environment, if all went well with the first HDD. The motherboard is an old QDI Brilliant 1s (440BX chipset) board using the &#8220;<em>latest</em>&#8221; beta BIOS. Serial ATA controllers are not on this mobo&#8217;s feature list, so I bought a Serial ATA controller <strong>PCI</strong> card &#8211; Sunix SATA2100 &#8211; together with the drive. I should mention that I bought both items from a local retailer. The controller&#8217;s package had a <strong>penguin</strong> on it, so I thought that the linux kernel would have no problems working with the controller&#8217;s chipset. I was badly misled! The card&#8217;s chipset, <code>INITIO INI1622</code>, is not supported by the kernel.</p>
<p>So, I had that card replaced for another SATA controller from eQuip. I don&#8217;t really remember the model, as I returned this card as quickly as possible, because it was not compatible with the motherboard&#8217;s <strong>PCI specification</strong> and the pc froze while on the &#8220;<code>Verifying DMI pool data...</code>&#8221; boot stage. Apart from that, the card&#8217;s chipset (by <code>Silicon Image</code>) was recognized properly by the linux kernel &#8211; I had it checked on another machine.</p>
<p>So, I had to return that card too. The retailer did not sell any other brands, but would not refund me either! So, I decided to buy an <strong>IDE ATA 133 controller</strong> instead. This was a Sunix card, but there was no clear information on the box about which model was inside. On the back, there were two small pictures of the 4700 (yellow board &#8211;  <code>iTE 8212F</code> chipset) and the 3710 (green board &#8211; <code>sil0680</code> chipset) models. On the front, there was a big picture of the 4700 model. Anyone who would have seen the box would bet that the included card was the 4700. But to my surprise, the card that was inside the box was neither 4700 nor 3710, but the 3700 model which carried the <code>sil0680</code> chipset. This was a dissapointment as the 4700&#8242;s <code>iTE</code> chipset is better, but the important thing for me at that moment was that the card was working correctly under Linux. After this incident with the card&#8217;s package, I guess the best practice before buying a product from Sunix is to verify the package contents before you give away your money. Apart from the misleading box, I&#8217;d say that the card is of good quality and that it will definitely work with your old motherboards.</p>
<p>Although I had decided to settle with the IDE ATA 133 controller and use it with a Western Digital ATA 133 compatible HDD on the old machine, I still had the SATA hard disk from my initial purchase. I decided to use that disk on another pc, but still needed a PCI SATA controller. Fortunately, the second PC&#8217;s motherboard was not that old, so the only problem I had to face was if the controller&#8217;s chipset was supported by the Linux kernel. Of course, I wouldn&#8217;t buy such a card from the initial retailer again, so I went to a Media Market store and purchased a CN-033 SATA 2-port PCI card by Sitecom (chipset by Silicon Image &#8211; too lazy to check its exact model right now). It works flawlessly with the Linux kernel and the overall quality of the card and of the included cables was by far better than the quality of the cards by Sunix or eQuip. Of course I tried this card on the old motherboard too, but it would not go past the &#8220;Verifying DMI pool data &#8230;&#8221; stage either.</p>
<h4>Hardcore Games with Hardware</h4>
<p>So, the IDE ATA 133 PCI Controller from Sunix was supported by the kernel and everything seemed all right, but there were still some serious incompatibility issues with the QDI BX440 motherboard that needed to be addressed before I would be able to install Fedora 7 on the new hard disk. In short:</p>
<ol>
<li>The QDI motherboard could not boot from any hard disk connected on the <strong>PCI</strong> controller.</li>
<li>It was required that a hard disk was connected to the <strong>onboard</strong> IDE channel, otherwise the pc froze at the f&#8217;n &#8220;<code>Verifying DMI pool data ...</code>&#8221; stage, like it happened with the other cards.</li>
<li>Even if there was a hard disk connected to the onboard IDE controller, the motherboard could not boot from the CD-ROM drive if another hard disk was connected to the PCI IDE controller.</li>
<li>The hard disk which I intended to use on that machine would not work if it was connected to the onboard IDE controllers. It seems that the ATA 133 HDD had difficulties working on an old ATA 33-only channel.</li>
</ol>
<p>Under such complicated conditions, the only way to install a Linux distribution on a hard disk of newer technology than my old Quantums, was to:</p>
<ol>
<li>Disconnect the Western Digital hard disk from the PCI controller and leave an old Quantum HDD on the onboard IDE channel.</li>
<li>Adjust the boot device sequence, so that the mobo boots from the CDROM device.</li>
<li>Install Linux on the old HDD.</li>
<li>Power-off and connect the newer HDD on the PCI controller.</li>
<li>Move the Linux installation from the old HDD to the new one.</li>
</ol>
<p>The move of the Linux installation would be possible by following the steps of a tutorial like the &#8220;<a href="http://tldp.org/HOWTO/Hard-Disk-Upgrade/">Hard-Disk Upgrade HOWTO</a>&#8220;, if old-school partitions were used, or, in the case of LVM partitions, the move could be easily performed with the following procedure:</p>
<ol>
<li>Having connected the new HDD, I would initialize the free space as a physical volume, so it could be used in an LVM setup.</li>
<li>Then I&#8217;d add this new physical volume to the existing Volume Group, eg: vgextend volume_group /dev/sdb</li>
<li>Finally, I would use the <strong>pvmove</strong> utility in order to move the data from the old physical volume (on the Quantum HDD) to the new physical volume (WD HDD), eg: <code>pvmove sda sdb</code></li>
</ol>
<p>One may think of other ways too, but these will do. For those of you who do not feel very comfortable with moving your installation around, read on&#8230;</p>
<h4>Smart Boot Manager</h4>
<p>One may wonder why I didn&#8217;t use <a href="http://sourceforge.net/projects/btmgr/">Smart Boot Manager</a>, which can boot the machine from any connected device, instead of doing all of this monkey stuff.</p>
<p>The reason is simple. The smart-boot-manager image, which is available from the project&#8217;s website, does not work for me. I tried to boot that image in <strong>qemu</strong> without success. On the other hand, smart-boot-manager images are all over the web, but&#8230; would you ever write an image, which has been downloaded from <em>Mr.Unknown</em>&#8216;s home page, to your server&#8217;s hard disk Master Boot Record? I would <strong>never</strong> do that, even if I had to do twice as much monkey stuff as I have described above!</p>
<p>Fortunately, I soon found out that a smart-boot-manager image is included in a source that I can <strong>fully trust</strong>; in the <a href="http://www.ubuntu.com/">Ubuntu</a> ISO image, under the <code>install</code> directory, you will find: <code>sbm.bin</code></p>
<p>This worked <strong>OK</strong> under QEMU:</p>
<pre class="console"># qemu -m 64 sbm.bin</pre>
<p>So, after all this, here is what I did in order to install Fedora 7 directly on the new hard disk, which was connected to the PCI IDE controller.</p>
<ol>
<li>First, I removed the HDD from the PCI controller and left only the HDD on the onboard IDE controller.</li>
<li>I set the boot sequence so that it boots from the cdrom.</li>
<li>I used the Ubuntu CD in order to get to a console.</li>
<li>I wrote the smart boot manager image to the Quantum hard-disk with: dd if=sbm.bin of=/dev/hda</li>
<li>Powered-off the system and connected the new HDD to the PCI controller.</li>
<li>I adjusted the boot sequence so to boot from the HDD on the onboard controller.</li>
<li>Put the Fedora Rescue CD in the CDROM drive.</li>
<li>Reboot the machine. At the Smart-Boot-Manager menu, I selected the CDROM option.</li>
<li>IU performed a network installation and used 100MB of the HDD on the onboard controller for the <code>/boot</code> partition and the new disk for the rest of the system partitions using <strong>LVM</strong>.</li>
</ol>
<p>Hardware manufacturers have managed to transform me to a monkey for a couple of days. I have wasted time and money and I still cannot decide about who I am supposed to blame for this mess.</p>
<p>PS: It seems that the good old Quantum HDDs will stay on duty ;)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/">Hard disk upgrade on an old motherboard</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2009/01/04/always-use-a-block-device-label-or-its-uuid-in-fstab/" rel="bookmark">Always use a block device label or its UUID in fstab</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/18/udev/" rel="bookmark">UDEV</a></li>
<li><a href="http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/" rel="bookmark">Smart Bookmarks in Epiphany</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/30/change-the-console-resolution/" rel="bookmark">Change the console resolution</a></li>
<li><a href="http://www.g-loaded.eu/2007/04/25/how-to-create-a-windows-bootable-cd-with-mkisofs/" rel="bookmark">How to create a Windows bootable CD with mkisofs</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Sony Ericsson K320i &#8211; Advanced Feature List</title>
		<link>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/</link>
		<comments>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/#comments</comments>
		<pubDate>Fri, 11 May 2007 18:11:54 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[K320i]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/</guid>
		<description><![CDATA[Mobile phones have never been one of my interests, but lately I decided to spend some more time exploring their capabilities. This includes phone maintenance, data management, data synchronization, networking etc. I do not own any expensive cellular phones (this is a matter of principal). Currently, I use an old Siemens S45 and a Sony-Ericsson [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile phones have never been one of my interests, but lately I decided to spend some more time exploring their capabilities. This includes phone maintenance, data management, data synchronization, networking etc. I do not own any expensive cellular phones (this is a matter of principal). Currently, I use an old Siemens S45 and a Sony-Ericsson K320i. The S45 is not being manufactured any more and the K320 is a rather cheap one, but as you will notice, it has all the necessary features to keep me busy. This post, although it outlines the K320i advanced features, it also shows how to retrieve such information from your phone.<br />
<span id="more-392"></span><br />
I won&#8217;t go into much detail about the features of the Siemens S45. It&#8217;s an old phone with limited capabilities. What worths mentioning is that the phone&#8217;s flash memory can be mounted by using the <a href="http://chaos.allsiemens.com/siefs/">SieFS</a> filesystem, which is a filesystem in userspace (works through <a href="http://fuse.sourceforge.net/">FUSE</a>).</p>
<h4>The K320i Features</h4>
<p>For the regular feature listing, please visit the manufacturer&#8217;s website.</p>
<p>What I will describe here is how to get a list of the phone capabilities that are available over the USB and the Bluetooth interfaces under the Linux operating system.</p>
<p><strong>This post is being written in a very fast pace. I&#8217;ll add much more detail when I have enough free time.</strong></p>
<h4>Preparation</h4>
<ol>
<li>Connect the phone to the computer using the USB cable.</li>
<li>Connect a Bluetooth USB dongle that works with your distro to your computer.</li>
<li>Turn on Bluetooth on the phone.</li>
</ol>
<h4>Over the USB Interface</h4>
<p>Once the phone has been connected to the computer with the USB cable, two device nodes, <code>/dev/ttyACM0</code> and <code>/dev/ttyACM1</code>, should be created. Unless you have adjusted the permissions on these devices so you can manage them from a regular user account, use root to browse the phone capabilities over the USB interface:</p>
<pre class="console">
# obexftp -t /dev/ttyACM0 -X
</pre>
<pre class="codesnp">
Connecting...failed: connect
Still trying to connect
Connecting...done
Receiving "(null)"...&lt; ?xml version="1.0" encoding="UTF-8"?&gt;
&lt; !DOCTYPE Capability SYSTEM "obex-capability.dtd"&gt;
&lt;!--
 XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB
--&gt;
&lt;capability Version="1.0"&gt;&lt;general&gt;&lt;manufacturer&gt;Sony Ericsson&lt;/manufacturer&gt;
&lt;model&gt;K320i&lt;/model&gt;
&lt;sn&gt;XXXXXXXXXXXXXXXXXX&lt;/sn&gt;
&lt;sw Version="XXXXXXXXXXXXXXX" Date="XXXXXXXXXXXX"/&gt;
&lt;language&gt;EN&lt;/language&gt;
&lt;memory&gt;&lt;memtype&gt;DEV&lt;/memtype&gt;
&lt;location&gt;/&lt;/location&gt;
&lt;/memory&gt;
&lt;/general&gt;
&lt;service&gt;&lt;name&gt;Folder-Browsing&lt;/name&gt;
&lt;uuid&gt;XXXXXXXX-XXXXXX-XXXX-XXXXX-XXXXXXXXXXXX&lt;/uuid&gt;
&lt;version&gt;1.0&lt;/version&gt;
&lt;object&gt;&lt;type&gt;x-obex/folder-listing&lt;/type&gt;
&lt;/object&gt;
&lt;ext&gt;&lt;xnam&gt;Pictures&lt;/xnam&gt;
&lt;xval&gt;Folder=/Pictures&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Camera Pictures&lt;/xnam&gt;
&lt;xval&gt;Folder=/Picturesimage/camera_semc/100MSDCF&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Videos&lt;/xnam&gt;
&lt;xval&gt;Folder=/Videos&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Cam. Video Clips&lt;/xnam&gt;
&lt;xval&gt;Folder=/Videos/camera&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Sounds&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Ringtones&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds/ringtones&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;VideoDJ&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds/videodj&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Themes&lt;/xnam&gt;
&lt;xval&gt;Folder=/Themes&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Others&lt;/xnam&gt;
&lt;xval&gt;Folder=/Other&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;/service&gt;
&lt;/capability&gt;
done
Disconnecting...done
</pre>
<p>The phone&#8217;s serial number and some other info has been replaced by Xs.</p>
<p>As you can clearly see, there is nothing to get excited about over the USB interface. It seems that by using the openobex utilities over the USB interface all I can do is transfer files etc.</p>
<h4>Over the Bluetooth Interface</h4>
<p>Here you will use two utilities, <strong>hcitool</strong> and <strong>sdptool</strong>. Both are part of the <strong>bluez-utils</strong> package in Fedora.</p>
<p>First, scan for your device, so to get its hardware address (replaced by Xs here):</p>
<pre class="console">
# hcitool scan
Scanning ...
        XX:XX:XX:XX:XX:XX       GNOT
</pre>
<p>Then browse the available phone services that are available over the bluetooth interface:</p>
<pre class="console">
# sdptool browse XX:XX:XX:XX:XX:XX
</pre>
<pre class="codesnp">
Browsing XX:XX:XX:XX:XX:XX ...
Service Description: Sony Ericsson K320
Service RecHandle: 0x10000
Service Class ID List:
  "PnP Information" (0x1200)
Service Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100
Service Name: Serial Port
Service RecHandle: 0x10002
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Service Name: HF Voice Gateway
Service RecHandle: 0x10003
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0101
Service Name: HS Voice Gateway
Service RecHandle: 0x10004
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100
Service Name: OBEX Object Push
Service RecHandle: 0x10005
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100
Service Name: OBEX File Transfer
Service RecHandle: 0x10006
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 6
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100
Service Name: OBEX SyncML Client
Service RecHandle: 0x10007
Service Class ID List:
  UUID 128: XXXXXXXx-xXXXXXXXXXXXXXX-XXXXXXX-XXXXXXx
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
  "OBEX" (0x0008)
Service Name: OBEX IrMC Sync Server
Service RecHandle: 0x10008
Service Class ID List:
  "IrMC Sync" (0x1104)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
  "OBEX" (0x0008)
Profile Descriptor List:
  "IrMC Sync" (0x1104)
    Version: 0x0100
Service Name: NAP service
Service Description: NAP description
Service RecHandle: 0x10009
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ8: 0 6 dd
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100
Service Name: Mouse &#038; Keyboard
Service Description: Remote Control
Service Provider: Sony Ericsson
Service RecHandle: 0x1000a
Service Class ID List:
  "Human Interface Device" (0x1124)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 17
  "HIDP" (0x0011)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Human Interface Device" (0x1124)
    Version: 0x0100
</pre>
<p>Please note, that it is still possible to retrieve this list by using obexftp:</p>
<pre class="console"># obexftp -b XX:XX:XX:XX:XX:XX -X</pre>
<p>But, I prefer <code>sdptool</code>&#8216;s output.</p>
<p>Now this is becoming interesting! As you can see, over the BT interface the phone can be used as a modem, one can connect to its serial interface and execute AT commands, transfer files to and from the phone, synchronize the data with the data on the computer (IrMC and SyncML), it can act as a Network Access Point (NAP) or can be used as remote control.</p>
<p>Actually, what I did not manage to do is to establish a working network connection between the mobile phone and the computer (over the BNEP interface). All other things seem to work fine.</p>
<p>I&#8217;ll publish separate articles about how to accomplish all these tasks and I&#8217;ll also look for any info about how to create a Personal Area Network (PAN) between the phone and the computer. What seems to be the problem is how to trigger the phone so that it gets an IP address from the LAN&#8217;s DHCP server. Anyway, I don&#8217;t have enough time for this right now, but it is in my TODO list.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/">Sony Ericsson K320i &#8211; Advanced Feature List</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/" rel="bookmark">Send a text file as SMS with a Sony-Ericsson mobile</a></li>
<li><a href="http://www.g-loaded.eu/2007/08/20/mailing-list-manager/" rel="bookmark">Mailing List Manager</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/add-files-to-totem-playing-list-from-nautilus/" rel="bookmark">Add files to Totem playing list from Nautilus</a></li>
<li><a href="http://www.g-loaded.eu/2009/05/07/drupal-tip-list-a-nodes-taxonomy-terms-inside-a-block/" rel="bookmark">Drupal Tip: List a node&#8217;s taxonomy terms inside a Block</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/" rel="bookmark">Organizing Mailing List messages with Evolution</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>How a CPU fan goes down</title>
		<link>http://www.g-loaded.eu/2006/09/04/how-a-cpu-fan-goes-down/</link>
		<comments>http://www.g-loaded.eu/2006/09/04/how-a-cpu-fan-goes-down/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 14:34:57 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hardware]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/09/04/how-a-cpu-fan-goes-down/</guid>
		<description><![CDATA[I hate hardware failures. I hate them even more when they happen when I am busy with other things and don&#8217;t have the time or the mood to deal with such unexpected situations. Well, this is all about my home server&#8217;s CPU fan that suddenly decided to stop working in the middle of the night. [...]]]></description>
			<content:encoded><![CDATA[<p>I hate hardware failures. I hate them even more when they happen when I am busy with other things and don&#8217;t have the time or the mood to deal with such unexpected situations.<br />
<span id="more-249"></span><br />
Well, this is all about my home server&#8217;s CPU fan that suddenly decided to stop working in the middle of the night. That old CPU (Pentium II) is a bit overclocked and the last thing I would wish is to discover a fried chip. This could turn the old computer to a useless piece of hardware or would require me to go hunting for a replacement chip&#8230; Fortunately, I discovered this problem this afternoon, after checking my monitoring software (<a href="http://cacti.net/">Cacti</a>) by luck. At the same time, I realized that an alert system, within Cacti, would prove to be extremely useful in such occasions.</p>
<p>Anyway, this is the graph that shows the CPU fan go down&#8230; I must admit that the fan did try to continue doing its job :-)</p>
<p><img class="centered" src="http://static.flickr.com/96/233767552_4e89240faf_o.jpg" alt="CPU fan goes down" /><br />
<small>(This image is hosted on <a href="http://www.flickr.com/">Yahoo! Flickr</a>)</small></p>
<p>Fortunately, I replaced the faulty fan with another one and this issue was resolved without any further problems. Maybe it&#8217;s time to re-consider any other monitoring software alternatives.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/09/04/how-a-cpu-fan-goes-down/">How a CPU fan goes down</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2010/01/02/spamassassin-fh_date_past_20xx-test-buggy-in-2010/" rel="bookmark">Spamassassin FH_DATE_PAST_20XX test buggy in 2010</a></li>
<li><a href="http://www.g-loaded.eu/2008/06/18/use-the-alternatives-system-to-switch-to-a-custom-firefox-release/" rel="bookmark">Use the Alternatives System to switch to a custom Firefox release</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/09/04/how-a-cpu-fan-goes-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>How to configure and use LIRC</title>
		<link>http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/</link>
		<comments>http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/#comments</comments>
		<pubDate>Tue, 10 Jan 2006 13:58:34 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Compiling]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[LIRC]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[Servers]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/</guid>
		<description><![CDATA[<abbr title="Linux Infrared Remote Control">LIRC</abbr> is basically a small server which can decode or transmit infra-red signals. This is a tutorial about how to set up the LIRC server and how to use it in order to control your system or specific LIRC-enabled applications with a remote control. Examples of simple or more complicated setups are also provided.]]></description>
			<content:encoded><![CDATA[<p><abbr title="Linux Infrared Remote Control">LIRC</abbr> is basically a small server which can decode or transmit infra-red signals. This is a tutorial about how to set up the LIRC server and how to use it in order to control your system or specific LIRC-enabled applications with a remote control. Examples of simple or more complicated setups are also provided.<br />
<span id="more-156"></span></p>
<h4>Prerequisites</h4>
<p>In order to use LIRC you will need the necessary hardware components, a remote control and an infrared receiver. LIRC supports a lengthy list of such devices. You can check if your equipment is supported at <a href="http://lirc.sourceforge.net/remotes/" title="Remote Controls supported by LIRC">this page</a>.</p>
<p>Next thing is to download the latest stable LIRC package from the <a href="http://www.lirc.org/" title="LIRC homepage">project page</a> and configure it properly for your equipment. For this article I&#8217;ll use the traditional way of compiling and installing software, so some such experience is required from your part. Of course, if you are into package building, you can build your own RPM or DEB package.</p>
<h4>Configure, Compile, Install</h4>
<p>Extract the LIRC package in a temporary directory (<code>~/tmp/</code>):</p>
<pre class="console"># tar -xzvf lirc-X.X.X.tar.gz -C ~/tmp/</pre>
<p>The most important part of the LIRC pre-compilation configuration is the choice of the appropriate driver for your hardware. For more info check the <a href="http://www.lirc.org/html/index.html">LIRC Documentation</a>. Normally, if you <em>know your hardware</em>, change to the directory where you have extracted the LIRC package and issue the following command in order to check which driver name you should use:</p>
<pre class="console"># ./configure --help</pre>
<p>Next, configure the package for your system. Because some kernel modules are built together with LIRC, you will need to have the <em>kernel development</em> package (eg <code>kernel-devel</code>) for your running kernel installed. To configure LIRC issue the command:</p>
<pre class="console"># ./configure &#92;
--prefix=/usr &#92;
--with-x &#92;
--with-transmitter &#92;
--enable-sandboxed &#92;
--with-moduledir=/lib/modules/$(uname -r)/extra/lirc &#92;
--with-kerneldir=/path/to/kernel/headers &#92;
--with-driver=DRIVER
</pre>
<p>Substitute <code>DRIVER</code> with the appropriate driver name and edit the path to your kernel headers/sources in the <code>--with-kerneldir</code> option. Note that the <code>--with-kerneldir</code> option can be safely omitted.<br />
We use the <code>--enable-sandboxed</code> option, so that the installation script does not try to create any device nodes for LIRC. An UDEV rule, that we will create later on, will take care of this.</p>
<p>If the configuration script fails due to missing dependencies, make sure you have all the necessary development tools, libraries and kernel headers installed in your system. Just read carefully the on-screen error messages to see what is missing.</p>
<p>After this configuration is finished, you will see a message in your terminal about which LIRC module will be used. <strong>Take a note</strong> of the module name, as you will need it later on.</p>
<p><em>NOTE</em>: On Fedora, I was not able to build the required <code>lirc_gpio</code> module. My IR receiver is attached on my KWorld TV tuner card, so this module was absolutely needed. In such a case you will probably want to read my post about the <a href="http://www.g-loaded.eu/2005/12/14/the-complete-fedora-kernel-headers/">The Complete Fedora Kernel Headers</a>.</p>
<p>Next, proceed to the LIRC compilation:</p>
<pre class="console"># make</pre>
<p>and installation. This step is needed to be done as <strong>root</strong>:</p>
<pre class="console"># make install</pre>
<p>If for any reason you want to uninstall all LIRC files, from within our current directory, issue the command:</p>
<pre class="console"># make uninstall</pre>
<p><strong>Special Note</strong>: Before you update your system kernel at some later time, you will need to uninstall LIRC. After the kernel upgrade, you will have to repeat the previous configuration, compilation and installation steps, so that the LIRC module is built for your new kernel.</p>
<p>The final step is to create an UDEV rule, so that the LIRC devices are created properly and with appropriate permissions.</p>
<p>Create a text file, named <code>10-lirc.rules</code>, in the <code>/etc/udev/rules.d/</code> directory and add the following to it:</p>
<pre class="codesnp">KERNEL=="lirc[0-9]*", NAME=="lirc%n", GROUP=="disk", MODE=="0660"
KERNEL=="lirc0", SYMLINK=="lirc"</pre>
<p>Finally, make sure you add the users you want to have access to the LIRC server to the group <code>disk</code>. Alternatively, if you want all the users to be able to access LIRC, then modify the <code>MODE</code> in the UDEV rule above from <code>MODE==&quot;0660&quot;</code> to <code>MODE==&quot;0666&quot;</code>.</p>
<p>That&#8217;s it.</p>
<h4>The LIRC Server Configuration</h4>
<p>It seems that the LIRC daemon (<code>lircd</code>) does not load the default module (driver) automatically when it starts, so this module should be loaded manually.</p>
<p>To load the appropriate module and the LIRC server at boot time, all you have to do is to add the following lines to the <code>/etc/rc.d/rc.local</code> file. As <strong>root</strong>:</p>
<pre class="codesnp">modprobe MODULE_NAME
lircd</pre>
<p>Substitute <code>MODULE_NAME</code> with the module name you had taken a note of when configuring LIRC. For me, it would be <code>lirc_gpio</code>. The LIRC daemon, by default, uses the driver that was defined during the LIRC pre-compilation configuration.</p>
<p>The LIRC daemon also needs a configuration file (<code>/etc/lircd.conf</code>), which contains the proper addresses of your remote control&#8217;s buttons. The LIRC package contains some ready made remote configs, but I suggest you create your own. Read on&#8230;</p>
<h4>The Remote Control Configuration file</h4>
<p>In this section we will create a configuration file for our remote control by using an utility named <code>irrecord</code>, which was built together with the rest of the LIRC components. Since irrecord is a <code>lircd client</code>, the LIRC daemon needs to be running prior to using this tool.</p>
<p>So, as <strong>root</strong>, load the appropriate LIRC module and start the daemon:</p>
<pre class="console"># modprobe MODULE_NAME
# lircd</pre>
<p>Now, change to a temporary directory and start irrecord:</p>
<pre class="console"># irrecord REMOTE_NAME</pre>
<p><code>REMOTE_NAME</code> is the remote control config file that will be created in the current directory. This will also be the name of your remote control that will be used within the created file. If you need to change it, do it by hand after this operation is finished. All you have to do is to follow the on-screen instructions. Generally, you will be asked to give names for the remote control buttons and to press each one of them.</p>
<p>After you are finished, copy the <code>REMOTE_NAME</code> file into <code>/etc/</code>, naming it <code>lircd.conf</code>. As <strong>root</strong>:</p>
<pre class="console"># cp REMOTE_NAME /etc/lircd.conf</pre>
<p>Kill the running lircd instance and start the daemon again, so that it uses the new configuration:</p>
<pre class="console"># killall lircd
# lircd</pre>
<h4>Applications and LIRC Support</h4>
<p>There are three kinds of applications:</p>
<ol>
<li>Those which could and actually have been built with LIRC support. These act as LIRC clients when there is a running LIRC daemon.</li>
<li>Those which do support LIRC, but have not been compiled with the LIRC support enabled.</li>
<li>Those which do not support LIRC at all.</li>
</ol>
<p>Generally, most multimedia applications, video and audio players, TV viewers and FM tuner applications, support LIRC. Also, many applications provide a method (separate utility or options) to send commands to a running instance of the application. This is particularly useful for programs that belong to the 2nd and 3rd categories. LIRC provides an utility, called <code>irexec</code> (LIRC client), which can be used to execute any command we want. This way, those applications can be controlled with the remote control through LIRC.</p>
<p>In order to use our remote control with a certain application, we have to create a configuration file that contains the mappings between the remote control&#8217;s buttons and the commands that will be executed when each button is pressed.</p>
<p>This file can be:</p>
<ul>
<li>named <code>.lircrc</code> and placed in the user&#8217;s home directory.</li>
<li>named <code>lircrc</code> (without the period in front of the name) and placed in the <code>/etc/</code> directory for system-wide configuration.</li>
</ul>
<p>Information about this file&#8217;s format can be found in the relevant section of the <a href="http://www.lirc.org/html/configure.html#lircrc_format">LIRC Documentation</a>.</p>
<h4>Quick Tests</h4>
<p>Here are some sample <code>.lircrc</code> files, so that you can test your installation. Make sure you have loaded the proper LIRC module and you have started the LIRC daemon. Save one of them as <code>.lircrc</code> and place it in your home directory.</p>
<p><strong>Special Note</strong>: In the following sample config files, substitute the remote control name with the name you have used for your own remote control and the button name with a name of any of your own remote control&#8217;s buttons.</p>
<p>The first two samples will work with Xine and MPlayer respectively. These two players are usually built with LIRC support and, when launched, they act as LIRC clients.</p>
<p>Load Xine and press the specified button on your remote control. It should toggle between full-screen and window-mode.</p>
<pre class="codesnp">
# .lircrc - XINE sample test
begin
    prog = xine
    remote = KWTV878RF
    button = ZOOM
    config = ToggleFullscreen
    repeat = 0
end
</pre>
<p>Use the following config with MPlayer.</p>
<pre class="codesnp">
# .lircrc - MPLAYER sample test
begin
    prog = mplayer
    remote = KWTV878RF
    button = ZOOM
    config = vo_fullscreen
    repeat = 0
end
</pre>
<p>For applications that are not LIRC clients themselves, but which provide a method to send commands to a running instance of the application, the configuration is a bit different. The LIRC client <code>irexec</code> is used in these cases. When you press a button on the remote control, <code>irexec</code> executes the specified command. This requires that <code>irexec</code> is running. Start it as a user:</p>
<pre class="console"># irexec</pre>
<p>Save the following as <code>.lircrc</code> and launch TVtime. The specified button on the remote control should toggle between full-screen and window-mode.</p>
<pre class="codesnp">
# .lircrc - TVtime sample test
begin
    prog = irexec
    remote = KWTV878RF
    button = ZOOM
    config = tvtime-command TOGGLE_FULLSCREEN
    repeat = 0
end
</pre>
<p>To start <code>irexec</code> and have it run in the background, start it as shown below:</p>
<pre class="console"># irexec &#038;</pre>
<p>To kill it:</p>
<pre class="console"># killall irexec</pre>
<h4>Some hints for more complicated configurations</h4>
<p>Here are some hints for those of you who need complicated setups.</p>
<h5>Toggle Buttons</h5>
<p>You can create <strong>toggle buttons</strong>, for example you can set the same button to <em>Play</em> or <em>Pause</em> a video stream, by setting two <code>config = command</code> directives. They will be executed in turns. For example:</p>
<pre class="codesnp">
# Toggle button example
begin
    prog = irexec
    remote = remoteA
    button = buttonA
    config = play_command
    config = pause_command
    repeat = 0
end
</pre>
<p>Using this configuration, when <code>buttonA</code> is pressed for the first time, the <code>play_command</code> is executed. The second time <code>buttonA</code> is pressed, the <code>pause_command</code> is executed.</p>
<h5>Modes</h5>
<p>Let&#8217;s assume that you want to control many applications with your remote control. Some of them are LIRC clients and some are controlled through <code>irexec</code>. You can define various <strong>modes</strong> (groups of button to command mappings), one for each application.</p>
<p>First of all, read the <code>.lircrc</code> format page from the <a href="http://www.lirc.org/html/configure.html#lircrc_format">LIRC Documentation</a> very carefully.</p>
<p>Keep in mind the following rule:</p>
<blockquote><p>Each time you start a LIRC client and there is a mode within your configuration with a name equal to the application&#8217;s name, then this mode is automatically entered.</p></blockquote>
<p>This means that if there is a mode named <em>mplayer</em> inside <code>.lircrc</code> and you start the mplayer program, which is a LIRC client, then the mplayer mode is automatically entered and only the button mappings that exist within this mode are functional.</p>
<p>Save the following as <code>~/.lircrc</code>, substitute the remote control name and button names with your own, and start irexec:</p>
<pre class="codesnp">
# Example with modes
# MAIN BEGIN (irexec mode) - Application Selection Mode
# ---------------
begin irexec
    begin
        prog   = irexec
        remote = KWTV878RF
        button = 1
        # Start TVtime
        config = tvtime --window &#038;
        # Enter tvtime mode
        mode = tvtime
    end
    begin
        prog   = irexec
        remote = KWTV878RF
        button = 2
        # Start Totem player and play DVD
        config = totem dvd:/ &#038;
        # Enter totem mode
        mode = totem
    end
    begin
        prog   = irexec
        remote = KWTV878RF
        button = 3
        # Start Xine and play DVD
        config = xine dvd:/ --hide-gui &#038;
        # Enter xine mode
        mode = xine
    end
end irexec
# ---------------
# MAIN END (irexec mode end)
# APP MODES BEGIN
# ---------------
# tvtime mode
begin tvtime
    begin
        prog = irexec
        button = POWER
        config = tvtime-command QUIT
        # Enter irexec mode
        mode = irexec
    end
    begin
        prog = irexec
        button = ZOOM
        config = tvtime-command TOGGLE_FULLSCREEN
    end
end tvtime
# totem mode
begin totem
    begin
        prog = irexec
        button = POWER
        config = totem --quit
        # Enter irexec mode
        mode = irexec
    end
    begin
        prog = irexec
        button = ZOOM
        config = totem --fullscreen
    end
end totem
# xine mode
begin xine
    begin
        prog = xine
        button = POWER
        config = Quit
        # Enter irexec mode
        mode = irexec
    end
    begin
        prog = xine
        button = ZOOM
        config = ToggleFullscreen
    end
end xine
# ---------------
# APP MODES END
</pre>
<p>I hope this example is clear enough. What is going on here is that when <code>irexec</code> (LIRC client) is executed, then the <em>irexec mode</em> is entered. When you press button &quot;1&quot;, then TVtime is launched and the <em>tvtime mode</em> is entered. When you press the &quot;POWER&quot; button, TVtime quits and the <em>irexec mode</em> is entered etc. etc.</p>
<p>Furthermore, even if you do not start <code>irexec</code>, when you launch any LIRC enabled application, like Xine, MPlayer, Gnomeradio etc, then the appropriate mode will be entered automatically and you will be able to control this application remotely.</p>
<p>As you have probably already read in the <a href="http://www.lirc.org/html/configure.html#lircrc_format">LIRC Documentation</a>, you can modularize this configuration by keeping each application mode in a separate file. Just don&#8217;t forget to include those separate files by adding a line like the following in <code>~/.lircrc</code>. For example:</p>
<pre class="codesnp">include ~/.lirc/tvtime.lircrc</pre>
<h4>Final Notes</h4>
<p>Maybe you will need some time to familiarize yourself with the <code>.lircrc</code> format and probably more time reading the LIRC documentation, but you will be satisfied with the result.</p>
<p>For information about what commands are available for each application, please refer to the application&#8217;s documentation, project web site or support forum.</p>
<p>Also, if you need more information or support for LIRC, please ask your questions in relevant web forums. I have written all I know in this guide, so I am afraid I cannot help you more.</p>
<p>LIRC can do more things, for example it can be used to transmit IR signals or to connect to other LIRC servers accross the network. These have not been covered, not only because I consider such info as &quot;too much&quot; for a new user, but also because I have not been able to devote any time to experiment with these features.</p>
<p>This guide was written while using a Fedora 4 system.</p>
<h4>Further Reading</h4>
<p>You should read:</p>
<ol>
<li><a href="http://www.lirc.org/html/index.html">The LIRC Manual</a> (Documentation)</li>
</ol>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/">How to configure and use LIRC</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/09/09/kernel-2617-and-lirc_gpio-driver/" rel="bookmark">Kernel 2.6.17 and lirc_gpio driver</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/14/the-complete-fedora-kernel-headers/" rel="bookmark">The Complete Fedora Kernel Headers</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/" rel="bookmark">Creative PC-CAM Series webcams in linux</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/20/build-a-single-native-kernel-module/" rel="bookmark">Build a single native kernel module</a></li>
<li><a href="http://www.g-loaded.eu/2008/05/12/how-to-disable-ipv6-in-fedora-and-centos/" rel="bookmark">How to Disable IPv6 in Fedora and CentOS</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Creative PC-CAM Series webcams in linux</title>
		<link>http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/</link>
		<comments>http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/#comments</comments>
		<pubDate>Sun, 30 Oct 2005 06:29:12 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[WebCam]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=64</guid>
		<description><![CDATA[This post is about a Creative PC-CAM 750, but it will do for all the Creative PC-CAM series web cameras. I had it somewhere in a closet for a long time and finally decided to try it in fedora. As it usually happens with webcams under linux, it did not work out-of-the-box as there was [...]]]></description>
			<content:encoded><![CDATA[<p>This post is about a <strong>Creative PC-CAM 750</strong>, but it will do for all the Creative PC-CAM series web cameras. I had it somewhere in a closet for a long time and finally decided to try it in fedora. As it usually happens with webcams under linux, it did not work out-of-the-box as there was no native kernel driver support. So, I spent some time googling and found out that this model is supported by the <a href="http://mxhaard.free.fr/download.html">spca5xx</a> driver project. I compiled and installed the kernel module and used <strong>spcaview</strong> (part of a set of tools for the spca5xx module &#8211; you can download them from the link above) to try the camera. It works better than I thought it would. I also tried gnomemeeting and it worked very well too.<br />
<span id="more-64"></span><br />
Here are some step-by-step notes to get you going fast:</p>
<ol>
<li>Download the <strong>spca5xx</strong> driver source from <a href="http://mxhaard.free.fr/download.html">here</a> and extract the archive in a directory.</li>
<li>If you do not have the development tools installed, just do a:
<pre class="console"># yum groupinstall "Development Tools"</pre>
</li>
<li>You also need to install the kernel sources:
<pre class="console"># yum install kernel-devel</pre>
</li>
<li>Change to the directory where you had previously extracted the driver and run
<pre class="console"># make</pre>
</li>
<li>The following installs the kernel module, so that the webcam is properly detected when plugged in. You will be prompted for the root&#8217;s password. So, run:
<pre class="console"># su -c "make install"</pre>
</li>
<li>Plug the camera in.</li>
</ol>
<p>This device functions as a webcam and a digital camera. However, the spca5xx driver supports it only as a webcam, meaning that it is registered as a <strong>video4linux</strong> device when plugged into the system. The retrieval of the pictures stored in the camera&#8217;s internal memory should be done using <strong>gphoto2</strong> or <strong>gthumb-import</strong>. Actually, they do not work for my pc-cam 750. The cause of this may be gphoto2&#8242;s experimental support for the Creative PC-CAMs or a conflict with the spca5xx driver. Anyway, I care very little about it as this is not my primary digital camera, but I think I&#8217;ll try to investigate this issue when I have some time to spare.</p>
<p>I am writing all this just to say that if a gthumb-import dialog shows up as soon as you plug the camera in (this is controlled by GNOME&#8217;s Removable Drives and Media settings), just ignore it and <strong>hit Cancel</strong>. For me, if I try to import the stored pictures, it gives an error and additionaly the device is not registered as a V4L device, so I need to unplug and replug the device or unload and reload the spca5xx module.</p>
<p>Normally, your webcam&#8217;s device node should be <strong>/dev/videoX</strong>, where <strong>X</strong> is a number which depends on how many V4L devices are currently registered into the system.</p>
<p>Now, you can fire up <strong>gnomemeeting</strong> and start using the webcam. Alternatively, you may want to use <strong>spcaview</strong> to test the various driver settings. You can download this from the driver&#8217;s project page. Just compile it and use it like this:</p>
<pre class="console"># ./spcaview -d /dev/videoX</pre>
<p>Check the included README file for further usage info.</p>
<p>Moreover, the spca5xx driver&#8217;s README file contains useful information about the module&#8217;s supported options. You can set these options in <strong>/etc/modprobe.conf</strong>, so that they are applied every time the module is loaded. For example, you could set:</p>
<pre class="codesnp">options spca5xx GRed=217 GBlue=300 GGreen=224 gamma=4</pre>
<p>If you ever need to uninstall the driver module, just change to the driver&#8217;s source directory and run:</p>
<pre class="console"># su -c "make uninstall"</pre>
<p>Keep in mind that <strong>every time you upgrade your kernel</strong>, you will need to <strong>recompile</strong> and <strong>reinstall</strong> the spca5xx module. I may provide a spec file in a future update of this blog post, so that you can easily create an RPM package of this module.</p>
<p>This post will also be updated with notes about picture retrieval from the camera&#8217;s internal memory.</p>
<p>Have fun!</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/">Creative PC-CAM Series webcams in linux</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/" rel="bookmark">Creative PC-CAM 750 on Fedora 10</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/09/kernel-2617-and-lirc_gpio-driver/" rel="bookmark">Kernel 2.6.17 and lirc_gpio driver</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/20/build-a-single-native-kernel-module/" rel="bookmark">Build a single native kernel module</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/25/logwatch-and-dovecot-1x-series-in-fc5/" rel="bookmark">Logwatch and Dovecot 1.x series in FC5</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/10/how-to-configure-and-use-lirc/" rel="bookmark">How to configure and use LIRC</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2005/10/30/creative-pc-cam-750/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

