<?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/"
	>

<channel>
	<title>matmrosko.com &#187; linux</title>
	<atom:link href="http://matmrosko.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://matmrosko.com</link>
	<description>geeky thoughts</description>
	<lastBuildDate>Thu, 24 Jun 2010 06:15:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Chumby Remote &#8211; Part 1</title>
		<link>http://matmrosko.com/2010/02/26/chumby-remote-part-1/</link>
		<comments>http://matmrosko.com/2010/02/26/chumby-remote-part-1/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 08:49:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[c/c++]]></category>
		<category><![CDATA[chumby]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://matmrosko.com/?p=148</guid>
		<description><![CDATA[Part 1 of my &#8220;Chumby Remote&#8221; series will cover the Chumby classic proc entry for emulating touchscreen clicks and bend sensor presses. Overview If you&#8217;re unfamiliar with the Chumby, you should go to their website and check them out. They&#8217;re a &#8216;cute&#8217; little Internet device that is meant to be an always-on appliance to &#8220;keep [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://matmrosko.com/files/2010/02/chumbyLogo.gif" alt="" title="chumbyLogo" width="147" height="113" class="alignright size-full wp-image-161" />Part 1 of my &#8220;Chumby Remote&#8221; series will cover the Chumby classic proc entry for emulating touchscreen clicks and bend sensor presses.</p>
<h3>Overview</h3>
<p>If you&#8217;re unfamiliar with the Chumby, you should go to their website and check them out.  They&#8217;re a &#8216;cute&#8217; little Internet device that is meant to be an always-on appliance to &#8220;keep you connected&#8221; to your digital life.  I have one on my night stand that is no more than a glorified alarm clock that I&#8217;ve had it since April of 2008 and justified the cost by saying it would be a new hobby since I love working with embedded systems devices.  The enjoyment is even better since the Chumby is completely* &#8220;open&#8221; and there&#8217;s a very helpful community.  Unfortunately life got in the way of the new potential &#8220;hobby&#8221; and it took until &#8220;paternity leave&#8221; for my second child for me to have any amount of free time to dedicate to hacking my Chumby.  When the Chumby One was announced, I promptly ordered one since certain aspects were even easier for hacking (microSD rootfs, r/w filesystem, easier to &#8220;hack&#8221; case for adding a serial console).</p>
<h3>The Idea</h3>
<p>This project started because I wanted to be able to remotely start/stop Pandora radio as well as disable alarms if I woke up prior and didn&#8217;t want to wake up my wife.  Chumby provides event interfaces for starting/stopping certain music sources, but Pandora isn&#8217;t one of them.  ChumbyLurker has also written a nifty perl cgi script that will allow remote editing of alarms (which had a couple bugs) that wasn&#8217;t around when I came up with my idea.  I have enough web experience as well as linux experience to get this working rather quickly, so off I went.</p>
<h3>Getting to work</h3>
<p><strong>Step 1</strong> &#8211; See how the touchscreen device is getting information to the Chumby flash player.  With a quick look to the loaded modules, it was obvious the module &#8220;chumby_tsc2100&#8243; was the touchscreen driver.</p>
<p><strong>Step 2</strong> &#8211; Obtaining the source was as easy as going to http://files.chumby.com/ which has the complete source for (almost) everything on the Chumby platform as it is (almost) all GPLv2 software.  I imported all of the Chumby kernels available into a git repository for easy tracking of differences between firmware revisions as released by Chumby Industries.</p>
<p><strong>Step 3</strong> &#8211; Modify the source.  I chose /proc entries as my &#8220;entry point&#8221; for emulating touches because I&#8217;m familiar with them so it would be a quick and easy way to get things working.  With only a few lines of code in an hour or so, I was able to get emulated touch screen presses working by echoing coordinates to the new proc entry.  Similarly I added an entry for the &#8220;bend&#8221; sensor on the top of the chumby.</p>
<pre class="prettyprint">
$ echo "300 300" > /proc/chumby/touchscreen/coordinates
$ dmesg | tail -n 1
[2001256.670000] pen down - set coordinates x=1, y=1
$ echo "0 0" > /proc/chumby/touchscreen/coordinates
$ dmesg | tail -n 1
[2001261.680000] pen up
$ echo 1 > /proc/sense1
$ dmesg | tail -n 1
[2001395.680000] bent
$ echo 0 > /proc/sense1
$ dmesg | tail -n 1
[2001401.220000] not bent
</pre>
<p>If you&#8217;re a git user, you should be able to branch from 2.6.16, throw on the chumby kernel, then use git am to apply these patches:</p>
<ul>
<li><a href='http://matmrosko.com/files/2010/02/0001-Turn-down-noise-in-sense-read.patch'>0001-Turn-down-noise-in-sense-read</a></li>
<li><a href='http://matmrosko.com/files/2010/02/0002-Implement-a-forced-bend-sensor-press-proc-entry.patch'>0002-Implement-a-forced-bend-sensor-press-proc-entry</a></li>
<li><a href='http://matmrosko.com/files/2010/02/0003-Implement-forced-touch-screen-pen-event-proc-entry.patch'>0003-Implement-forced-touch-screen-pen-event-proc-entry</a></li>
</ul>
<p>*Note: The control panel is not open source, although through the Chumby forums Chumby Industries respond to a lot of input from the community.</p>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2010/02/26/chumby-remote-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combining PDFs in Linux</title>
		<link>http://matmrosko.com/2007/11/08/combining-pdfs-in-linux/</link>
		<comments>http://matmrosko.com/2007/11/08/combining-pdfs-in-linux/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 06:52:11 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[combine]]></category>
		<category><![CDATA[ghostscript]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://www.matmrosko.com/2007/11/08/combining-pdfs-linux/</guid>
		<description><![CDATA[A while back I had a series of PDF documents that were in chapter forms. If my memory serves me correctly, it was the teacher book which included answers in college. I didn&#8217;t want 20 pdfs, I wanted only one. Here&#8217;s how to combine them all on the command line with ghost script installed: gs [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I had a series of PDF documents that were in chapter forms.  If my memory serves me correctly, it was the teacher book which included answers in college.  I didn&#8217;t want 20 pdfs, I wanted only one.  Here&#8217;s how to combine them all on the command line with ghost script installed:</p>
<p><code><br />
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=book.pdf ch00.pdf ch01.pdf ch02.pdf ch03.pdf ch04.pdf ch05.pdf ch06.pdf ch07.pdf ch08.pdf ch09.pdf ch10.pdf ch11.pdf ch12.pdf ch13.pdf ch14.pdf ch15.pdf ch16.pdf index.pdf biblio.pdf<br />
</code></p>
<p>That combines chapters 0-16, then index and bibliography (in that order) into book.pdf!</p>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2007/11/08/combining-pdfs-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
