<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>prupert</title>
	
	<link>http://www.prupert.co.uk</link>
	<description>putting the know back in technology</description>
	<lastBuildDate>Wed, 25 Aug 2010 09:38:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/pruperting" /><feedburner:info uri="pruperting" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Install the Latest Version of LCD4LINUX on Ubuntu</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/H5WnGovvYz8/</link>
		<comments>http://www.prupert.co.uk/2010/08/12/install-the-latest-version-of-lcd4linux-on-ubuntu/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:00:40 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=438</guid>
		<description><![CDATA[Update: It seems that I need to add some additional steps when installing on a completely vanilla version of Ubuntu. So I have added all the steps that should now be required. Despite the most recent version (0.11.0) of lcd4linux being released in November 2009, Ubuntu Lucid comes with an older version and thus misses [...]]]></description>
			<content:encoded><![CDATA[<p>Update: It seems that I need to add some additional steps when installing on a completely vanilla version of Ubuntu. So I have added all the steps that should now be required.</p>
<p>Despite the most recent version (0.11.0) of <a href="http://ssl.bulix.org/projects/lcd4linux/" target="_blank">lcd4linux</a> being released in November 2009, Ubuntu Lucid comes with an older version and thus misses out on some new features and drivers, in particular drivers for the cool and cheap Pertelian X2040. <a href="http://ssl.bulix.org/projects/lcd4linux/wiki/Pertelian"><img class="alignright size-medium wp-image-439" title="Pertelian" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/model1-300x224.jpg" alt="" width="300" height="224" /></a></p>
<p>It is however, possible to build the latest version of lcd4linux from source, but you need to do a few things in order to get it to work.</p>
<p>This little guide assumes you have built stuff before on Ubuntu, so have all the necessary build tools.</p>
<p>First, navigate to the folder you want to download and build the source in.</p>
<p>Then, download the latest version via svn:</p>
<p><code>svn co https://ssl.bulix.org/svn/lcd4linux/trunk lcd4linux</code></p>
<p>Next, navigate into the newly created source folder using <code>cd lcd4linux</code> and install some dependencies:</p>
<p><code>sudo apt-get install automake autoconf m4 perl libtool gettext</code></p>
<p>Then, run ./configure, if you want to include a specific driver, for instance for Pertelian, include it here, like this:<br />
<code>./configure --with-drivers=Pertelian</code><br />
Now, if you try to make, it wont work, I am not sure why, but there are some issues. To fix these, issue the two following commands:<br />
<code>mkdir m4</code><br />
<code>sudo ln -sf /usr/share/libtool/config/ltmain.sh .</code><br />
Now, you can run:<br />
<code>make</code><br />
<code>sudo make install</code><br />
And you now have a working and up-to-date lcd4linux. I&#8217;d recommend using checkinstall rather than make install, because you can uninstall the package at a later date if you want.</p>
<p>Doing all this allows me to run my Pertelan display on my little thin client that I use as a baby monitor. It now tells me the PIDs of FFmpeg and motion (so that I know that they are working and running), that the Internet connection is UP and the system load, alongside the date and time!<img class="alignleft size-medium wp-image-441" title="My Pertelian display." src="http://www.prupert.co.uk/wp-content/uploads/2010/08/2010-08-12-14.19.23-300x225.jpg" alt="" width="300" height="225" /></p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=438" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/12/install-the-latest-version-of-lcd4linux-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/12/install-the-latest-version-of-lcd4linux-on-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Backup All your Files Using Google Docs</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/hr37dbhM304/</link>
		<comments>http://www.prupert.co.uk/2010/08/10/backup-all-your-files-using-google-docs/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 15:54:49 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=432</guid>
		<description><![CDATA[Google Docs recently upgraded to allow you to upload any file to Google Docs. This very handy feature means, if you purchase a little extra storage from Google, you can use Google Docs as your personal online backup service. Google offer a variety of storage plans: 20 GB ($5.00 USD per year) 80 GB ($20.00 [...]]]></description>
			<content:encoded><![CDATA[<p>Google Docs recently upgraded to allow you to upload any file to Google Docs. This very handy feature means, if you <a href="https://www.google.com/accounts/PurchaseStorage" target="_blank">purchase a little extra storage from Google</a>, you can use Google Docs as your personal online backup service. Google offer a variety of storage plans:</p>
<p><img class="alignright size-medium wp-image-434" title="gladi1" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/gladi1-300x177.png" alt="" width="300" height="177" /></p>
<div id="_mcePaste">20 GB ($5.00 USD per year)</div>
<div id="_mcePaste">80 GB ($20.00 USD per year)</div>
<div id="_mcePaste">200 GB ($50.00 USD per year)</div>
<div id="_mcePaste">400 GB ($100.00 USD per year)</div>
<div id="_mcePaste">1 TB ($256.00 USD per year)</div>
<div id="_mcePaste">2 TB ($512.00 USD per year)</div>
<div id="_mcePaste">4 TB ($1,024.00 USD per year)</div>
<div id="_mcePaste">8 TB ($2,048.00 USD per year)</div>
<div id="_mcePaste">16 TB ($4,096.00 USD per year)</div>
<p>From what I remember when I looked in to it, these prices are pretty good compared to dedicated online backup services (though anyone who needs and can afford the 16TB option needs their head examined!). The only issue is how to get all your files into Google Docs. Well, if your Command Line-Fu is strong, you could use <a href="http://code.google.com/p/googlecl/" target="_blank">Google CL</a>, but it doesn&#8217;t work with a batch of files, unless you write some cunning script. A much easier alternative is to use software from <a href="http://www.gladinet.com/" target="_blank">Gladinet</a>, in particular their Gladinet Cloud Desktop tool. <img class="alignright size-medium wp-image-433" title="gladi2" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/gladi2-300x177.png" alt="" width="300" height="177" />This allows you to define various backup tasks, allowing you to sync folders and their subfolders to a folder in Google Docs (or Picasa or a number of other online sources). All your folders and subfolders are backed up to Google Docs, with the folder structure being replicated in Google Docs. You can set these tasks to run every day and it should only update new and changed files. I have been using it for the past month or so and it seems to work fairly well. The only real issue is due to slow upload speeds, but I am not sure whether this is an issue with my broadband provider or a limitation of the Google Docs servers. Either way, the results are that all my files are backed up to Google Docs automatically.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=432" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/10/backup-all-your-files-using-google-docs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/10/backup-all-your-files-using-google-docs/</feedburner:origLink></item>
		<item>
		<title>Use Dropbox as Your Own Personal Source Repository</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/VHjLAMmg-dA/</link>
		<comments>http://www.prupert.co.uk/2010/08/10/use-dropbox-as-your-own-personal-source-repository/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 15:18:05 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=429</guid>
		<description><![CDATA[Dropbox is an awesome little service, allowing you to sync various files between devices (PCs, Andriod and iPhones for example). Whilst there are lots of uses of the Dropbox service, I tend to use it for two main things. The first is as my own personal SVN-esque server. I set up a folder in my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.dropbox.com/" target="_blank">Dropbox</a> is an awesome little service, allowing you to sync various files between devices (PCs, Andriod and iPhones for example). Whilst there are lots of uses of the Dropbox service, I tend to use it for two main things.<img class="alignright size-full wp-image-430" title="dropbox" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/dropbox.jpg" alt="" width="270" height="187" /></p>
<p>The first is as my own personal SVN-esque server. I set up a folder in my main Dropbox &#8220;root&#8221; directory, by default in Windows this is under &#8220;My Documents/My Dropbox&#8221;. Any code I write, I save in this folder. The code is then synced to all my PCs automatically by Dropbox, allowing me to work on the code from anywhere. As I use <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> to write my code, I have set this folder as the default source folder for my workspace in both my Windows and Ubuntu version of Eclipse. Thus, all I need to is open up Eclipse and hit F5 to refresh and get all my updated sources, thanks to Dropbox!</p>
<p>I do the same for the music tracks I am working on under <a href="http://www.renoise.com/" target="_blank">Renoise</a>. By saving all my songs in a folder under the main Dropbox folder, the tracks are synced across all my accounts. As Renoise is cross-platform (to a degree) I can simply open up Renoise on both my Windows and Ubuntu machines and work on the same track. Sweet. This trick works for any cross platform program. You can do it for your Firefox or Google Chrome profiles, or even your Music Library!</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=429" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/10/use-dropbox-as-your-own-personal-source-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/10/use-dropbox-as-your-own-personal-source-repository/</feedburner:origLink></item>
		<item>
		<title>The Best, Most Useful and Most Awesome Android Apps</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/jTrNwu9TuGQ/</link>
		<comments>http://www.prupert.co.uk/2010/08/09/the-best-most-useful-and-most-awesome-android-apps/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 15:05:20 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Recommendations]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=413</guid>
		<description><![CDATA[I&#8217;m a big fan of Google&#8217;s Android OS and have been using my Android phone for about ten months now. It seems one of the most common questions on the interwebosphere related to Android is &#8220;What are the best Android apps?&#8221;. Well, I aim to give my small contribution to that question by listing the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of Google&#8217;s Android OS and have been using my Android phone for about ten months now. It seems one of the most common questions on the interwebosphere related to Android is &#8220;What are the best Android apps?&#8221;. Well, I aim to give my small contribution to that question by listing the apps I use most often on my HTC Hero running Android 2.1.</p>
<p>First off, there is the choice over the biggest app of all, which version of Android to use. Although I use a HTC Hero, I am not a big fan of the Sense interface, so instead I have chosen to install a vanilla (plain) rooted version of Android. As I am using a custom ROM (the name given to the OS that the phone runs) I can choose to use a more modern version of Android than is currently available on the HTC Hero. Thus, whilst other UK Orange HTC Hero users are <em>still waiting </em>for Orange to get their update out there, I have been rocking Android 2.1 for over two months now. I use <a href="http://www.vanilladroid.com/" target="_blank">RaduG&#8217;s VanillaEclair</a> ROM which is pretty damn perfect. For those that don&#8217;t know, the advantage of running a rooted version of a ROM means you can install certain apps that have added functionality and you have greater control over your phone, more about this later. <img class="alignright size-medium wp-image-414" title="radug" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/radug-300x260.png" alt="" width="300" height="260" /></p>
<p>The second most important app (and from now on I am only talking about real apps here) is what Home app to use. The Home app is the one that you see and use almost all the time. It is the first screen you see after you unlock your phone and it is what displays the menu of all your apps . The default Android Home app isn&#8217;t bad, but there is certainly room for improvement. There are a number of Home apps out there, both free and paid for with various functions. I have settled on the rather awesome <a href="http://www.launcherpro.com/" target="_blank">LauncherPro</a>. LauncherPro is based on the stock Android Home app, but it has a myriad of improvements. First off, it has a dock at the bottom, that is fully customisable, allowing you to put shortcuts to apps, contacts and folders right on the bottom of your Home screen. Even better, you can have up to three docks, which you can swype between, so you can have 12 shortcuts. Furthermore, a newly released feature allows you to add a gesture shortcut to each of those shortcuts, so swiping up on a shortcut opens up another shortcut, so you can have in effect 24 shortcuts in all. <img class="alignleft size-medium wp-image-415" title="launchpro" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/launchpro-200x300.png" alt="" width="200" height="300" />As you can see on my screenshot, I have a shortcut for the browser, the phone, messaging and gmail. The middle &#8220;blocks&#8221; button takes me to my menu of apps. You can also see another excellent feature of LauncherPro, the ability to give message indications for certain shortcuts, in this screenshot it is showing I have 2 unread gmails, ooh, how popular I am. LauncherPro also features some of the more popular features from alternative Home apps, like ADW Launcher and HTC&#8217;s Sense &#8211; a &#8220;helicopter&#8221; overview of all your home screens and scrollable widgets, more about them in second. <img class="alignright size-thumbnail wp-image-416" title="helicopteroverview" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/helicopteroverview-150x150.png" alt="" width="150" height="150" />There are two versions of LauncherPro, the free version, called LauncherPro and a paid for improved version called LauncherPro Plus. LauncherPro Plus includes additional features (and more are being added all the time), the main ones are three built-in widgets: bookmarks, calendar and people. You can see the calendar widget in the screenshot to the right, it basically shows you your upcoming appointments. The great thing is that it is scrollable, so you can scroll through about a month ahead to see what is coming up. The people widget shows a pre-selected group from your contacts and is also scrollable, clicking on a contact pops up a context sensitive menu with various options to interact with that person. The bookmark widget shows thumbnails of all your bookmarks, though I have not used that widget yet, so can&#8217;t say more than that. I&#8217;d highly recommend the Plus version, if only to support the excellent developer of LauncherPro, as it is a one-man show.</p>
<p>My next awesome app is <a href="http://tasker.dinglisch.net/" target="_blank">Tasker</a>, but I have already mentioned this app in a <a href="http://www.prupert.co.uk/2010/04/28/locale-vs-settings-profile-vs-tasker/" target="_blank">previous post</a> so I wont go on about it here. Basically, Tasker allows you to set up various profiles that enable or disable various settings. It essentially allows you take full control of your phone. Lifehacker wrote <a href="http://lifehacker.com/5599116/how-to-turn-your-android-phone-into-a-fully+automated-superphone" target="_blank">some</a> <a href="http://lifehacker.com/5601133/push-your-automated-android-to-awesome-heights-with-these-tasker-setups" target="_blank">cool</a> <a href="http://lifehacker.com/5606284/three-handy-tasker-profiles-from-our-readers" target="_blank">guides</a> on how to take full advantage of Tasker. <img class="alignright size-medium wp-image-419" title="tasker" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/tasker-200x300.png" alt="" width="200" height="300" />You can see some examples of the profiles I use in the screenshot to the right. So, for example during the day, I turn on my data connection and auto-sync, but at night these are off, to save battery power. Another profile simply notifies me when the phone is charged, so I don&#8217;t leave it plugged in the charger for an age. It is an incredibly powerful tool and helps you take total control over your phone.</p>
<p>Up next is <a href="http://matrixrewriter.com/android/" target="_blank">Titanium Backup</a>. This app only works on a phone with a rooted ROM, as I mentioned earlier. It&#8217;s one of those awesome apps that you keep installed and only use occasionally, but is very useful when you use it. <img class="alignleft size-medium wp-image-424" title="titanium" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/titanium-200x300.png" alt="" width="200" height="300" />It allows you to backup all your apps and their associated data. Then, when you come to install a new ROM, you can simply restore that backup and all your apps, with all their settings as you left them. Nice. You can also use it to backup pretty much anything else as well, such as your contacts, text messages, browser bookmarks etc etc.</p>
<p>Next on the list is the rather awesome <a href="http://www.alk.eu.com/copilot/android/" target="_blank">CoPilot Live v8</a>. Whilst Google&#8217;s Navigation app is certainly useful, it only works online and gets into trouble if you veer off course without an internet connection &#8211; which in the UK can happen from time to time, especially if you are on Orange. CoPilot is in a whole different league when it comes to SatNav apps. It is just beautiful, works really well and is very easy to use. <img class="alignright size-medium wp-image-425" title="copilot" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/copilot-200x300.png" alt="" width="200" height="300" />It has a few additional features, like nearby Points Of Interest indicators, the ability to route missing out toll roads and bridges and live tracking. You can buy maps for most of the major countries in Europe and the United States for a reasonable amount (way cheaper than the cost of maps for v7). I used it on an 8 hour round-trip and it didn&#8217;t flake out on me once. Because all the maps are stored on your SD card, it works offline, so you never loose where you are or where you are going. I wouldn&#8217;t be surprised if they come out with a new version next year supporting 3D models of buildings in major cities, ala Google Earth, but that will no doubt require the purchase of a new licence and no doubt a new phone to power it all!</p>
<p>Next on the list is the rather cool <a href="http://android.nextapp.com/site/systempanel" target="_blank">SystemPanel</a>. This is a great app for keeping an eye on your phone to make sure it is running OK. It shows you which apps are running, how much memory is being used and which apps are thrashing your CPU (and hence killing your battery). It also allows you to monitor CPU and battery usage as well as data usage. Furthermore, it has an app archive facility allowing you to backup non-protected apps. <img class="alignleft size-medium wp-image-426" title="systempanel" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/systempanel-200x300.png" alt="" width="200" height="300" />It does have the ability to kill tasks and apps to &#8220;free memory&#8221;, but this is advised against, as Android is designed to use up as much memory as possible, just like Linux, so you are always going to be &#8220;low on memory&#8221;. Android kills apps itself if another app needs more memory, so task killers really aren&#8217;t useful. I use it if an app is misbehaving and to track down what app is maxing out my CPU and generally to keep tabs on my phone. It has a lovely GUI and is very reliable.</p>
<p>My final app that I would recommend is the BBC News widget by Jim Blackler. It might only be useful to users in the UK, although it does show World news if you want. It is by far the best news widget I have found. I did use AnyRSS Reader for a long time, but I never liked not having an image to view and it took up too much screen space. The BBC News widget takes up only one &#8220;slot&#8221; on your home screen, yet manages to squeeze a picture and an informative headline into that space. You can set it to regularly update throughout the day, so whenever you turn your phone on, you are always aware of the latest news around the world. You can see it in action in the screen shot a few images above, showing the news headlines (quite why the BBC thinks an article on being single is a news headline is any one&#8217;s guess, but that&#8217;s modern media for you) and David Cameron&#8217;s latest foreign policy gaff.</p>
<p>There is one more app that I use everyday, but it is quite specific to me. <a href="http://hit-mob.com/forums/viewtopic.php?f=7&amp;t=18" target="_blank">IP Cam Viewer</a> is a great app if you need easy and quick access to images from an IP Webcam. I have a baby daughter and have set up a night-vision webcam to monitor her during the night and day when she sleeps. IP Cam Viewer allows me to keep tabs on her late at night and when it gets dark when we are putting her to bed. The developer of the app is very active, updating it constantly and it even supports audio from some webcams.</p>
<p><img class="alignright size-medium wp-image-427" title="ipcamviewer" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/ipcamviewer-200x300.png" alt="" width="200" height="300" />It worked perfectly with my cheap Fosscam ripoff from eBay (until I punched a hole through the microphone by accident and the plug literally fell apart in my hand!). If you need a way to view webcam images on your phone, I would highly recommend it.</p>
<p>That then is about it for my favourite apps on Android. Here are some other apps that I use occasionally that deserve an honorable mention: Astrid (for managing your daily tasks), Andromote (an awesome UPnP client), APNdroid (for turning off your data connection), Barcode Scanner (you know, for scanning barcodes), ConnectBot (for logging in to PCs via SSH), Dropbox (for sharing files), DroidWiki (for making awesome TiddlyWiki style notes), ES File Explorer (for browsing my files on the phone and on the LAN), Power Strip and Quick Settings (for quick access to various settings no matter what app you have open) and WaveSecure (for tracking my phone if it is lost or stolen and for backing up contacts online).</p>
<p>I hope you like the apps listed here. It is interesting to note that all the apps I have mentioned are paid-for. Whilst the majority of the apps mentioned here come in a &#8220;free&#8221; version, I find I like to thank the dev for all their hard work so am happy to upgrade to the fully featured versions.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=413" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/09/the-best-most-useful-and-most-awesome-android-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/09/the-best-most-useful-and-most-awesome-android-apps/</feedburner:origLink></item>
		<item>
		<title>Make Your Own Baby Night Vision Video Monitor…Again</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/oDiBLwTE3LM/</link>
		<comments>http://www.prupert.co.uk/2010/08/02/make-your-own-baby-night-vision-video-monitor-again/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 16:06:03 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Baby]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=393</guid>
		<description><![CDATA[So, a while back, I posted about how to hack your own baby monitor. However, it was all fairly easy and didn&#8217;t require that much geekery. This time, however, I have gone all out and have produced what I think is a neat little set-up. I am using a small thin-client PC, an HP T5700 with only [...]]]></description>
			<content:encoded><![CDATA[<p>So, a while back, I posted about how to hack your own baby monitor. However, it was all fairly easy and didn&#8217;t require that much geekery. This time, however, I have gone all out and have produced what I think is a neat little set-up.</p>
<p>I am using a small thin-client PC, an HP T5700 with only a 750Mhz Transmeta Crusoe CPU and 512MB Ram. My PC is low-power and silent (perfect as it is running in our bedroom). I am also using a cheapo <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&amp;item=220639716114#ht_3495wt_911" target="_blank">Nightvision Webcam from eBa</a>y (make sure it is true nightvision and not just some LEDs that you can turn on and off &#8211; the description needs to  say that the webcam uses IR LEDs and that they are &#8220;invisible to the human eye&#8221;) with a combined microphone.<img class="alignright size-medium wp-image-394" style="margin: 5px;" title="2010-08-02 15.27.34" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/2010-08-02-15.27.34-300x225.jpg" alt="" width="300" height="225" /></p>
<p>To stream the video from the webcam, I use the rather excellent <a href="http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome" target="_blank">motion</a> via <code>sudo apt-get install motion</code>. You&#8217;ll need to mess with the settings in motion.conf to activate the webcam server and to allow access from users other than localhost, for reference, <a title="motion.conf" href="http://www.prupert.co.uk/media/motion.conf" target="_blank">here is mine</a>. Then, all you need do is set motion running at boot, there is startup script included with motion when you install it, but I am pretty sure that is borked, so I just added &#8220;motion&#8221; to my /etc/rc.local file. Thus, to view the video, I simply browse to the http://IPADDRESSOFPC:8081, which is easily opened in VLC.</p>
<p>To stream the audio from the microphone on the webcam turned out to be a much more difficult process, as I detailed in the post prior to this one. Suffice to say, FFmpeg came to my rescue, so I simply run the command:</p>
<p><code>ffmpeg -f oss -i /dev/dsp -acodec libmp3lame -ab 32k -ac 1 -re -f rtp rtp://234.5.5.5:1234</code></p>
<p>at boot and my microphone is miraculously streamed to rtp://234.5.5.5:1234, which I can open in VLC (if you are using Linux, you have to use the most recent version of VLC, i.e. 1.1.1, previous versions don&#8217;t play well with rtp streams on Linux).</p>
<p>I use the following simple script on my laptop to view both streams, so I can see and hear our lovely daughter, even when she is sound asleep in a dark room:</p>
<pre class="brush: bash;">#!/bin/bash
echo &quot;starting vlc&quot;
VPID=( $(ps -e | grep vlc | awk '{print $1;}'))
if [ $? = 1 ];then
echo &quot;error getting vlc PID, exiting&quot;
exit
fi
while [ -n &quot;$VPID&quot; ];do
kill $VPID
VPID=( $(ps -e | grep vlc | awk '{print $1;}'))
done
cvlc http://192.168.1.5:8081 &amp;amp;
PID1=$?

echo video status $PID1
if [ &quot;$PID1&quot; == &quot;1&quot; ];then
echo &quot;error starting vlc video&quot;
exit
fi
vlc rtp://234.5.5.5:1234 --equalizer-bands=&quot;0,0,15,15,15,-20,0,0,0,0&quot; &amp;amp;
PID2=$?

echo audio status $PID2
if [ &quot;$PID2&quot; == &quot;1&quot; ];then
echo &quot;error starting vlc audio&quot;
exit
fi
exit</pre>
<p>This set-up has worked perfectly for the last week and even my wife appreciates my geeky skills on this one! Plus, I have a very small WiFi router (a La Fonera2) which makes the system completely portable, as the video feed can be viewed on pretty much any device. This now frees my IP webcams for the job they are much better suited for, home security. The end result are videos of this quality (to be clear, this is a freezeframe from the video feed, taken in a pitch black room):<img class="alignright size-medium wp-image-404" style="margin: 5px;" title="Camera 3_07-20-2010_124512AM" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/Camera-3_07-20-2010_124512AM-300x225.jpg" alt="" width="300" height="225" /></p>
<p>So, why do all this? Well, for one, it can only up your geekery skills <img src='http://www.prupert.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  But also, motion has some cool features, that, for example, let you take regular photos, allowing you to make cool time-lapse videos of your baby as she grows and develops (or sleeps through one night &#8211; man they move a lot). motion also has built-in motion detection (that is its main job) so I am sure you can configure it in such a way to act as an early warning system if the baby stops moving (I am thinking the horror that is cot-death here, but I have yet to fully look in to getting this to work yet). Also, if have a spare PC lying around that you can put aside for this, it means that in the future you can use that PC for other jobs as your baby gets older. I am planning to, for example, get a cheap touch screen monitor off eBay, to allow me to turn it into an interactive activity centre for our daughter, to help her learn numbers and the alphabet (there are already some great tools in Ubuntu for just this purpose, but I am learning Python and hope to program my own bespoke software for the job). You could add some speakers and use the PC to play soothing music to your baby to help her sleep or even go all out and hook up some kinda remote-controlled mobile. The options are endless and hopefully it&#8217;ll mean that once your baby is all grown up, she wont think of you as her embarrassing geeky mum / dad, but her &#8220;makes-really cool stuff for me to play with&#8221; mum / dad&#8230;. <img src='http://www.prupert.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignleft size-medium wp-image-395" style="margin: 5px;" title="2010-08-02 15.27.08" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/2010-08-02-15.27.08-225x300.jpg" alt="" width="225" height="300" /></p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=393" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/02/make-your-own-baby-night-vision-video-monitor-again/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/02/make-your-own-baby-night-vision-video-monitor-again/</feedburner:origLink></item>
		<item>
		<title>Stream Live Audio from a Microphone in Near Real Time in Ubuntu</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/gfgomJkYPNE/</link>
		<comments>http://www.prupert.co.uk/2010/08/02/stream-live-audio-from-a-microphone-in-near-real-time-in-ubuntu/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:01:36 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Streaming]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=381</guid>
		<description><![CDATA[I have been endeavouring over the past few months to hack my own baby monitor. I initially kinda cheated, by using an IP-webcam.  However, that isn&#8217;t nearly as geeky as using a PC and USB webcam (plus, I also wanted night-vision, and IP-webcams with nightvision are not cheap). I got myself a cheap USB webcam [...]]]></description>
			<content:encoded><![CDATA[<p>I have been endeavouring over the past few months to hack my own baby monitor. I initially kinda cheated, by using an IP-webcam.  However, that isn&#8217;t nearly as geeky as using a PC and USB webcam (plus, I also wanted night-vision, and IP-webcams with nightvision are not cheap). I got myself a cheap USB webcam from eBay that has six IR lights for nightvision and a built in mic. I&#8217;ll post later about sorting out the video feed, which turned out to be relatively easy. Sorting out the live audio feed turned out to be much harder.</p>
<p>My basic set-up is: a PC (I am using a small thin-client, so low-power and silent) running Ubuntu Lucid, a USB webcam with built in mic (with an audio output jack for the mic) and a wired connection to my LAN. I aim to listen to the audio on at least two separate PCs using VLC, so the format of the audio stream wasn&#8217;t much of an issue. It turned out to be much more difficult than I expected to get a real-time stream, as the latency with many options turned out to be terrible.<img class="alignright size-medium wp-image-383" title="alsamixer" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/alsamixer-300x159.jpg" alt="" width="300" height="159" /></p>
<p>First, I needed to determine what the audio input was. As I had only installed a minimal install of Ubuntu, I needed to install ALSA, the linux sound architecture, via <code>sudo apt-get install alsa-base alsa-utils</code>. Next, I had to set up the mixer levels, since my PC is headless and I was doing this all via SSH, I used the ncurses <code>alsamixer</code> which allows you to set mixer levels via the command line. Don&#8217;t forget to run <code>alsactl store</code> afterwards to save your settings. As a result of doing all this, /dev/dsp now pointed to my microphone input.</p>
<p>Next, I needed a way of streaming the audio over my network. As I am a big fan of FFmpeg, that was my first choice, as it comes with a rather neat little streaming server called FFserver. FFserver works in the following way, you set up various streams using an ffserver.conf file, run the server and then run FFmpeg and direct FFmpeg&#8217;s output to FFserver. Here is the <a href="http://www.prupert.co.uk/media/ffserver.conf" target="_blank">ffserver.conf</a> file that I used.</p>
<p><img class="aligncenter size-full wp-image-385" title="ffserver" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/ffserver.jpg" alt="" width="283" height="178" /></p>
<p>After lots of trial and error, I eventually got this going using the FFmpeg command: <code>ffmpeg -f oss -i /dev/dsp http://localhost:8090/feed1.ffm</code>, but the latency was terrible, hitting almost 30 seconds. From what I can gather, FFserver doesn&#8217;t get nearly as much love as FFmpeg, the FAQ for FFserver freely admits that audio and video will drift out of sync alongside other issues, so I realised that FFserver was not for me.</p>
<p>Next, I tried using icecast2. Icecast is a streaming music solution, primarily designed to allow you stream music over a network, based on WinAmp&#8217;s Shoutcast technology, essentially making your own radio station. I used icecast2 in combination with darkice (since you need a program to send the audio to the icecast server, so it has something to stream). Darkice was perfect as it is designed to stream live audio from the audio input. Both programs are configured via xml files. Here is my <a href="http://www.prupert.co.uk/media/icecast.xml" target="_blank">icecast.xml</a> and my <a href="http://www.prupert.co.uk/media/darkice.xml" target="_blank">darkice.xml</a>. You&#8217;ll have to edit both these files somewhat, to make sure the log file location is correct for example. Due to the bizzare way that alsa sometimes works, /dev/dsp doesn&#8217;t always work. So in the case of darkice, I used hw:0,0 instead. This refers to the same thing, but in a different way it seems (the reasons for it go beyond me, I think it refers to the first card and the first input (the first being 0, the second being 1 etc)).</p>
<p><img class="alignleft size-full wp-image-386" title="icecast2" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/icecast2.jpg" alt="" width="248" height="203" /></p>
<p>I would then run the icecast2 server using: <code>icecast2 -b -c ~/icecast.xml</code> and then darkice using: <code>darkice -c ~/darkice.cfg</code>. I had to run the darkice command using sudo, as there were some permission problems with accessing the mic input. This worked much better than FFserver, the delay was now down to about five seconds, but I got constant buffering issues, meaning the audio constantly cut off for ages. Also, over time, the delay would gradually get worse and worse, till it was as bad as the thirty second delay I got with FFserver. Once again, this wasn&#8217;t good enough.</p>
<p>My next effort was a complete hack, from the client PC that I wanted to listen to the audio on, I would run the following: <code>ssh server 'cat /dev/dsp &gt; /dev/dsp'</code>. This would literally copy the input from the microphone on the server (my thin client) to the output of my local PC using SSH. Remarkebly, it worked as well as using icecast, but once again there were buffering issues, as I was trasnferring raw uncompressed audio.</p>
<p>So, my next option was using VLC. From doing lots of googling, I had read many people recommending it. My issue with VLC is that it is not a lightweight option and seemed somewhat overkill to me.</p>
<p>The huge advantage with VLC is that it acts as both client and server, taking the audio input and streaming it (although it actually does this using the Live555 streaming media module).</p>
<p>VLC also allows you to stream audio using various protocols; http, rtp, rtsp among others. Once again this wasn&#8217;t easy to get working, but after lots and lots and lots of trial and error, I finally came to the following command that worked for me: <code>cvlc -vvv alsa://hw:0,0 --sout '#transcode{acodec=mp2,ab=32}/</code></p>
<p><code>:rtp{dst=192.168.1.5,port=1234,sdp=rtsp://192.168.1.5:8085/lily.sdp}' </code>.</p>
<p><img class="alignright size-full wp-image-387" title="vlc" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/vlc.jpg" alt="" width="213" height="236" /></p>
<p>This basically takes the microphone input, transcodes it into an MP2 file (despite having FFmpeg installed, VLC would refuse to transcode to MP3) and then streams it via rtp to the address rtsp://192.168.1.5:8085/lily.sdp.</p>
<p>I then simply entered rtsp://192.168.1.5:8085/lily.sdp into the network stream input in VLC on the client PC and I got live audio, in near real time!! FINALLY!! The delay was about 1.5 seconds, it required very little bandwidth and seemed to work well&#8230;..for a while. Sadly, there were three problems with this. First; only one client could connect at a time, secondly; the stream would fail after a while, sometimes after five minutes, sometime after two hours, but it would always fail and third it would totally slaughter the CPU. Once again, this was no good for listening out for a crying baby.</p>
<p>Finally, I came to the perfect solution, funnily enough going full circle and using FFmpeg. From my googling of VLC and fixing stream dropouts with rtp, I found out that FFmpeg can stream via rtp nativley, with no need to use FFserver. I thought this couldn&#8217;t possibly work, but I tried it out using the following command: <code>ffmpeg -f oss -i /dev/dsp -acodec libmp3lame -ab 32k -ac 1 -re -f rtp rtp://234.5.5.5:1234</code>. This is similiar to the VLC command, except that this time I am converting into MP3 and streaming to the address: rtp://234.5.5.5:1234. Once again, all I need to do is enter rtp://234.5.5.5:1234 as the streaming source in VLC. There are a few huge advantages with this method, first, the CPU usage is only about 25% on my naff little 750Mhz Transmeta Crusoe. Second, it seems multiple clients can connect at once and third, it seems rock solid. I have had this command running for three days straight with no problems. Memory usage seems to creep up over time, but that&#8217;s about all. I still get the roughly 1.5 seconds latency, and that is rock solid, it never gets any worse than that over time. Finally, a solution that works. So now, I use the following script, that is run at boot, to stream live audio in real time over my LAN:</p>
<p><code>#!/bin/bash<br />
echo killing old ffmpegs</code></p>
<p><code> </code></p>
<p><code>PID=( $(ps -e | grep ffmpeg | awk '{print $1;}'))<br />
if [ $? = 1 ];then<br />
echo "error getting vlc PID, exiting"<br />
exit<br />
fi<br />
if [ ! -n "$PID" ];then<br />
PID=1234567<br />
fi<br />
echo killing ffmpeg with PID $PID<br />
kill $PID</code></p>
<p><code>echo starting ffmpeg<br />
ffmpeg -f oss -i /dev/dsp -acodec libmp3lame -ab 32k -ac 1 -re -f rtp rtp://234.5.5.5:1234 2&gt; ~/ffmpeg.log &amp;</code></p>
<p><code> </code></p>
<p><code>FF=$!<br />
echo ffmpeg started with PID $FF<br />
exit</code></p>
<p>This simply kills any other FFmpeg processes running and then starts a new FFmpeg process to stream the audio input (I kill old processes, so I can run this script if for some reason the stream fails and always be sure that only one instance of FFmpeg is running at any one time).<img class="alignright size-medium wp-image-384" title="ffmepg" src="http://www.prupert.co.uk/wp-content/uploads/2010/08/ffmepg-300x75.jpg" alt="" width="300" height="75" /></p>
<p>So, it took me about a month to get this far, but I am finally happy. There are other options that I also tried but could never get to work, such as the ability to share audio inputs using Pulse Audio (I got them to share, but it seemed to constantly crash my network) or using the Live555MediaServer directly (the one that powers VLC) or MPEG4IP but they both were poorly documented and were too complicated. I&#8217;ll write up about the video portion of this next, to show how I hacked my own baby monitor.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=381" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/08/02/stream-live-audio-from-a-microphone-in-near-real-time-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/08/02/stream-live-audio-from-a-microphone-in-near-real-time-in-ubuntu/</feedburner:origLink></item>
		<item>
		<title>How To Fix Synergy+ Problems in Ubuntu and Windows</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/ydvb1BntFXY/</link>
		<comments>http://www.prupert.co.uk/2010/06/30/how-to-fix-synergy-problems-in-ubuntu-and-windows/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 10:30:03 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=375</guid>
		<description><![CDATA[I use the excellent Synergy+ program to share my mouse and keyboard between my Windows XP box and my Ubuntu Lucid box. However, since upgrading to Lucid, I was having all types of problems with the versions of synergy and synergy-plus in the repos (mainly around use of CAPS and Shift being permanently on). Upgrading [...]]]></description>
			<content:encoded><![CDATA[<p>I use the excellent <a title="Synergy Plus" href="http://code.google.com/p/synergy-plus/" target="_blank">Synergy+</a> program to share my mouse and keyboard between my Windows XP box and my Ubuntu Lucid box. However, since upgrading to Lucid, I was having all types of problems with the versions of synergy and synergy-plus in the repos (mainly around use of CAPS and Shift being permanently on). Upgrading to the latest nightly builds seem to have fixed this, but there were a few install issues that needed to be sorted. <img class="alignright size-full wp-image-376" title="logo" src="http://www.prupert.co.uk/wp-content/uploads/2010/06/logo.png" alt="" width="42" height="42" /></p>
<p>I got the .deb package for Ubuntu and the Windows installer from the Google Code hosted Synergy+ nightly build page, found <a title="Synergy Plus Nightly Builds" href="http://synergy-plus.org/packages/" target="_blank">here</a>. The .deb package installed with no problems, as did the Windows installer. However, the Windows program wouldn&#8217;t load, it had lots of missing .dlls errors.</p>
<p>The missing dlls are libgcc_s_dw2-1.dll, QtCore4.dll, QtGui4.dll and QtNetwork4.dll. A quick Google led me to loads of issues related to various QtXXXX4.dll problems that are seemingly mostly fixed by installing EA&#8217;s Download Manager (since most of the posters were having Sims3 issues (nice one EA!)) or some awful bloat-ware that claimed to scan your PC&#8217;s registry. Errr, no thanks to that, downloading random dlls is dangerous. So, I went to the source for the dlls; <a title="Qt" href="http://qt.nokia.com/products/" target="_blank">Qt from Nokia</a>. Download the most recent version (you don&#8217;t need the SDK) from <a title="Qt Download" href="http://qt.nokia.com/downloads" target="_blank">here</a> and choose LGPL and Qt: Framework only and install the package (it is rather huge at over 200MB, but hey ho).  Once installed, navigate to this folder &#8220;C:\Qt\4.6.3\bin&#8221; (the version number might be different if it gets updated, but just find the bin folder) and copy the four missing dlls to here: &#8220;C:\Program Files\Synergy+\bin&#8221; (the location &#8216;may&#8217; be different on Vista and Windows 7.</p>
<p>So, to recap. Copy:</p>
<p>libgcc_s_dw2-1.dll, QtCore4.dll, QtGui4.dll and QtNetwork4.dll</p>
<p>From &#8220;C:\Qt\4.6.3\bin&#8221;</p>
<p>To &#8220;C:\Program Files\Synergy+\bin&#8221;.</p>
<p>Finally, you can now run Synergy+, configure it if need be (though since I was running an older version of Synergy, my configs were already setup) and off you go. No more issue (hopefully:))!</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=375" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/06/30/how-to-fix-synergy-problems-in-ubuntu-and-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/06/30/how-to-fix-synergy-problems-in-ubuntu-and-windows/</feedburner:origLink></item>
		<item>
		<title>How To Configure Wireless / WiFi Networking in Ubuntu via the Command Line (CLI)</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/AgIDxH4yQ_U/</link>
		<comments>http://www.prupert.co.uk/2010/06/25/how-to-configure-wireless-wifi-networking-in-ubuntu-via-the-command-line-cli/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 15:42:40 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WiFi]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=370</guid>
		<description><![CDATA[There are a number of tutorials available on-line for sorting out WiFi in Ubuntu via the CLI, but most of them seem quite outdated, so I decided to do my own. I did this on a minimal install of Ubuntu Lucid, so it is as up-to-date as possible. The PC I was using has no [...]]]></description>
			<content:encoded><![CDATA[<p>There are a number of <a title="Ubuntu HowTo" href="http://ubuntuforums.org/showthread.php?t=202834" target="_blank">tutorials </a>available on-line for sorting out WiFi in Ubuntu via the CLI, but most of them seem quite outdated, so I decided to do my own.</p>
<p>I did this on a minimal install of Ubuntu Lucid, so it is as up-to-date as possible. The PC I was using has no Windows Manager of Graphical Display Manager, just the good old terminal so all this is done via the CLI only. I did this using a USB WiFI dongle, but it should be the same whether you use an internal card or a USB card.</p>
<p>First, you need to install the relevant software. You need to have a wired connection at this point, otherwise this wont work.</p>
<p><code>sudo apt-get install wireless-tools wpasupplicant</code></p>
<p>If you are connecting to an open network, you wont need wpasupplicant. Next, you need to &#8220;bring up&#8221; (essentially this means activate) your WiFi interface. So, issue:</p>
<p><code>sudo ifconfig wlan0 up</code></p>
<p>Next, to make sure your wireless device is working as it should issue:</p>
<p><code>iwconfig</code><br />
and then<br />
<code>sudo iwlist scan</code></p>
<p>This should show you some wireless networks as proof that the WiFi device is working, if something goes wrong here, then there is a problem with your device or driver and you need to get googling.</p>
<p>If you are accessing a secured network and you really should be, you need to access the correct version of your WiFi key. To get your key, issue this command:</p>
<p><code>wpa_passphrase YOURSSID YOURWIFIPASSWORD </code></p>
<p>This will result in something that looks like this:</p>
<p><code>network={<br />
ssid="YOURSSID"<br />
#psk="YOURWIFIPASSWORD"<br />
psk=fe727aa8b64ac9b3f54c72432da14faed933ea511ecab1 5bbc6c52e7522f709a<br />
} </code></p>
<p>You need to make a note of the long phrase after psk= (NOT #psk=) as this your WiFi password in hex format.</p>
<p>Next, you need to edit your interfaces file, so issue:</p>
<p><code>sudo nano /etc/network/interfaces</code></p>
<p>At the end of this file, you need to add your WiFi configuration. Here are the options you can add.</p>
<p>auto wlan0     #change this to the name of your WiFi interface<br />
iface wlan0 inet dhcp     #this is normally fine, if you want a static IP address replace &#8220;dhcp&#8221; with &#8220;static&#8221;<br />
netmask 255.255.255.0     #change this as appropriate for your network, this value is usually right<br />
gateway 192.168.1.1     #change this as appropriate for your network<br />
address 192.168.1.100     #only needed for a static IP address<br />
dns-nameservers 192.168.1.1     #only needed for a static IP address<br />
wpa-driver wext     #you shouldn&#8217;t need to change this<br />
wpa-ssid YOURSSID     #just type the name of your SSID here<br />
wpa-ap-scan 1     #if the name of your SSID is hidden usually, type 2 instead of 1<br />
wpa-proto WPA    #if you use WPA1 type WPA, if you use WPA2 type RSN<br />
wpa-pairwise CCMP     #if you use AES type CCMP, if you use TKIP type TKIP<br />
wpa-group CCMP     #if you use AES type CCMP, if you use TKIP type TKIP<br />
wpa-key-mgmt WPA-PSK     #usually WPA-PSK (if you share a key) but sometimes WPA-EAP (for enterprises)<br />
wpa-psk YOURHEXKEYFROMABOVE     #the hex key that you generated earlier</p>
<p>Thus, since I am using a WiFi card that is identified as wlan0 and am connecting to a WPA1 AES encrypted network called MYPLACE that isn&#8217;t hidden without a static IP address, this is what I added:</p>
<p><code><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
netmask 255.255.255.0<br />
gateway 192.168.1.1<br />
wpa-driver wext<br />
wpa-ssid MYPLACE<br />
wpa-ap-scan 1<br />
wpa-proto WPA<br />
wpa-pairwise CCMP<br />
wpa-group CCMP<br />
wpa-key-mgmt WPA-PSK<br />
wpa-psk 71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc</code></p>
<p>Finally, comment out the top section so it looks like this:<br />
<code><br />
#auto eth0<br />
#iface eth0 inet dhcp</code></p>
<p>This stops your wired network from working. This helps to ensure there are no conflicts. Remember, if you want your wired network to work again, remove these two comments (the #).</p>
<p>Finally, save the file by pressing CTRL and X and then pressing Y to save to the file. Now, reboot and your network should come up. Yay!</p>
<p>Some people have found that this doesn&#8217;t always work, so the next thing to do is to edit the configuration file for the wpasupplicant program. Do this by issuing:</p>
<p><code>sudo nano /etc/wpa_supplicant.conf</code></p>
<p>Basically, you add pretty much the same information here as you did to the interfaces file, except without the wpa- part. So, my file looks like this:</p>
<p><code><br />
ap_scan=1<br />
ctrl_interface=/var/run/wpa_supplicant<br />
network={<br />
ssid="MYPLACE"<br />
scan_ssid=0<br />
psk=71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc<br />
key_mgmt=WPA-PSK<br />
proto=WPA<br />
pairwise=CCMP<br />
group=CCMP<br />
}</code></p>
<p>As far as I am aware, the options are the same. So, edit this file as necessary, make sure you add the ctrl_interface and network={ at the beginning and the } part at the end. Save it and try restarting again. If it still doesn&#8217;t work, then kick your PC, wish you had installed Windows 7 instead and go off and do some Googling. You&#8217;ll find the answer on the Ubuntu forums and you&#8217;ll be happy again.</p>
<p>Best of luck!</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=370" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/06/25/how-to-configure-wireless-wifi-networking-in-ubuntu-via-the-command-line-cli/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/06/25/how-to-configure-wireless-wifi-networking-in-ubuntu-via-the-command-line-cli/</feedburner:origLink></item>
		<item>
		<title>FINALLY: A Bash Progress Indicator for ffmpeg that WORKS</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/XioCXCLbf0E/</link>
		<comments>http://www.prupert.co.uk/2010/05/11/finally-a-bash-progress-indicator-for-ffmpeg-that-works/#comments</comments>
		<pubDate>Tue, 11 May 2010 16:39:40 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Transcode]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=352</guid>
		<description><![CDATA[I decided to write a progress indicator for ffmpeg video conversions. This was much much much harder than I ever anticipated. I was in for a tough time. Annoyingly, for what ever reason, ffmpeg doesn&#8217;t use Carriage Returns and Line Feeds in the expected way when it outputs its output during a conversion, resulting in [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to write a progress indicator for ffmpeg video conversions. This was much much much harder than I ever anticipated. I was in for a tough time. Annoyingly, for what ever reason, ffmpeg doesn&#8217;t use Carriage Returns and Line Feeds in the expected way when it outputs its output during a conversion, resulting in two days of stress for a noobie bashophile like me.</p>
<p><img class="alignleft size-medium wp-image-357" title="ffmpeg-logo" src="http://www.prupert.co.uk/wp-content/uploads/2010/05/ffmpeg-logo-300x75.png" alt="" width="300" height="75" /></p>
<p>Eventually, after hours of googling, I came across the solution. This script should be a very accurate indicator of the progress of a ffmpeg video conversion. It currently only tells you how far the conversion has progressed as a percentage, <span style="text-decoration: line-through;">but I will soon add an ETA and time to it as well (now added, see update below)</span>. It does this, by looking at the number of frames your input video file has, and then reading what frame ffmpeg is currently on every ten seconds, and printing out the percentage.</p>
<p><img class="size-medium wp-image-355 alignright" title="ffmpeg-progress" src="http://www.prupert.co.uk/wp-content/uploads/2010/05/Screenshot-2-300x134.png" alt="" width="300" height="134" /></p>
<p>You have to put in your own ffmpeg command if you want, mine is just for converting .mpg DVB-T recordings from MythTV to mkv files.<br />
To use the script, call the script with the full path of the file to be converted afterwards, e.g.: &#8220;./ffmpeg-progress.sh /home/prupert/FIVE.mpg&#8221; and it gives you something like this:</p>
<p>UPDATE:</p>
<p>I have now added an ETA function, which, as far as I can tell, should be pretty accurate, I&#8217;ll be testing it tomorrow to see how well it works. It is based on the remaining number of frames to process and the current fps that ffmpeg is working at. I also plan to convert the script to python, if possible, to make it cross platform and give it a GUI. It will also be called YAFF (Yet Another Ffmpeg Frontend).</p>
<p>Essentially, the script turns ffmpeg output from this:</p>
<p><code>frame=42992 fps= 21 q=29.0 size=  217692kB time=1717.72 bitrate=1038.2kbits/s dup=12 drop=0<br />
frame=43002 fps= 21 q=29.0 size=  217692kB time=1718.12 bitrate=1038.0kbits/s dup=12 drop=0<br />
frame=43018 fps= 21 q=29.0 size=  217756kB time=1718.76 bitrate=1037.9kbits/s dup=12 drop=0<br />
frame=43036 fps= 21 q=29.0 size=  217788kB time=1719.48 bitrate=1037.6kbits/s dup=12 drop=0<br />
frame=43050 fps= 21 q=29.0 size=  217820kB time=1720.04 bitrate=1037.4kbits/s dup=12 drop=0<br />
frame=43062 fps= 21 q=29.0 size=  217852kB time=1720.52 bitrate=1037.3kbits/s dup=12 drop=0<br />
frame=43078 fps= 21 q=29.0 size=  217884kB time=1721.16 bitrate=1037.0kbits/s dup=12 drop=0<br />
frame=43090 fps= 21 q=29.0 size=  217916kB time=1721.64 bitrate=1036.9kbits/s dup=12 drop=0<br />
frame=43106 fps= 21 q=29.0 size=  217948kB time=1722.28 bitrate=1036.7kbits/s dup=12 drop=0<br />
    Last message repeated 2 times<br />
[mpeg2video @ 0x8f7ebf0]ac-tex damaged at 15 0<br />
[mpeg2video @ 0x8f7ebf0]concealing 90 DC, 90 AC, 90 MV errors<br />
frame=43122 fps= 21 q=29.0 size=  217981kB time=1722.92 bitrate=1036.4kbits/s dup=12 drop=0<br />
frame=43140 fps= 21 q=29.0 size=  218045kB time=1723.64 bitrate=1036.3kbits/s dup=12 drop=0<br />
frame=43155 fps= 21 q=29.0 size=  218077kB time=1724.24 bitrate=1036.1kbits/s dup=12 drop=0<br />
frame=43168 fps= 21 q=29.0 size=  218141kB time=1724.76 bitrate=1036.1kbits/s dup=12 drop=0<br />
frame=43182 fps= 21 q=29.0 size=  218205kB time=1725.32 bitrate=1036.1kbits/s dup=12 drop=0<br />
frame=43194 fps= 21 q=29.0 size=  218237kB time=1725.80 bitrate=1035.9kbits/s dup=12 drop=0<br />
frame=43207 fps= 21 q=29.0 size=  218269kB time=1726.32 bitrate=1035.8kbits/s dup=12 drop=0</code></p>
<p>In to this:</p>
<p><code>/home/rupert/Downloads/Village of the Damned.mpg..mpg has 172447 frames, now converting<br />
ffmpeg PID = 24868<br />
ffmpeg: 43062 of 172447 frames, progress: 24% and ETA: 1h 42m 41s</code></p>
<p>Which must be a good thing in anyone&#8217;s book <img src='http://www.prupert.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The script is hosted at github, enjoy:<br />
<script src="http://gist.github.com/397509.js?file=ffmpeg-progress.sh"></script></p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">YAFF</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="www.prupert.co.uk" property="cc:attributionName" rel="cc:attributionURL">Rupert Plumridge</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England &amp; Wales License</a></p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=352" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/05/11/finally-a-bash-progress-indicator-for-ffmpeg-that-works/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/05/11/finally-a-bash-progress-indicator-for-ffmpeg-that-works/</feedburner:origLink></item>
		<item>
		<title>Python Android Weather Forecast Script</title>
		<link>http://feedproxy.google.com/~r/pruperting/~3/EMATuBUYACE/</link>
		<comments>http://www.prupert.co.uk/2010/04/28/python-android-weather-forecast-script/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 18:23:41 +0000</pubDate>
		<dc:creator>prupert</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.prupert.co.uk/?p=322</guid>
		<description><![CDATA[I am a proud owner of an HTC Hero Android phone.  I&#8217;ve recently  been messing around with one very cool looking application, that allows you to run your own scripts on the phone. This app is called Android Scripting Environment (ASE) and it is truly ace. You can use it to write and run your [...]]]></description>
			<content:encoded><![CDATA[<p>I am a proud owner of an HTC Hero Android phone. <img class="alignright size-medium wp-image-323" title="htc-hero" src="http://www.prupert.co.uk/wp-content/uploads/2010/04/htc-hero-review-300x274.jpg" alt="" width="300" height="274" /> I&#8217;ve recently  been messing around with one very cool looking application, that allows you to run your own scripts on the phone. This app is called <a href="http://code.google.com/p/android-scripting/" target="_blank">Android Scripting Environment (ASE)</a> and it is truly ace. You can use it to write and run your own Python, Shell (Bash), Lua and Ruby scripts directly on your phone. It also hooks into various Android features, allowing you to make use of various cool Android functions, one of which is getting your location and doing cool things with that information.</p>
<p><img class="alignleft" title="ASE" src="http://code.google.com/p/android-scripting/logo?logo_id=1243886539" alt="" width="48" height="48" />I&#8217;ve been wanting to get into Python for a long time and I decided that now was a good a time as any. ASE comes with a few sample scripts to get you going, one of which gets the current weather conditions for your current location and speaks it outloud (<a href="http://code.google.com/p/android-scripting/source/browse/python/ase/scripts/say_weather.py" target="_blank">say_weather.py</a> which calls <a href="http://code.google.com/p/android-scripting/source/browse/python/ase/scripts/weather.py" target="_blank">weather.py</a>). As cool as this is, being told the current conditions isn&#8217;t that useful, I wanted to know the forecast for the next day. I thus delved in and did lots of Googling, mainly using <a href="http://www.faqs.org/docs/diveintopython/kgp_parse.html" target="_blank">this awesome page</a> that teaches you how to parse XML files (which is the format Google delivers its weather forecast info in). The biggest issue was the XML feed from Google doesn&#8217;t clarify the difference between the five day forecasts until you get to an actual data reading. The XML feed looks like this:</p>
<pre class="brush: xml;">
&lt;xml_api_reply version=&quot;1&quot;&gt;
      &lt;weather module_id=&quot;0&quot; tab_id=&quot;0&quot; blah&gt;
		&lt;forecast_information&gt;
			&lt;city data=&quot;Bristol, Avon&quot;/&gt;
                        &lt;postal_code data=&quot;bs167eb&quot;/&gt;
                        &lt;latitude_e6 data=&quot;&quot;/&gt;
                        &lt;longitude_e6 data=&quot;&quot;/&gt;
			&lt;forecast_date data=&quot;2010-04-28&quot;/&gt;
                        &lt;current_date_time data=&quot;2010-04-28 12:50:00 +0000&quot;/&gt;
                        &lt;unit_system data=&quot;US&quot;/&gt;
		&lt;/forecast_information&gt;
		&lt;current_conditions&gt;
			&lt;condition data=&quot;Clear&quot;/&gt;
			&lt;temp_f data=&quot;64&quot;/&gt;&lt;temp_c data=&quot;18&quot;/&gt;
			&lt;humidity data=&quot;Humidity: 52%&quot;/&gt;
			&lt;icon data=&quot;/ig/images/weather/sunny.gif&quot;/&gt;
			&lt;wind_condition data=&quot;Wind: S at 16 mph&quot;/&gt;
		&lt;/current_conditions&gt;
		&lt;forecast_conditions&gt;
			&lt;day_of_week data=&quot;Wed&quot;/&gt;
			&lt;low data=&quot;51&quot;/&gt;
			&lt;high data=&quot;66&quot;/&gt;
			&lt;icon data=&quot;/ig/images/weather/chance_of_rain.gif&quot;/&gt;
			&lt;condition data=&quot;Chance of Rain&quot;/&gt;
		&lt;/forecast_conditions&gt;
		&lt;forecast_conditions&gt;
			&lt;day_of_week data=&quot;Thu&quot;/&gt;
			&lt;low data=&quot;46&quot;/&gt;
			&lt;high data=&quot;60&quot;/&gt;
			&lt;icon data=&quot;/ig/images/weather/chance_of_rain.gif&quot;/&gt;
			&lt;condition data=&quot;Chance of Rain&quot;/&gt;
		&lt;/forecast_conditions&gt;
		&lt;forecast_conditions&gt;
			&lt;day_of_week data=&quot;Fri&quot;/&gt;
			&lt;low data=&quot;48&quot;/&gt;
			&lt;high data=&quot;55&quot;/&gt;
			&lt;icon data=&quot;/ig/images/weather/chance_of_rain.gif&quot;/&gt;
			&lt;condition data=&quot;Chance of Rain&quot;/&gt;
		&lt;/forecast_conditions&gt;
		&lt;forecast_conditions&gt;
			&lt;day_of_week data=&quot;Sat&quot;/&gt;
			&lt;low data=&quot;44&quot;/&gt;
			&lt;high data=&quot;59&quot;/&gt;
			&lt;icon data=&quot;/ig/images/weather/chance_of_rain.gif&quot;/&gt;
			&lt;condition data=&quot;Chance of Rain&quot;/&gt;
		&lt;/forecast_conditions&gt;
	&lt;/weather&gt;
</pre>
<p>Now, I know nothing about XML at all, but I found it impossible to get the first actual forecast from the XML data, as each forecast was simply called &#8220;forecast_conditions&#8221;, using the method in the original weather.py. Thus, after reading the handy tutorial from faqs.org (listed above) I realised I needed to use the nested childNodes function of the xml.dom function that you use in Python to parse XML files.</p>
<p>After lots of trial and error, I worked out the following. A node is a name given to a section named via</p>
<pre class="brush: xml;">
&lt;some_name&gt;
</pre>
<p>. First, you assign a name (in this came dom) to the XML you are reading by doing: <code>dom = minidom.parseString(xml_response)</code>, then I want to get information out of the  node. To move through the nodes, you use the following command <code>dom1Node = dom.firstChild</code> where dom was the name of the original XML file. All this does is move to the first node and give it a name (dom1Node in my case), thus we are now at</p>
<pre class="brush: xml;">
&lt;xml_api_reply version=&quot;1&quot;&gt;
</pre>
<p>. You then use <code>dom2Node = dom1Node.firstChild</code> to move to the next node and give it a name, thus we are now at</p>
<pre class="brush: xml;">
&lt;weather module_id=&quot;0&quot; tab_id=&quot;0&quot; mobile_row=&quot;0&quot; mobile_zipped=&quot;1&quot; row=&quot;0&quot; section=&quot;0&quot;&gt;
</pre>
<p>. Finally, we have got somewhere, because the childNodes (i.e. the ones beneath the node we are at) are the ones with interesting info, such as</p>
<pre class="brush: xml;">
&lt;forecast_information&gt;
</pre>
<p>and most importantly</p>
<pre class="brush: xml;">
&lt;forecast_conditions&gt;
</pre>
<p>. So, finally, we can now assign names to these childNodes that we want. So we use <code>current = dom2Node.childNodes[1]</code> for the  node (the numbering starts at 0 not 1) and <code>forecast = dom2Node.childNodes[2]</code> for the first forecast. Finally, to get the actual data out of those nodes, we use the following command <code>data['flow'] = forecast.getElementsByTagName('low')[0].getAttribute('data')</code>. What this does is give the name &#8220;flow&#8221; to the data element with the Tag name &#8220;low&#8221; from the &#8220;forecast&#8221; node that we defined just above. So, essentially, it navigates to  and extracts the value &#8220;51&#8243; from it.</p>
<p>Thus, using this technique, you can get all the forecast data you want. I therefore ended up with this script, forecast.py, to replace the weather.py, to return forecast data:<br />
<script src="http://gist.github.com/382207.js?file=forecast.py"></script> And I then edited the say_weather.py to say the forecast as well as the current conditions, resulting in say_forecast.py: <script src="http://gist.github.com/382207.js?file=say_forecast.py"></script></p>
<p>The only problem I had with this was that the Google XML feed only appears to give the temp in fahrenheit, not celcius. I can see that you can set the iGoogle to display the temp in celcius, but I couldn&#8217;t see how to get that info from a feed.</p>
<p>Now, the next thing on the cards is to make a widget that displays this data on the homescreen. I was thinking of saving the output of the python script to a text file and then make a widget that reads that text file and displays the data. If I can do that, I can then modify the python script to do all sorts of cool things (get news, info from my mythtv HTPC etc).</p>
<p>Sadly, it seems on my version of Android (Cupcake (1.5)) you can&#8217;t call ASE scripts automatically via Locale or Tasker, since I get an ASE Force Closed message whenever I try to <img src='http://www.prupert.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  So these currently have to be run manually. Still, this is my first piece of Python coding and it was much easier than I thought it would be, once I got my head round it all.</p>
 <img src="http://www.prupert.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=322" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.prupert.co.uk/2010/04/28/python-android-weather-forecast-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.prupert.co.uk/2010/04/28/python-android-weather-forecast-script/</feedburner:origLink></item>
	</channel>
</rss>
