<?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/" version="2.0">

<channel>
	<title>Linux User</title>
	
	<link>http://www.linuxuser.co.uk</link>
	<description />
	<lastBuildDate>Fri, 24 May 2013 11:49:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Linux_User" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="linux_user" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Antergos Review – Cinnarch no more</title>
		<link>http://www.linuxuser.co.uk/reviews/antergos-review-cinnarch-no-more</link>
		<comments>http://www.linuxuser.co.uk/reviews/antergos-review-cinnarch-no-more#comments</comments>
		<pubDate>Fri, 24 May 2013 11:49:52 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Distros]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Antergos]]></category>
		<category><![CDATA[Arch]]></category>
		<category><![CDATA[cinnamon]]></category>
		<category><![CDATA[Cinnarch]]></category>
		<category><![CDATA[Gnome]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=10009</guid>
		<description><![CDATA[The distro formerly known as Cinnarch gets a new name and a new direction, but keeps its Arch Linux core]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>As one of the first, non-Mint distros to feature Cinnamon as its main desktop environment, Cinnarch was a very interesting product when it was first announced. Based on the great Arch Linux, Cinnarch offered a rock solid, rolling base with a lot of customisation features, and a selection of decent pre-installed desktop applications on top of the Cinnamon desktop environment. It was in development for just over half a year before the team decided to change the name and focus of Cinnarch, and release to the world <a href="http://www.antergos.com">Antergos</a>.</p>
<p>Antergos now uses GNOME as it&#8217;s default desktop environment, which is really the main difference between this and Cinnarch – hence the name change. It actually offers a number of desktops though during installation, and joining Cinnamon and GNOME are XFCE and the relatively unknown RazorQT, another fast and lightweight desktop. The graphical installer itself actually works now, where as in Cinnarch you could only use the command line version. The graphical one is very nice, and while they claim it was of their own creation, at the very least the interface heavily borrows from the Ubuntu installer. It&#8217;s quite fast, although the command line version can be a little quicker. That&#8217;s still pretty great as well, straightforward and easy to understand.</p>
<figure id="attachment_10011" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/antergos1.png" rel="lightbox[10009]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/antergos1.png" alt="Cinnarch Arch" width="768" height="342" class="size-full wp-image-10011" /></a><figcaption>Antergos&#8217; packages are the very latest thanks to its Arch base</figcaption></figure>
<p>The GNOME desktop is your standard version, albeit with Antergos colouring, while the Cinnarch offering maintains the top panel orientation used in Cinnarch. This is of course customisable, especially as this is also the very latest version of Cinnamon that also comes with Linux Mint 15. All the packages are bang up-to-date, which is mostly down to the rolling Arch Linux base that it runs off. To access these packages, the simplistic PacmanXG graphical frontend to pacman is available by default, and allows you to search via keyword or category for other packages you may want like any good graphical package manager. There is no update function though, so you&#8217;ll need to enter the terminal to update pacman and the other packages manually.</p>
<p>Actually using the distro has somewhat improved over the development versions, and not just with the partitioning and installation issues that used to pop up. The desktop itself is a lot smoother, and the settings and such seem to work properly. There were some weird graphical glitches we encountered though, such as disappearing mouse cursors and temperamental wallpapers affecting the look of the Cinnamon menu. Also, if you&#8217;re using the Cinnamon desktop, a phantom GNOME option pops-up on the login screen that breaks the x server until you reboot.</p>
<figure id="attachment_10012" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/antergos3.png" rel="lightbox[10009]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/antergos3.png" alt="Cinnarch Arch Cinnamon" width="608" height="456" class="size-full wp-image-10012" /></a><figcaption>The graphical installer is very similar to Ubuntu&#8217;s</figcaption></figure>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>In general we don&#8217;t think Antergos is quite ready yet. While it&#8217;s certainly an attractive prospect to have Arch pre-built with a decent selection of default software and a nice choice of desktop environments, it doesn&#8217;t quite seem worth the limitations yet, and doesn&#8217;t really add that much over taking Arch and installing your own desktop yourself. It&#8217;s definitely better than Cinnarch was though, and we&#8217;re very interested to see how the distro will develop over the year or so.</p>
<h3>Verdict</h3>
<p>3/5</p>
<p>Antergos has come on a fair bit since we last saw it as Cinnarch, however it&#8217;s still not the most stable of distros. With graphical glitches and weird hardware detection, we&#8217;d prefer to build up Arch from scratch. However, with a good selection of install options, it&#8217;s a shortcut to a decent Arch desktop.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/reviews/antergos-review-cinnarch-no-more/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zorin OS 7 Release Candidate out now</title>
		<link>http://www.linuxuser.co.uk/news/zorin-os-7-release-candidate-out-now</link>
		<comments>http://www.linuxuser.co.uk/news/zorin-os-7-release-candidate-out-now#comments</comments>
		<pubDate>Thu, 23 May 2013 14:57:49 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Distros]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[zorin]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=10018</guid>
		<description><![CDATA[Pre-release version of Zorin OS 7 Core available for testing, the RC including Linux Kernel 3.8 and an overhauled graphical interface]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Zorin OS, the Windows look-a-like distro, is quite popular among people who need a distro for Windows users who are either trying to convert, or have to use Linux but don&#8217;t wish to. The Zorin team have been making some aesthetic changes to the distro, as well as some software upgrades, and the release candidate for Zorin OS 7 is out now.</p>
<figure id="attachment_10020" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/zorin7.png" rel="lightbox[10018]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/zorin7.png" alt="Windows Ubuntu Cinnamon GNOME Unity" width="608" height="342" class="size-full wp-image-10020" /></a><figcaption>The desktop has had a small overhaul</figcaption></figure>
<p>Zorin OS 7 will come with Linux Kernel 3.8, and a couple of app replacements such as Pidgin for IM and Geary Mail for emails. The desktop environment has received as a face-lift to go with the style of the new Zorin OS logo as well.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Zorin OS 7 RC can be downloaded from the <a href="http://zorin-os.com/releasecandidate.html">Zorin OS website</a>, with the final version expected to launch soon.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/zorin-os-7-release-candidate-out-now/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Chrome updated with conversational features</title>
		<link>http://www.linuxuser.co.uk/news/google-chrome-updated-with-conversational-features</link>
		<comments>http://www.linuxuser.co.uk/news/google-chrome-updated-with-conversational-features#comments</comments>
		<pubDate>Wed, 22 May 2013 16:45:54 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[io 13]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=10005</guid>
		<description><![CDATA[Google Chrome features shown at I/O 2013 have begun their deployment into the browser, as Google Chrome now comes with better predictions]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Google&#8217;s I/O 2013 keynote last week was very exciting, and while there was no specific Android OS update, there was enough new stuff to cram into the two hour conference that we didn&#8217;t specifically need it. During the talk, Google talked about upcoming features being added to Chrome, the browser built on top of open source Chromium, including an always-listening browser and better interaction.</p>
<figure id="attachment_10007" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/IMG_0046.jpg" rel="lightbox[10005]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/IMG_0046.jpg" alt="Chromium Firefox Web Browser Opera" width="608" height="406" class="size-full wp-image-10007" /></a><figcaption>Chrome was a big topic at this years Google I/O. Picture courtesy of Google Developers</figcaption></figure>
<p>Privacy concerns aside about a browser that can always “hear” what you&#8217;re saying, the new conversation element of the searches has just been added to Google Chrome 27. You can access this from a new microphone button that shows up on the Google homepage, and remembers the searches you type so you can make a string of related questions. A classic example being given is asking a question about an individual, and then not using his name in the next search. E.g., “how old is Linus Torvalds” and “where does he live”.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>The update also improves page load speeds by 5%, and a number of <a href="http://googlechromereleases.blogspot.ca/2013/05/stable-channel-release.html">minor bug fixes and upgrades</a>. These changes haven&#8217;t made their way to Chromium yet, but some should do soon.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/google-chrome-updated-with-conversational-features/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Win prizes with a Pi Camera from Element14</title>
		<link>http://www.linuxuser.co.uk/news/win-prizes-with-a-pi-camera-from-element14</link>
		<comments>http://www.linuxuser.co.uk/news/win-prizes-with-a-pi-camera-from-element14#comments</comments>
		<pubDate>Tue, 21 May 2013 16:25:46 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[pi camera]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9999</guid>
		<description><![CDATA[Enter Element14s Road Test program to get a free Pi Camera and win Raspberry Pi accessories]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>The Pi Camera has been a long time coming, and if you&#8217;re still looking to get one of the highly sought-after Raspberry Pi cameras, you may want to check out the Road Trip competition being held by Element14.</p>
<p>The competition is open to anyone with a Raspberry Pi, and has you testing out the Pi Camera by submitting photos in four categories:</p>
<p>Your workshop / den</p>
<p>Your Pi project</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>People and Pets</p>
<p>Outdoors</p>
<p>The winners will win a whole host of brand new Raspberry Pi accessories throughout the year, and help test and promote the Pi Camera in the process.</p>
<p>Visit the <a href="http://www.element14.com/community/roadTests/1162?CMP=SOM-ROADT-RASPI-PICAMERA-ENROLL-TW">Element14 website</a> now to enter the competition, and get snapping today.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/win-prizes-with-a-pi-camera-from-element14/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mageia 3 out, no more delays</title>
		<link>http://www.linuxuser.co.uk/news/mageia-3-out-no-more-delays</link>
		<comments>http://www.linuxuser.co.uk/news/mageia-3-out-no-more-delays#comments</comments>
		<pubDate>Mon, 20 May 2013 15:09:54 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Distros]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[distro]]></category>
		<category><![CDATA[grub 2]]></category>
		<category><![CDATA[Mageia]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9994</guid>
		<description><![CDATA[Mageia 3 has finally been released after a two week delay, fixing the installation bugs of the release candidate, and bringing with it updates and refinements over Mageia 2]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>It&#8217;s been another year since the last Mageia release, and it&#8217;s successor is finally here. Improving on the already stellar Mageia 2, Mageia 3 contains all the standard package and kernel updates, along with the inclusion of Steam for Linux and other applications.</p>
<figure id="attachment_9996" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/mageia-3-desktop-550.png" rel="lightbox[9994]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/mageia-3-desktop-550.png" alt="mandriva mandrake" width="608" height="342" class="size-full wp-image-9996" /></a><figcaption>The new Mageia is a more refined version of Mageia 2</figcaption></figure>
<p>The distro was originally delayed due to various problems with installation, from hardware detection issues to booting problems depending on how and where you were installing it. The issues have apparently been fixed, with a list of bug fixes supplied on the release notes for Mageia 3.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>You can download the final release of Mageia 3 from <a href="http://www.mageia.org/en/downloads/">the website</a>, and you can also read our review of the release candidate in an upcoming issue of Linux User &#038; Developer magazine.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/mageia-3-out-no-more-delays/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux Mint 15 RC is “most ambitious release yet”</title>
		<link>http://www.linuxuser.co.uk/news/linux-mint-15-rc-is-most-ambitious-release-yet</link>
		<comments>http://www.linuxuser.co.uk/news/linux-mint-15-rc-is-most-ambitious-release-yet#comments</comments>
		<pubDate>Fri, 17 May 2013 10:59:58 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Distros]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[cinnamon]]></category>
		<category><![CDATA[Linux mint]]></category>
		<category><![CDATA[MATE]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9987</guid>
		<description><![CDATA[Linux Mint 15's release candidate is now out, with major improvements to MDM, Cinnamon, MATE and more]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Like the last Linux Mint release, Linux Mint 15 is quick on it&#8217;s feet after Ubuntu, with the release candidate out a few weeks after Canonical&#8217;s distro hit. While Ubuntu 13.04 itself didn&#8217;t really receive any major updates, Linux Mint 15 is bringing with it a whole host of new features and upgrades to the core system and its preferred desktop environments.</p>
<p>The MDM display manager now has three different main login applications, including one that&#8217;s written in HTML 5 for a new way to create animated and interactive themes. Cinnamon has a new screensaver mode which allows you to write a lock screen message for colleagues, and a few desktop widgets as well. MATE has received a small overhaul, updating a lot of its core, and there have been other updates to the software manager and driver manager.</p>
<figure id="attachment_9989" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/mintsources2.png" rel="lightbox[9987]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/mintsources2.png" alt="Perform a speed test on software sources to find the best for you" width="608" height="382" class="size-full wp-image-9989" /></a><figcaption>Perform a speed test on software sources to find the best for you</figcaption></figure>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>The release candidate can be found on the <a href="http://blog.linuxmint.com/?p=2361">Linux Mint website</a>, and the final version will likely be a week or so away.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/linux-mint-15-rc-is-most-ambitious-release-yet/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Firefox 21 for Desktop and Android out now</title>
		<link>http://www.linuxuser.co.uk/news/firefox-21-for-desktop-and-android-out-now</link>
		<comments>http://www.linuxuser.co.uk/news/firefox-21-for-desktop-and-android-out-now#comments</comments>
		<pubDate>Wed, 15 May 2013 17:03:43 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9983</guid>
		<description><![CDATA[Firefox 21 includes new social aspects for desktop, as well as new fonts and better HTML 5 support on Android]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Firefox&#8217;s rapid development has pushed the browser over version 20, with 21 out now. The new version comes with built-in Facebook messenger for Firefox, and new social providers such as Cliqz, Mixi and msnNow. These social additions are part of what Mozilla sees relevant to the current usage of the internet.</p>
<figure id="attachment_9985" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/Screenshot-from-2013-05-15-175817.png" rel="lightbox[9983]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/Screenshot-from-2013-05-15-175817.png" alt="The New Firefox" width="608" height="342" class="size-full wp-image-9985" /></a><figcaption>The New Firefox</figcaption></figure>
<p>Firefox for Android now comes with Charis and Open Sans, open source fonts that they think will make the web “more beautiful and easier to read on a user&#8217;s small screen” according to a press release. There&#8217;s also HTML 5 compatibility improvement, done in conjunction with <a href="http://html5test.com/">HTML5test.com</a>.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>You can update your browsers now on your systems and Android devices if you haven&#8217;t already.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/firefox-21-for-desktop-and-android-out-now/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi Camera on sale now</title>
		<link>http://www.linuxuser.co.uk/news/raspberry-pi-camera-on-sale-now</link>
		<comments>http://www.linuxuser.co.uk/news/raspberry-pi-camera-on-sale-now#comments</comments>
		<pubDate>Tue, 14 May 2013 11:48:31 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[camera board]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9967</guid>
		<description><![CDATA[The long-awaited Camera for Raspberry Pi is now available from RS Components and Element14]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>The Raspberry Pi&#8217;s camera has been talked about for a long time it seems, but it&#8217;s now finally able to be purchased for use with your Raspberry Pi. The Raspberry Pi foundation explained in their announcement post that the release itself was delayed for a further month while software was sorted out for the device.</p>
<p>The Raspberry Pi foundation have also release a video on how you can go about setting up your camera.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><iframe width="560" height="315" src="http://www.youtube.com/embed/GImeVqHQzsE" frameborder="0" allowfullscreen></iframe></p>
<p>There&#8217;s also some step-by-step instructions on the <a href="http://www.raspberrypi.org/archives/3890">Pi website</a>. You can buy the Pi Camera board from <a href="http://www.element14.com/community/groups/raspberry-pi-accessories">Element14</a> now for £16.56 (~$25), and the <a href="http://uk.rs-online.com/web/generalDisplay.html?id=raspberrypi">RS Components website</a> will be updated shortly with a way to purchase it.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/raspberry-pi-camera-on-sale-now/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux Kernel 3.9 – The Kernel Column with Jon Masters</title>
		<link>http://www.linuxuser.co.uk/features/linux-kernel-3-9-the-kernel-column-with-jon-masters</link>
		<comments>http://www.linuxuser.co.uk/features/linux-kernel-3-9-the-kernel-column-with-jon-masters#comments</comments>
		<pubDate>Sun, 12 May 2013 11:34:39 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[uapi]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9873</guid>
		<description><![CDATA[Jon Masters summarises the latest happenings in the Linux kernel community]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Linus Torvalds has announced the first several 3.9 kernel release candidates, following the closing of the 3.9 ‘merge window’ (period of time during which disruptive changes to the kernel and new features are merged). Merge windows are typically up to two weeks in duration (and seldom longer), though Linus has gone to great pains over the past few years to push developers not to post patches for inclusion at the very end of the window. Features merged into the kernel should instead have received heavy testing in the linux-next kernel and elsewhere, be largely complete, and posted for inclusion as early as possible during the two-week window of frantic development for a given release cycle. This is the theory, at any rate.</p>
<p>In his mail simultaneously closing the merge window, and also announcing 3.9-rc1, Linus said, “I don’t know if it’s just me, but this merge window had more ‘Uhhuh’ moments than I’m used to. I stopped merging a couple of times, because we had bugs that looked really scary, but thankfully each time people were on them like paparazzi on Justin Bieber.” Those features that made it into 3.9 include support for Synopsys’s 32-bit ‘ARC’ architecture (following a third posting of reviewed patches from Vineet Gupta), which is designed for use in embedded and DSP applications, particularly those wherein the ability to extend the CPU pipeline with custom instructions is beneficial (though this author notes that butchering a CPU pipeline comes with its own hidden costs and so isn’t something recommended for non- embedded applications).</p>
<p>Another very interesting new feature in the 3.9 kernel is support for Intel’s ‘PowerClamp’ driver. PowerClamp aims to constrain the maximum amount of power used by the system by forcing the CPUs to enter an idle state for a certain percentage of their operating time. At first glance, this may seem to be less than useless. After all, having paid good money for a powerful modern CPU (with multiple cores), most users expect to get all the oomph they can out of it. There are some users, however, where this desire is balanced by overall power constraints – in particular in data centres where there is a hard limit (often 10 or 15kW) of available power for a given rack of server equipment. Exceeding the power available to a rack can cause all of the servers in it to shut down, which is generally not what data centre users want. Google and others have encountered such problems over the past few years, and have used their own custom solutions to (presumably) good effect.</p>
<p>PowerClamp helps to generally solve the problem of hard-limits at the rack level by allowing an administrator or software management tool (‘agent’) to configure the system such that it will inject a certain number of idle states onto a given CPU. Typically, the kernel’s idle thread (idle task or idle process) will run only when there is nothing else to do. It calls a special machine instruction that will efficiently transition the processor into a lower power state from which it can be woken when there is work to do (usually through an external interrupt). In the case of PowerClamp, additional kidle_inject threads are created to run at specific times when there is a need to inject additional idle states (over and above the regular idle thread) in order to remain overall idle for the percentage of time configured by the user. Typically, PowerClamp will be used with some higher-level management software that looks to the whole rack and dynamically tunes many different systems for optimal overall power use.</p>
<h3>Ongoing development</h3>
<p>David Howells announced that “The end is nigh!” for his ongoing UAPI work. UAPI is a near year- long effort by David to clean up the kernel’s internal header files (source code containing definitions and small inline code functions typically included into kernel or application code), splitting out those parts that pertain only to the API (application programming interface) used by non-kernel ‘user space’ applications, such as the Bash shell or Firefox web browser. A typical Linux system includes many such header files within the /usr/include/linux directory. These are installed as part of compiling the kernel, during the ‘make kernel-headers’ stage.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Until now, the process of building user application usable header files involved selective copying of a limited number of kernel headers (most are not intended to be used by application code) and judicious use of special conditionals within those files to ensure the right thing would happen when they were used by non-kernel code. After David’s work, the ‘user- space API’ is more clearly defined and these pieces are separated out into files specifically intended for direct use by non-kernel code. David’s latest email suggests that only a few changes pertaining to video framebuffers remain “now that the SCSI stuff has gone in”.</p>
<p>Miklos Szeredi posted patches implementing a new ‘overlayfs’ file system. Overlay and Union file systems have been a topic of much debate for many years, particularly because they never seem to work quite right. The problem they generally attempt to solve is one of allowing several distinct file systems to be joined together, with the net result being a virtual file system (only existing as a whole at runtime) that contains selective pieces of each of its constituent parts. A typical use case is one of embedded routers or live CDs. Both contain some storage (flash memory or optical media) that is read-only, and some storage (on a RAM disk or a separate piece of storage – a USB stick, another flash etc) that can be written to. A special file system is then used to present what appears to be a selection of the content of both of these underlying stores. As files from the read-only media are modified or deleted, deltas are written to the separate writable storage instead (including special markers that indicate a file has actually been deleted). Unlike other efforts to do overlays, Miklos’s code tries to be as small as possible by generally passing through operations on open files to the underlying file systems as quickly as possible. It will be interesting to see where this goes.</p>
<p>John Stultz (of Linaro) has posted an RFC patch-in-progress that would pull support for Android’s sync driver into the staging tree. Staging is a part of the kernel source tree where experimental and not-quite-baked drivers can sit inside the kernel source while they are being cleaned up. These drivers are available only if specifically configured for use. The sync driver provides a collection of synchronisation primitives (code routines that can be used by other code to ensure operations happen in the correct order) for use with drivers that provide different parts of the graphics pipeline used with the Android SurfaceFlinger compositor.</p>
<p>Anton Vorontsov posted the latest version of a memory control groups (memcg) patch implementing memory-pressure-level event support. With this patch, applications that “want to maintain the interactivity/memory<br />
allocation cost can use the new pressure-level notifications”. What this means is that it is possible for an application to be aware of the overall pressure a system is under for memory. When Linux runs low on available free memory, it will do one of several things. This includes failing new memory allocations, swapping out certain parts of applications to disk, and freeing up internal caches. All of these have a cost in terms of overall system performance (particularly when the system hits a point of swapping large amounts of data out to slow rotational disks and is said to enter a state of ‘thrashing’) that has not historically been easily visible to end software. Now, applications can easily monitor a special event file descriptor within a memory control group and be made aware of ‘low’, ‘medium’ and ‘critical’ levels of memory as well as set specific limits at which a notification will be given. This allows an application to take steps to release unneeded in-memory caches (such as web browser pages) before the system grinds to a crawl.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/features/linux-kernel-3-9-the-kernel-column-with-jon-masters/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Emulate a Bluetooth keyboard with the Raspberry Pi</title>
		<link>http://www.linuxuser.co.uk/tutorials/emulate-a-bluetooth-keyboard-with-the-raspberry-pi</link>
		<comments>http://www.linuxuser.co.uk/tutorials/emulate-a-bluetooth-keyboard-with-the-raspberry-pi#comments</comments>
		<pubDate>Sat, 11 May 2013 11:30:35 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bluetooth keyboard]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rasperry Pi]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9876</guid>
		<description><![CDATA[Learn how to relay the input from a USB keyboard to a Bluetooth-capable device using the Raspberry Pi]]></description>
				<content:encoded><![CDATA[<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p>Today, we’ll be learning how to use a Raspberry Pi to act as a Bluetooth keyboard, and writing our own program to relay input to the client device. This will provide a useful insight into how a protocol like Bluetooth works, how sockets work, and how data is sent across simple protocols. We’ll also be learning a little bit about binary data and the different forms that it can take.</p>
<p>We’ll be using the latest Raspbian image as the operating system for our Raspberry Pi- based Bluetooth keyboard. The instructions for flashing an image to an SD card can be found on our <a href="tutorials/how- to-set-up-raspberry-pi/">original tutorial</a>. You’ll only need to go up to the step where you write the image to the SD card. You’ll have to adapt the instructions slightly for using the latest Raspbian image rather than the Debian one. The image we used was‘2012-12-16-wheezy-raspbian.zip’.</p>
<p>There are multiple ways that you can do this tutorial depending on how comfortable you are with working in a console-based environment. For example, our expert did this tutorial over SSH. If you don’t want to do that then you could do it from the console on the Raspberry Pi, or use the LXDE environment, but you’ll need a USB hub because you’ll need three USB devices: a keyboard, mouse and Bluetooth dongle.</p>
<figure id="attachment_9883" class="wp-caption alignnone"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/pairing_request.png" rel="lightbox[9876]"><img src="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/pairing_request.png" alt="Bluetooth Raspberry Pi Keyboard" title="Pairing Request" width="320" height="480" class="size-full wp-image-9883" /></a><figcaption>Pairing Request</figcaption></figure>
<h3>Resources</h3>
<p>A Raspberry Pi with all necessary peripherals</p>
<p>A USB Bluetooth dongle</p>
<p>A USB hub – if you want to use a keyboard and<br />
mouse at the same time as the Bluetooth dongle</p>
<p>A device to connect the virtual keyboard to – Liam tested it on an Android<br />
smartphone and his Linux computer</p>
<p><a href="http://www.linuxuser.co.uk/wp-content/uploads/2013/05/PiTooth.zip">PiTooth</a></p>
<h3>Step by step</h3>
<h3>Step 01</h3>
<p> Setting up the Pi</p>
<p>You’ll need to connect a power cable, network cable, the Bluetooth dongle and a USB keyboard. You’ll also need to connect a screen for the initial configuration and can use SSH from then on. Alternatively, you could use a console-based environment on the screen. If you want to use the LXDE environment then you’ll need a screen and mouse. Raspbian will boot and a configuration menu will be displayed. Choose the option to expand the root file system, as we need to install quite a few extra packages. Once you’ve done that, select Finish and then Yes to reboot the device.</p>
<h3>Step 02</h3>
<p> Logging into the Pi</p>
<p>A message will be displayed with the current IP address of the Pi during the boot process of Raspbian. This will be useful if you are using SSH, which is enabled by default on the latest Raspbian image. Open up a terminal on your Linux computer and type:</p>
<pre>ssh pi@[your Pi’s IP address].</pre>
<p>Type yes when asked if you want to connect and then enter the password raspberry. Alternatively, simply type the username pi, and password raspberry at the login screen.</p>
<h3>Step 03</h3>
<p> Installing the required packages</p>
<p>You need to run the following commands to install the required packages:</p>
<pre>sudo apt-get update

sudo apt-get install python-gobject bluez bluez-tools bluez-firmware python-bluez python-dev python-pip

sudo pip install evdev</pre>
<p>This may take a while to process, especially the second command.</p>
<p>The first command updates the list of packages available. The second command installs the required Bluetooth packages, as well as Python bindings for them. The remaining two packages are needed for installing a Python module called evdev, to capture keyboard input, that isn’t yet in the Raspbian package repositories. Instead, we need to have the Python development package present and use pip (a Python package manager) to compile the evdev module from source and then install it.</p>
<h3>Step 04</h3>
<p> Disabling the default Bluetooth plug-ins</p>
<p>By now, we’ve installed the Linux Bluetooth stack, BlueZ. By default, it comes with a bunch of services enabled that we don’t need and it will make debugging much more difficult if the need arises. You can see the list of default services using the command:</p>
<pre>sudo sdptool browse local</pre>
<p>The configuration file we need to edit is /etc/ bluetooth/main.conf. You can open that file in the nano editor using the command sudo nano /etc/bluetooth/main.conf. You need to change the following line:</p>
<pre>#DisablePlugins = network,input</pre>
<p>to&#8230;</p>
<pre>DisablePlugins = network,input,audio,pnat,sap,serial</pre>
<p>Then save the changes using Ctrl+O, followed by pressing Enter and pressing Ctrl+X. You need to restart the Bluetooth daemon for the changes to take effect. You can do this using:</p>
<pre>sudo /etc/init.d/bluetooth restart</pre>
<p>You can use</p>
<pre>sudo sdptool browse local</pre>
<p>to verify that there are no services remaining.</p>
<h3>Step 05</h3>
<p> Starting the project</p>
<p>It’s about time we got started on some code, so let’s create a project folder. Change directoryto/home/piusingcd /home/pi and make a directory for our project using the command mkdir PiTooth. You can then change into the PiTooth directory and make a project file using the command touch PiTooth.py. Make it executable using the commandchmod +x PiTooth.py.</p>
<p>Open the file in the nano editor and start the file with the line:</p>
<pre>#!/usr/bin/python2.7</pre>
<p>This tells the shell that it needs to run the using the Python 2.7 interpreter.</p>
<p>You can also add a short comment about what the program does:</p>
<pre>#!/usr/bin/python2.7
#
# PiTooth allows the Raspberry Pi to act as a Bluetooth keyboard, and relays
# keypresses from a USB keyboard to a Bluetooth client. Written by Liam Fraser
# for a Linux User &#038; Developer tutorial.
#</pre>
<h3>Step 06</h3>
<p> Downloading necessary files</p>
<p>There are a couple of files that are needed for this project to work. You could create them yourself, but it would involve spending quite a lot of time reading various protocol specifications like our expert had to do to put this tutorial together. It’s outside of the scope of the tutorial. It will become clear what these files are used for shortly.</p>
<p>Save the changes to the file that you’ve made so far and exit nano. Download the required files using the command wget http:// liamfraser.co.uk/lud/PiTooth- Resources.zip.</p>
<p>Unzip the files from the zip archive using the command unzip PiTooth-Resources.zip. Use ls to verify that the new files have appeared. Once you have done this, you can remove the zip file using the command</p>
<pre>rm PiTooth-Resources.zip
pi@raspberrypi ~/PiTooth $ ls keymap.py PiTooth.py sdp_record. xml</pre>
<h3>Step 07</h3>
<p> The imports</p>
<p>It’s time to get back to nano. Our first job is to import the modules that we need, and there are quite a lot. We’ve placed a comment next to the non-obvious ones to explain what they are used for. SDP stands for Service Discovery Protocol. It will become clear what SDP and D-Bus are used for shortly.</p>
<pre>import os # Used to call external commands
import sys # Used to exit the script
import bluetooth
from bluetooth import *
import dbus # Used to set up the SDP record
import time # Used for pausing the process
import evdev # Used to get input from the keyboard
from evdev import *
import keymap # Used to map evdev input to hid keycodes</pre>
<h3>Step 08</h3>
<p> The Bluetooth class</p>
<p>We’re going to start our Bluetooth class with an initialisation function as usual. Remember that we’re not using a fancy development environment here, so you need to take care to format your code properly. Our expert typically uses four spaces to indent rather than a tab, as spaces are the same in every editor. We’re going to start off by preparing the Bluetooth dongle for use as a Bluetooth keyboard. We’ll do this using the hciconfig command, which is essentially the equivalent of ifconfig for Bluetooth devices.</p>
<p>So, we set the device class, which is a hexadecimal value representing a keyboard. We then set the device name to Raspberry Pi, replacing the space in the name with a backslash. Finally, we make the device discoverable so that other devices can pair with it.</p>
<pre>class Bluetooth:
    def __init__(self):
        # Set the device class to a
keyboard and set the name
        os.system(“hciconfig hci0 class 0x002540”)
        os.system(“hciconfig hci0 name Raspberry\ Pi”)
        # Make device discoverable
        os.system(“hciconfig hci0 piscan”)</pre>
<h3>Step 09</h3>
<p> Bluetooth sockets</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Bluetooth HID devices use two sockets to communicate: a control socket and an interrupt socket. The control socket is for initiating the connection, sending handshakes and so on. The interrupt socket is used for sending low-latency data, such as input reports containing key presses, or output reports such as vibration feedback if the device were a gamepad. The standard ports for these sockets are 17 for the control socket and 19 for the interrupt socket.</p>
<p>Before we create the sockets, we&#8217;re going to declare a couple of constants to hold the port numbers. The constants can be put outside of the initialiser function as they will be the same for every instance of the class. The beginning of the Bluetooth class should now look like this:</p>
<pre>class Bluetooth:
    # Define the ports we'll use
    P_CTRL = 17
    P_INTR = 1</pre>
<h3>Step 10</h3>
<p> Create the certificates</p>
<p>We’re back in the initialisation function now. Once we’ve set up our Bluetooth dongle, we need to create a couple of sockets upon which we can accept connections from clients. We also need to bind them to the appropriate ports. L2CAP is simply a type of Bluetooth socket. When binding the sockets to a port, we pass through a tuple with the MAC address of the Bluetooth dongle to bind the socket to, which can be omitted because we only have one, and the port to bind the socket to. Notice that we access the port constants using the class name, rather than prefixing them with self, because the constants are class members rather than instance members.</p>
<pre># Define our two server sockets for communication
self.scontrol = BluetoothSocket(L2CAP)
self.sinterrupt = BluetoothSocket(L2CAP)
# Bind these sockets to a port
self.scontrol.bind((“”, Bluetooth.P_CTRL))
self.sinterrupt.bind((“”, Bluetooth.P_INTR))</pre>
<h3>Step 11</h3>
<p> Using D-Bus</p>
<p>D-Bus is a framework used commonly on Linux that allows communication and remote procedure calls (calling a function in a different program) between different processes. The BlueZ Bluetooth stack exposes a D-Bus interface which allows access to a couple of things that the Python module doesn’t.</p>
<p>We’re going to use D-Bus to advertise a Bluetooth SDP record. SDP stands for Service Discovery Protocol. This record advertises the virtual keyboard and various information about it, such as the structure of the input reports (which are sent when a key is pressed) and also things such as the language of the keyboard. You’ve already downloaded an SDP record that our expert made earlier, as these are really outside of the scope of this tutorial.</p>
<p>We’re enclosing our D-Bus code with a try- except block because it could go wrong, and so it’s useful to include error messages. We start by getting an org.bluez.Manager interface, and the path to the default adaptor. With that, we can get the service interface for that adaptor, which is used for registering SDP records.</p>
<pre>        # Set up dbus for advertising the service record
        self.bus = dbus.SystemBus()
        try:
            self.manager = dbus.Interface(self.bus.get_object(“org.bluez”, “/”), “org.bluez.Manager”)
            adapter_path = self.manager.DefaultAdapter()
            self.service = dbus.Interface(self.bus.get_object(“org.bluez”, adapter_path), “org.bluez.Service”)
        except:
            sys.exit(“Could not configure bluetooth. Is bluetoothd started?”)</pre>
<h3>Step 12</h3>
<p> Reading the SDP record</p>
<p>Now that we’ve set up D-Bus, we need to read the contents of the XML file describing the SDP record into a variable. Again, we’re doing this inside a try-except block in case the file is missing. The sys.path[0] variable contains the path to directory containing the script:</p>
<pre>        # Read the service record from file
        try:
            fh = open(sys.path[0] + “/sdp_record.xml”, “r”)
        except:
            sys.exit(“Could not open the sdp record. Exiting...”)
        self.service_record = fh.read()
        fh.close()</pre>
<h3>Step 13</h3>
<p> Listening for a connection</p>
<p>The next thing we’ll do is define a listen function, which adds the SDP record we just read to the SDP server, and then waits for a connection from a client device. A client device will connect to the control socket first, and then the interrupt socket. The accept function of a socket returns a socket for that connection and a tuple containing the client’s MAC address followed by the port they connected on. Our expert created a couple of constants to make the code more readable when accessing the values in the tuple.</p>
<pre>class Bluetooth:
     HOST = 0 # BT Mac address
     PORT = 1 # Bluetooth Port Number...
     def listen(self):
          # Advertise our service record
          self.service_handle = self. service.AddRecord(self.service_record)
          print “Service record added”
          # Start listening on the server sockets
          self.scontrol.listen(1) # Limit of 1 connection
          self.sinterrupt.listen(1)
          print “Waiting for a connection”
          self.ccontrol, self.cinfo = self.scontrol.accept()
          print “Got a connection on the control channel from “ + self.cinfo[Bluetooth.HOST]
          self.cinterrupt, self.cinfo = self.sinterrupt.accept()
          print “Got a connection on the interrupt channel from “ + self.cinfo[Bluetooth.HOST]</pre>
<h3>Step 14</h3>
<p> Adding the main function</p>
<p>We now have basic code in place that will let us accept connections from devices. It will drop the connections straight away, but that doesn’t matter for now. We’re going to add a main function at the bottom of the file to create an instance of the Bluetooth class and call the listen function to wait for a connection. We’re going to check that the user executing the code has root privileges as part of the main function. Otherwise it’s pointless to continue, as the script won’t do anything.</p>
<pre>if __name__ == “__main__”:
     # We can only run as root
     if not os.geteuid() == 0:
          sys.exit(“Only root can run this script”)
     bt = Bluetooth()
     bt.listen()</pre>
<h3>Step 15</h3>
<p> Pairing with the client device</p>
<p>Before we can accept connections from client devices, we need to pair with them. We’re going to describe this process on an Android device. Now, it’s best to advertise the virtual keyboard’s SDP record while we are pairing, so at this point, you’ll need to open up a second shell on the Raspberry Pi. You can either do this by opening up another SSH session, or using Ctrl+Alt+F2 to switch to the next console if you’re using the Pi with a keyboard and screen connected (Ctrl+Alt+F1 will switch you back to the first console).</p>
<p>So, in the first shell, you need to start PiTooth with sudo ./PiTooth. It will print that the service record has been added and that it’s waiting for a connection from a client device. At this point, you need to go to the Bluetooth settings on your client device and make the device discoverable. Now, switch to the second shell. Once you’re there, run the command hcitool scan. This will tell you the MAC address of the device you want to pair with. Once you’ve found this, you need to use the command bluez-simple-agent hci0 [client MAC address].EnteraPIN,and then enter that PIN on your client device. You should now be paired with the Raspberry Pi.</p>
<p>Note that if you ever have to unpair your client device, you can use the command bluez-test-device remove [client MAC address].</p>
<h3>Step 16</h3>
<p> Testing the code so far</p>
<p>We might as well test the code we have so far while it’s waiting for a connection. Switch back to your other shell and then scroll down to the Raspberry Pi entry on your client device. Select the Connect option. Note that our expert sometimes had to reset the Bluetooth on his client device by turning it off and on again because it got upset when the code simply dropped the connections as soon as it connected. Our output looked like this: </p>
<pre>pi@raspberrypi ~/PiTooth $ sudo ./ PiTooth.py
Service record added
Waiting for a connection
Got a connection on the control channel from [Client MAC]
Got a connection on the interrupt channel from [Client MAC]</pre>
<h3>Step 17</h3>
<p> Input reports</p>
<p>It will be useful to learn about input reports before we start coding the Keyboard class. At the top of the page is a table describing an input report from the Bluetooth HID specification. An input report is 9 bytes long, and prefixed with a byte indicating that the remaining bytes are an input report. The first byte containing Report ID is always 0&#215;01, which is the value for a keyboard input report.</p>
<p>It will help to understand a little about binary data. A byte is made up of eight individual bits which have a value of either 1 or 0. A byte can represent a numerical (decimal) value of up to 255. Anything in the form 0&#215;00 is a hexadecimal value. For example, 0&#215;01 is 00000001 in binary, and represents the decimal number 1. The size of a character, for example, the letter A, is also a byte. This knowledge will come in useful shortly when we need to convert between various data types.</p>
<p>The second byte indicates which modifier keys (Ctrl, Alt, Shift and the Windows key) are pressed. The bit for that key is set to 1 if the key is pressed, or set to 0 if the key isn&#8217;t pressed. The third byte is reserved, and the remaining bytes are for up to six key events.</p>
<h3>Step 18</h3>
<p> The Keyboard class</p>
<p>We’re going to start by defining the structure of an input report, with all of the keys turned off by default. Then we loop until we can get a keyboard device.</p>
<pre>class Keyboard():
    def __init__(self):
        # The structure for an bt keyboard input report (size is 10 bytes)
        self.state = [
               0xA1, # This is an input report
               0x01, # Usage report = Keyboard
               # Bit array for Modifier keys
               [0,   # Right GUI - (usually the Windows key)
                0,   # Right ALT
                0,   # Right Shift
                0,   # Right Control
                0,   # Left GUI - (again, usually the Windows key)
                0,   # Left ALT
                0,   # Left Shift
                0],   # Left Control
               0x00,  # Vendor reserved
               0x00,  # Rest is space for 6 keys
               0x00,
               0x00,
               0x00,
               0x00,
               0x00 ]

        # Keep trying to get a keyboard
        have_dev = False
        while have_dev == False:
            try:
                # Try and get a keyboard - should always be event0 as we’re only
                # plugging one thing in
                self.dev = InputDevice(“/dev/input/event0”)
                have_dev = True
            except OSError:
                print “Keyboard not found, waiting 3 seconds and retrying"
                time.sleep(3)
            print "Found a keyboard"</pre>
<h3>Step 19</h3>
<p> Changing the keyboard&#8217;s state</p>
<p>Before you continue, you’ll want to take a quick look at the keymap.py file our expert provided. This file contains a dictionary mapping evdev keys to Bluetooth keys, as well as mapping evdev modifier keys to the bit that needs to be set in the Input Report. The Bluetooth values are in decimal rather than hex, but that doesn’t matter since Python will convert hex to decimal anyway.</p>
<p>This function takes an evdev event and changes the keyboard’s state. Firstly, we check if the key is a modifier key (the function returns a negative number if it’s not) and if so, flip the appropriate bit in the bit array of our Input Report. If not, we get the Bluetooth code of the key and then loop through the key elements. If the key is being released (event value of 0) then we find the key and we depress it by setting the value back to zero. Otherwise, we set the first empty space to the key’s value and break out of the loop to be as efficient as possible.</p>
<pre>    def change_state(self, event):
          evdev_code = ecodes.KEY[event.code]
          modkey_element = keymap.modkey(evdev_code)
          if modkey_element > 0:

          # Need to set one of the modifier bits
          if self.state[2][modkey_ element] == 0:
                self.state[2][modkey_element] = 1
          else:
                self.state[2][modkey_element] = 0
          else:
                # Get the hex keycode of the key
                hex_key = keymap.convert(ecodes.KEY[event.code])
                # Loop through elements 4 to 9 of the input report structure
                for i in range (4, 10):
                     if self.state[i] == hex_key and event.value == 0:
                            # Code is 0 so we need to depress it
                            self.state[i] = 0x00 elif self.state[i] == 0x00 and event.value == 1:
                            # If the current space is empty and the key is being pressed
                            self.state[i] = hex_key
                            break</pre>
<h3>Step 20</h3>
<p> The event loop</p>
<p>The event loop is actually really simple; it takes an instance of the Bluetooth class as a parameter and reads input from the keyboard in a loop. Evdev keys have three states: press, depress or hold. We only want to deal with press or depress, because the Bluetooth protocol doesn’t require hold. It’s assumed the key is held if its value is not reset to zero again. We ignore the hold events with the ‘event.value < 2’ condition.</p>
<p>With that out of the way, we simply pass the event to the change state function and then call the send_input function of the Bluetooth class, which we are about to write.</p>
<pre>     def event_loop(self, bt):
          for event in self.dev.read_loop():
                # Only bother if we hit a key and it’s an up or down event
                if event.type == ecodes. EV_KEY and event.value < 2:
                       self.change_state(event)
                       bt.send_input(self.state)</pre>
<h3>Step 21</h3>
<p> Sending input</p>
<p>Scroll back up to the Bluetooth class and create the send_input function. This function may look a little complicated, but it’s actually just converting the Input Report from the Keyboard class to a string that can be sent with the Python Bluetooth module.</p>
<p>So, we accept an Input Report and define an empty string that we’re going to build up and then send. We then loop through each element in the Input Report and check if it’s an array. If it is the array, then it will be the array of individual bits that make up the modifier byte. We need to convert this array to a string of eight characters by looping through each element and appending it to the bin_str string. We then need to convert this binary data to an integer – using base 2, as a bit can only have two possible states. We then convert this integer (which will have a size of one byte) to a character (also one byte) that can be added to the hex_str string. If the type is not an array, then the element of the input report can be converted straight to a character and appended to the hex string. Once the hex string is complete, it’s sent down the interrupt channel.</p>
<pre>     def send_input(self, ir):
          #  Convert the hex array to a string
          hex_str = “”
              for element in ir:
                   if type(element) is list:
                        # This is our bit array - convrt it to a single byte represented
                        # as a char
                        bin_str = “”
                        for bit in element:
                             bin_str += str(bit)
                             hex_str += chr(int(bin_str, 2))
                        else:
                             # This is a hex value - we can convert it straight to a char
                             hex_str += chr(element)
                   # Send an input report
                   self.cinterrupt.send(hex_str)</pre>
<h3>Step 22</h3>
<p> The final piece</p>
<p>We need to finish off our code by initialising the Keyboard class and calling the event loop function, passing through the instance of the Bluetooth class.</p>
<pre>    kb = Keyboard()
    kb.event_loop(bt)</pre>
<h3>Step 23</h3>
<p> Testing the code</p>
<p>That’s it! This is a pretty primitive implementation, as you can probably tell. The performance could also be improved, but the proof of concept is there. We don’t even bother with anything on the control channel, and ignore any Output Reports on the interrupt channel that could contain instructions to set various LEDs on the keyboard. You simply need to run the code and start typing on the keyboard to send input to the client. You’ll probably type a load of rubbish into the console if you’re using the Pi with a screen.</p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/emulate-a-bluetooth-keyboard-with-the-raspberry-pi/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux User 126 DVD</title>
		<link>http://www.linuxuser.co.uk/news/faulty-dvd-linux-user-126</link>
		<comments>http://www.linuxuser.co.uk/news/faulty-dvd-linux-user-126#comments</comments>
		<pubDate>Thu, 09 May 2013 15:57:46 +0000</pubDate>
		<dc:creator>Russell Barnes</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[fault]]></category>
		<category><![CDATA[issue 126]]></category>
		<category><![CDATA[Linux User]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9843</guid>
		<description><![CDATA[As the curtain was lifted on the 126th issue of Linux User &#038; Developer it came to our attention that there's a fault with the DVD supplied with the magazine…]]></description>
				<content:encoded><![CDATA[<p>First of all, we&#8217;re really sorry that your Linux User issue 126 DVD doesn&#8217;t work as intended. We&#8217;ve investigated the cause of the fault and are taking steps to ensure that it can&#8217;t happen again.</p>
<p>To ensure you can still make the most of the excellent distros, software and tutorial files intended for the issue, though, we&#8217;ve set up a <a title="Click here to download Issue 126's DVD" href="http://diskcontent.imagine-publishing.co.uk.s3.amazonaws.com/lud/luddvd.zip">direct download to the ISO</a>.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Once downloaded, simply uncompress the Zip and either burn it to a writable DVD or USB stick (4GB or larger) as you would any normal distro. Please refer to page 96 of the magazine if you need any assistance burning an ISO to DVD.</p>
<p>We can&#8217;t apologise enough for the mistake and we&#8217;re sorry to have inconvenienced you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/news/faulty-dvd-linux-user-126/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux User &amp; Developer 126 is out now!</title>
		<link>http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-126-is-out-now</link>
		<comments>http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-126-is-out-now#comments</comments>
		<pubDate>Thu, 09 May 2013 14:30:42 +0000</pubDate>
		<dc:creator>Rob Zwetsloot</dc:creator>
				<category><![CDATA[Magazine Issues]]></category>
		<category><![CDATA[crazyflie]]></category>
		<category><![CDATA[distro]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=9844</guid>
		<description><![CDATA[Find out what’s happening in the latest edition of Linux User &#038; Developer magazine. Buy it in all good newsagents or online. Regular readers can subscribe and save 30% on the retail price and grab it digitally on all major platforms]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.imagineshop.co.uk/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/c/o/cover126.jpg" rel="lightbox[9844]"><img class="alignright size-medium wp-image-2381" title="lud_126" src="https://www.imagineshop.co.uk/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/c/o/cover126.jpg" alt="lud_126" width="232" height="300" /></a><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></p>
<p><strong>Python Masterclass</strong><br />
Everything you need to start writing programs today</p>
<p><strong>System Admin expert guide</strong><br />
Start a career in open source</p>
<p><strong>Raspberry Pi Jamboree</strong><br />
Inside RasPi&#8217;s biggest ever event</p>
<p><strong>Crazyflie Quadrotor</strong><br />
World&#8217;s first open source &#8216;copter reviewed</p>
<p><strong>The ultimate RSS Reader revealed</strong><br />
RSSOwl, Liferea, Blam and Akregator reviewed</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><strong>Also inside</strong><br />
- Make yout own Wiki<br />
- Rock, Paper, Scissors code listing<br />
- Bitcraze interview<br />
- Reviews for the MiraBox, FLIRC, Rasplex, Webconverger 18, FreeNAS</p>
<p>…and much more!</p>
<h3>Tutorial Files</h3>
<p><a href='http://www.linuxuser.co.uk/wp-content/uploads/2013/05/pythonforbeginners.zip'>Python for beginners tutorial files</a></p>
<p><a href='http://www.linuxuser.co.uk/wp-content/uploads/2013/05/rockpaperscissors.zip'>Rock, Paper, Scissors tutorial files</a></p>
<p><a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignnone" title="Linux User & Developer 126 is out now!" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Linux User & Developer 126 is out now!" width="92" height="24" /></a><br />
<a href=" https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100" target="_blank"><img class="size-full wp-image-2388 alignnone" title="Subscribe_Now" src=" http://www.linuxuser.co.uk/wp-content/uploads/2010/07/SUBSCRIBE.jpg" alt="Subscribe_Now" width="92" height="24" /></a></p>
<h3 style="text-align: center;">Linux User and our sister mags are all available <a href="http://www.greatdigitalmags.com">via Great Digital Mags</a> on all major platforms!</h3>
<h3 style="text-align: left;"><strong><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a></strong></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-126-is-out-now/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
