<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Spice World! &#187; Open Source</title>
	<atom:link href="http://www.cyberspice.org.uk/blog/category/geek/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberspice.org.uk/blog</link>
	<description>The life and times of a jet setting software engineer!</description>
	<lastBuildDate>Fri, 02 Dec 2011 14:52:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Upgrading your UK T-Mobile Google G1 (HTC Dream) to Android 2.x</title>
		<link>http://www.cyberspice.org.uk/blog/2010/10/22/upgrading-your-uk-t-mobile-google-g1-htc-dream-to-android-2-x/</link>
		<comments>http://www.cyberspice.org.uk/blog/2010/10/22/upgrading-your-uk-t-mobile-google-g1-htc-dream-to-android-2-x/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 15:33:22 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Google G1]]></category>
		<category><![CDATA[HTC Dream]]></category>
		<category><![CDATA[T-Mobile]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=480</guid>
		<description><![CDATA[I&#8217;m currently developing a new project. Its a bluetooth enabled bracelet. I wanted to write an iPhone app to control it. However, much as I like my iPhone 4, Apple&#8217;s policy about locking the thing down sucks. So I then looked at writing an Android application for my G1. The problem with that is that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently developing a new project.  Its a bluetooth enabled bracelet.  I wanted to write an iPhone app to control it.  However, much as I like my iPhone 4, Apple&#8217;s policy about locking the thing down sucks.  So I then looked at writing an Android application for my G1.  The problem with that is that bluetooth support only arrived in Android 2.0 and T-Mobile/HTC ceased upgrades at 1.6 on the G1.  Since my G1 is two years old and out of contract I decided to be brave and upgrade it to Android 2.2.  Note the G1 is called the HTC Dream in many markets.</p>
<p><span id="more-480"></span><br />
<h2>Overview</h2>
<p>In order to install kind of new operating system I needed to have root access on the device.  This meant I had to <em>root</em> it.  Since Android 1.6 (Release R10) on the G1 doesn&#8217;t have any useful exploits I had to downgrade the OS to Release R7 first.  Once it is downgraded it you can use the rooting exploit in R7 to get root access and install a recovery image that will allow the installation of an updated radio software and the new operating system.</p>
<h2>Preliminaries</h2>
<p>Firstly read all of this blog post and all of the pages linked to from this blog post.  There is at least one point in this process where you can &#8220;brick your phone&#8221;.  I.e. you can put it in a state where by a regular user cannot make it usable.</p>
<p>Secondly you will be wiping your phone and replacing the software on it.  Back anything up you want to keep.  This includes purchased applications, data, contacts, whatever.</p>
<p>Make sure the phone is fully charged.  You don&#8217;t want it running out of power mid-flash!</p>
<p><span style="text-color: #ff0000;"><strong>Finally I provide no warranty express or implied.  You are doing this to your phone.  If it goes wrong its your fault!  You have been warned!</strong></span></p>
<h2>Downgrading and rooting</h2>
<p>Downgrading, rooting the phone, and installing a recovery image is described in the link below.  However since there are specific requirements for upgrading to Android 2.X I&#8217;ll explain each stage here.</p>
<p><a href="http://forum.xda-developers.com/showthread.php?t=442480">http://forum.xda-developers.com/showthread.php?t=442480</a></p>
<h3>Downgrading</h3>
<p>Before you do anything take note of the radio version string in the boot-loader.  Its the fourth line down.  You get the boot-loader screen up by holding down the camera button when powering on the phone.  With the original loader you should have multi-coloured bars with yellow text in the top left hand corner.  On my phone the radio version string read <em>&#8220;RADIO-2.22.19.26I&#8221;</em>.  Write down the string and store it somewhere safe.  You&#8217;ll need it later.</p>
<p>Now download the appropriate older image for your phone.  The links to the image downloads are on the page above however here&#8217;s the link for <a href="http://koushikdutta.blurryfox.com/G1/DREAMIMG-RC7.zip">RC7</a> for those with UK phones.  Download the image, unzip it, and save the <em>DREAMIMG.nbh</em> file in the root of your SD card.  While you&#8217;re at it also download <a href="http://www.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&#038;file=recovery-RA-dream-v1.5.2.img">recovery-RA-dream-v1.5.2.img</a> which is a recovery image and will be used later.  Save this in the root of your SD card also.</p>
<p>Turn off your phone, insert the SD card, and turn it back on again holding down the camera key as before.  It should now re-flash your phone.  There should be a progress bar.  When its all complete you can restart your phone normally (without the camera key held down).  This will result in some old school Android graphics and you wondering how anyone ever coped with that software.  Once the phone has booted find the phone details in settings and check the software build version number.  It should appear as something like <em>TC5-RC7 112931</em>.</p>
<p><center><br />
<table>
<tr>
<td><a href="http://www.flickr.com/photos/39013214@N03/5075135008" title="View 'Initial bootloader' on Flickr.com"><img height="240" alt="Initial bootloader" border="0" style="display: inline;" src="http://farm5.static.flickr.com/4113/5075135008_1492d33db5_m.jpg" width="162"/></a></td>
<td><a href="http://www.flickr.com/photos/39013214@N03/5074536617" title="View 'Installing an image from SD card' on Flickr.com"><img height="240" alt="Installing an image from SD card" border="0" style="display: inline;" src="http://farm5.static.flickr.com/4012/5074536617_0f606f44e1_m.jpg" width="172"/></a></td>
<td><a href="http://www.flickr.com/photos/39013214@N03/5075135512" title="View 'Software information screen' on Flickr.com"><img height="240" alt="Software information screen" border="0" style="display: inline;" src="http://farm5.static.flickr.com/4111/5075135512_f439d0d7e8_m.jpg" width="168"/></a></td>
</tr>
</table>
<p></center></p>
<h3>Rooting the phone</h3>
<p>Now you have exploitable image installed it is time to root the phone.  This can be done using a back door.  Go to the home screen then type&#8230;</p>
<pre>
&lt;return&gt;
&lt;return&gt;
telnetd
&lt;return&gt;
</pre>
<p>&#8230;on the slide out keyboard.  This will look like a search in contacts for the name of <em>telnetd</em>.  In fact <em>telnetd</em> is the telnet daemon which allows you to connect to shell on the phone via telnet.  So now you need a telnet client.  Use the Android Market to download a telnet client.  Once installed you should be able to telnet to <em>localhost</em> and get a telnet prompt.</p>
<p>If all is well you have shell access as root (a &#8216;#&#8217; prompt).  Yay!</p>
<h3>Installing a recovery image</h3>
<p>Now we are going to install the recovery image we downloaded earlier. This will also give us permanent root access.  In the shell type&#8230;</p>
<pre>
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd sdcard
flash_image recovery recovery-RA-dream-v1.5.2.img
cat recovery-RA-dream-v1.5.2.img > /system/recovery.img
</pre>
<p>For those who are interested the lines do the following:</p>
<ol>
<li>Remounts the flash memory in read/write mode.  This allows you to save to the flash in the phone.</li>
<li>Navigate to the sdcard (which is mounted at /sdcard)</li>
<li>Flashes the recovery-RA-dream-v1.5.2.img image file in to the special recovery partition in the flash.</li>
<li>Copies the recovery-RA-dream-v1.5.2.img as /system/recovery.img (The Android busybox doesn&#8217;t have the copy command but cat with a pipe works just as well!).</li>
</ol>
<p>Once you&#8217;ve done this and have a prompt again you can reboot the phone.  This time if you hold down the home and power buttons when you power on the phone it will boot in to the recovery image.  You can use the short cuts or the track ball to select a menu item.</p>
<p>Now we are ready to install the new software.</p>
<p><a href="http://www.flickr.com/photos/39013214@N03/5074537061" title="View 'Custom recovery image menu' on Flickr.com"><img height="240" style="display:block; margin-left:auto; margin-right:auto;" alt="Custom recovery image menu" border="0" src="http://farm5.static.flickr.com/4071/5074537061_048eed984f_m.jpg" width="166"/></a></p>
<h2>New radio software and DangerSPL</h2>
<p>Now we have to repartition the flash to give enough room for the new platform.  This is the scary bit.  As I said before&#8230;</p>
<p><span style="text-color: #ff0000;"><strong>Finally I provide no warranty express or implied.  You are doing this to your phone.  If it goes wrong its your fault!  You have been warned!</strong></span></p>
<p>Read this page thoroughly <a href="http://wiki.cyanogenmod.com/index.php?title=Dream:DangerSPL">http://wiki.cyanogenmod.com/index.php?title=Dream:DangerSPL</a>.  If you&#8217;ve gotten this far you fulfil the prerequisites to install Danger/SPL.  You now need to download the appropriate radio image, place it in the root of your SD card and flash it.  Remember that number we noted down from the boot-loader screen at the start (<em>&#8220;RADIO-2.22.19.26I&#8221;</em> or similar).  You will need it now.</p>
<p>Boot in to recovery by holding down the home and power buttons. Select <em>&#8220;Flash zip from sdcard&#8221;</em>.  Select <em>update.zip</em> (if that&#8217;s the name of the file) from the file menu.  The image should be flashed and will then reboot the phone.  Reboot the phone again.</p>
<p>Take out the SD card and boot back in to the boot loader.  It should now appear as below.</p>
<p><a href="http://www.flickr.com/photos/39013214@N03/5074537429" title="View 'Updated Google G1 bootloader' on Flickr.com"><img height="240" style="display:block; margin-left:auto; margin-right:auto;" alt="Updated Google G1 bootloader" border="0" src="http://farm5.static.flickr.com/4043/5074537429_0bebc5256a_m.jpg" width="179"/></a></p>
<h2>Upgrading to FROYO and installing Google Apps</h2>
<p>All the hard work is now done.  You have a rooted phone with a nice recovery menu which allows you to flash anything that will fit.</p>
<p>To install the latest Android read this link: <a href="http://wiki.cyanogenmod.com/index.php?title=Dream:Installing_CyanogenMod_5%2B">http://wiki.cyanogenmod.com/index.php?title=Dream:Installing_CyanogenMod_5%2B</a>.</p>
<p>Clear out your SD card and download <a href="http://wiki.cyanogenmod.com/index.php?title=Latest_Version#DreamCM6">Froyo for the G1/Dream</a> and the <a href="http://wiki.cyanogenmod.com/index.php?title=Latest_Version#Google_Apps">Google <strong>Tiny</strong> Apps</a> (The G1 is a bit short on flash space so wont fit the all singing all dancing versions of the Google apps).  Boot in to recovery as before (home and power buttons) and again select <em>&#8220;Flash zip from sdcard&#8221;</em>.  Flash first Froyo and then the apps.</p>
<p>Finally reboot your phone.  You should now have Android 2.2 installed!</p>
<p><center><br />
<table>
<tr>
<td><a href="http://www.flickr.com/photos/39013214@N03/5074537651" title="View 'Cyanogen's Froyo (Android 2.2) booting' on Flickr.com"><img height="240" alt="Cyanogen's Froyo (Android 2.2) booting" border="0" style="display: inline;" src="http://farm5.static.flickr.com/4068/5074537651_fd8dc6e0e7_m.jpg" width="179"/></a></td>
<td><a href="http://www.flickr.com/photos/39013214@N03/5075136748" title="View 'Cyanogen's Froyo (Android 2.2) home screen.' on Flickr.com"><img height="240" alt="Cyanogen's Froyo (Android 2.2) home screen." border="0" style="display: inline;" src="http://farm5.static.flickr.com/4089/5075136748_9bb89e6b2c_m.jpg" width="179"/></a></td>
</tr>
</table>
<p></center></p>
<h2>Issues</h2>
<p>The only issue I had was an exception from the keyboard software the first time I used Froyo.  This can be solved using the <em>&#8220;Wipe&#8221;</em> menu in the recovery image.  I wiped data, cache and delvik cache (The latter generated an error I ignored) and then re-installed Froyo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2010/10/22/upgrading-your-uk-t-mobile-google-g1-htc-dream-to-android-2-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maker Faire UK 2010</title>
		<link>http://www.cyberspice.org.uk/blog/2010/04/22/maker-faire-uk-2010/</link>
		<comments>http://www.cyberspice.org.uk/blog/2010/04/22/maker-faire-uk-2010/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 01:14:33 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Crafty]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Beads]]></category>
		<category><![CDATA[Knitting]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[Maker]]></category>
		<category><![CDATA[Makerfaire]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=438</guid>
		<description><![CDATA[So in the middle of March I was panicking about whether I would get everything ready in time for Maker Faire UK. Like last year Maker Faire UK was held at the Life Science&#8217;s Centre in Newcastle-upon-Tyne as part of the Science Week there. Unlike last year, this year I had been accepted as an [...]]]></description>
			<content:encoded><![CDATA[<p>So in the middle of March I was panicking about whether I would get everything ready in time for Maker Faire UK.  Like last year Maker Faire UK was held at the Life Science&#8217;s Centre in Newcastle-upon-Tyne as part of the Science Week there.  Unlike last year, this year I had been accepted as an exhibitor and was going to display a variety of projects, so I took the Friday as vacation for final preparation and I needed it.<span id="more-438"></span></p>
<hr />
The theme of my exhibit was the mix of tech and craft.  Basically it was a collection of projects I had been working on and thought were good enough to display.</p>
<table>
<tr>
<td>
<h2>&#8216;Programmable&#8217; Earrings</h2>
<p><span style="float: left; margin-top: 10px; margin-right: 10px; margin-bottom: 10px;"><a href="http://www.flickr.com/photos/39013214@N03/4406446524" title="View 'Programmable earrings' on Flickr.com"><img border="0" width="240" align="right" alt="Programmable earrings" src="http://farm5.static.flickr.com/4022/4406446524_0813f246dc_m.jpg" height="160"/></a></span></p>
<p>Recently I started doing bead work, making necklaces and earrings and so on.  One day when doing some electronics I realised that components would make awesome earrings.  I then thought if you&#8217;re using components why not make them actually do something.  So I prototyped up a design based around an ATTiny part that I thought would work and thought about scaling the design down to something that could actually be worn on the ears.</p>
<p>This turned out to be a bit of a learning curve.  The only way I could do it was to resort to surface mount.  Something I had never done before.  Also I needed to product the PCBs professionally for the project to have any chance of working.  Also something I had never done before.  So this required me to learn to use a PCB CAD package.  Yet more learning curve.  And to add to the pressure because of the turn-round time on the PCBs I had one chance to get it right.  I waited with baited breath for them to return from <a href="http://www.olimex.com/pcb/index.html">Olimex</a>.</p>
<p>There were two issues with the board.  The holes for the LED leads were too narrow.  I fixed that with a pillar drill.  Also the outline for the battery (which is mounted on the bottom of the board) was printed on the top of the board.  That was my mistake since I created the batter holder component in the CAD package.  I fixed that with judicious use of a craft knife to scrape away the print.  I soldered everything up, programmed the micro-controller, and they worked.</p>
<p>They are light and wearable.  The software carries out PWM on three RGB channels varying the colour of the LED.  The colour pattern and speed of flashing changes with light level.  The size is limited by the clearance of the LED and LDR leads and the battery.  They were very popular and I may have to make more due to interest.</p>
</td>
</tr>
<tr>
<td>
<h2>Knitted Cthulhu</h2>
<p><span style="float: right; margin-top: 10px; margin-left: 10px; margin-bottom: 10px;"><a href="http://www.flickr.com/photos/39013214@N03/4403933882" title="View 'Cthulhu' on Flickr.com"><img border="0" width="240" alt="Cthulhu" src="http://farm5.static.flickr.com/4034/4403933882_f3f37fbf86_m.jpg" height="160"/></a></span></p>
<p>This was a fun little project.  I found a pattern for a knitted Cthulhu on the web.  Unfortunately I&#8217;ve mislaid the link right now but I do want to acknowledge the author so when I&#8217;ve found it I will update this post.  The knit was fun in itself and included knitting in the round, adding and removing stitches, and i-cord. </p>
<p>However because I am me I wanted to stuff electronics in to it.  So rather than using beads for eyes I used LEDs.  I built a small circuit on strip board based around the ATTiny part which drove the two LEDs and used a mechanical tilt switch as an input.  Additional output was via a piezo-electric sounder.  The tilt switch was mounted upside down so that it was normally off.  However shaking the cthulhu would activate it.</p>
<p>A software algorithm carried out key de-bounce and counts the number of &#8216;shakes&#8217; within a set time and drives a state machine that flashes the eyes and makes noises dependent upon the speed of the shaking.  The children loved my cthulhu.</p>
</td>
</tr>
<tr>
<td>
<h2>Beebthernet</h2>
<p><span style="float: left; margin-top: 10px; margin-right: 10px; margin-bottom: 10px;"><a href="http://www.flickr.com/photos/39013214@N03/4403934984" title="View 'Beebthernet' on Flickr.com"><img border="0" width="240" align="right" alt="Beebthernet" src="http://farm5.static.flickr.com/4042/4403934984_3221138977_m.jpg" height="160"/></a></span></p>
<p>A while I go i wrote a blog post about my <a href="http://www.cyberspice.org.uk/blog/2009/09/03/beebthernet/">Beebthernet</a> project.  Well since I was getting PCBs made anyway I thought I&#8217;d use the space space available to get a PCB for the parallel port/SPI version of the Beebthernet circuit.</p>
<p>I was hoping to have written a twitter client in time for Makefaire but all I&#8217;d gotten was basic sockets working.  However having a stand with a BBC Microcomputer connected to a flat screen monitor and a network was interesting to many people who attended the fair.  In many cases parents would tell their children how the BBC micro was the computer they used at school.</p>
</td>
</tr>
<tr>
<td>
<h2>Temperature Sensing Hat</h2>
<p><span style="float: right; margin-top: 10px; margin-left: 10px; margin-bottom: 10px;"><a href="http://www.flickr.com/photos/39013214@N03/4405682295" title="View 'Work in progress - Temperature sensing hat' on Flickr.com"><img border="0" width="240" align="left" alt="Work in progress - Temperature sensing hat" src="http://farm3.static.flickr.com/2712/4405682295_cfa4df6fa4_m.jpg" height="160"/></a></span></p>
<p>This project turned out to be a work in progress so I took it anyway together with some tools in order to continue to work on the electronics.  The hat itself is based upon a design in <a href="http://www.amazon.com/Stitch-N-Bitch-Knitters-Handbook/dp/0761128182">Stitch &#8216;N Bitch</a> which is an excellent book.  It is the sequinned hat but without sequins however unlike the hat in the book mine has a long i-cord &#8216;tail&#8217; from the top of the hat than hangs down the back.  The tail houses a temperature sensor in the end. </p>
<p>The rest of the hat is intended to be covered in small LED beads but they were not finished for Makerfaire.  The beads are an idea from <a href="http://thehighlowtech.com/projects/LED_clothing/tank.html">Leah Buechley</a> and are constructed from a surface mount LED and two beading crimp rings solder to each terminal.  I chose gold and silver rings so that I could tell the polarity.  They are awfully small and fiddly to make.</p>
</td>
</tr>
</table>
<hr />
<div  style="display:block">
My exhibits seemed to go down well with the public.  I ended up being <a href="http://www.flickr.com/photos/37996583811@N01/4444428820/in/photostream/">interviewed by the BBC</a> for their <a href="http://www.bbc.co.uk/blogs/podsandblogs/">Pods and Blogs</a> show on Radio 5 Live.  And then I was filmed by the reporter&#8217;s colleague for a YouTube project.</p>
<p><center><object width="445" height="364"><param name="movie" value="http://www.youtube.com/v/d9gRklnJqjE&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x402061&#038;color2=0x9461ca&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/d9gRklnJqjE&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x402061&#038;color2=0x9461ca&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed></object></center></p>
<p>I have to admit I don&#8217;t look my best since I was stressed and this was early on the Saturday not long after the faire opened and I hod gotten up early that morning to drive up to the event and set up my things.</p>
<p>The faire was very enjoyable and it would be great to be back there again next year.  Hopefully I would be more organised this time.  There were people I knew there but many more I didn&#8217;t and I made some new friends among the exhibitors.  I would like to thank Molly and Kat who were my support team and who took over talking to the public when I needed a break, food, etc.  I did get a chance to look around the faire and I have to admit the stars of the show were the musical tesla coils they were both awesome and loud!</p>
<div style="text-align:center;"><a href="http://www.flickr.com/photos/39013214@N03/4435866764" title="View 'Musical Tesla Coils' on Flickr.com"><img border="0" width="500" alt="Musical Tesla Coils" src="http://farm5.static.flickr.com/4040/4435866764_82030f986e.jpg" height="333"/></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2010/04/22/maker-faire-uk-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DPC &#8211; Dutch PHP Conference 2010</title>
		<link>http://www.cyberspice.org.uk/blog/2010/04/22/dpc-dutch-php-conference-2010/</link>
		<comments>http://www.cyberspice.org.uk/blog/2010/04/22/dpc-dutch-php-conference-2010/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 23:45:12 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Women In Technology]]></category>
		<category><![CDATA[Amsterdam]]></category>
		<category><![CDATA[DPC]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=436</guid>
		<description><![CDATA[Rather belatedly I am delighted to announce that I have been accepted to speak at the Dutch PHP Conference in Amsterdam this June. DPC is the premier European PHP conference and is sponsored by iBuildings. I will be running a tutorial Writing a PHP extension in C and speaking about Web Sevices for Consumer Devices. [...]]]></description>
			<content:encoded><![CDATA[<p>Rather belatedly I am delighted to announce that I have been accepted to speak at the Dutch PHP Conference in Amsterdam this June.  <a href="http://phpconference.nl/">DPC</a> is the premier European PHP conference and is sponsored by <a href="http://www.ibuildings.com/">iBuildings</a>.</p>
<p>I will be running a tutorial <a href="http://joind.in/talk/view/1523">Writing a PHP extension in C</a> and speaking about <a href="http://joind.in/talk/view/1546">Web Sevices for Consumer Devices</a>.  I look forward to seeing you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2010/04/22/dpc-dutch-php-conference-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Manchester Geek Girl Afternoon Tea</title>
		<link>http://www.cyberspice.org.uk/blog/2010/01/11/manchester-geek-girl-afternoon-tea/</link>
		<comments>http://www.cyberspice.org.uk/blog/2010/01/11/manchester-geek-girl-afternoon-tea/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:24:41 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Women In Technology]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[mggd]]></category>
		<category><![CDATA[mggt]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=418</guid>
		<description><![CDATA[While I&#8217;m announcing appearances I am excited to announce that I am presenting an Arduino workshop at Manchester Geek Girl Afternoon Tea this month at Madlab, Manchester&#8217;s Hackspace in the Northern Quarter. I will be bringing a long several Arduino-a-likes together with a variety of components and CDs of the IDE so that we can [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m announcing appearances I am excited to announce that I am presenting an <a href="http://www.arduino.cc/">Arduino</a> workshop at <a href="http://girlgeektea.eventbrite.com/">Manchester Geek Girl Afternoon Tea</a> this month at <a href="http://madlab.org.uk/content/girl-geek-afternoon-tea-2/">Madlab</a>, Manchester&#8217;s Hackspace in the Northern Quarter.</p>
<p>I will be bringing a long several Arduino-a-likes together with a variety of components and CDs of the IDE so that we can get together in groups, code and play.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2010/01/11/manchester-geek-girl-afternoon-tea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>T&#8217;info about Dash</title>
		<link>http://www.cyberspice.org.uk/blog/2009/12/24/tinfo-about-dash/</link>
		<comments>http://www.cyberspice.org.uk/blog/2009/12/24/tinfo-about-dash/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 12:45:15 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dash]]></category>
		<category><![CDATA[libncurses]]></category>
		<category><![CDATA[libtinfo]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=404</guid>
		<description><![CDATA[Once upon a time there was the Bourne command shell. sh as it is known is core at the heart of any UNIXy type operating system and others too. However for some it didn&#8217;t do enough so the Bourne Again shell, bash, was written and nearly every system ships with that. These shells are not [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time there was the Bourne command shell.  <strong>sh</strong> as it is known is core at the heart of any UNIXy type operating system and others too.  However for some it didn&#8217;t do enough so the Bourne Again shell, <strong>bash</strong>, was written and nearly every system ships with that.  These shells are not the same.  The have similar syntax but do not behave similarly.</p>
<p>There are other shells which have a completely different syntax and other scripting languages such as Perl and PHP so when writing a shell script you can indicate the correct interpreter using the <em>&#8216;hash bang bin bash&#8217;</em> comment to indicate you are using <strong>bash</strong>.  I.e.</p>
<pre>
#!/bin/bash
</pre>
<p>Some lazy programmers don&#8217;t indicate the exact shell they require and use </p>
<pre>
#!/bin/sh
</pre>
<p>to mean <strong>bash</strong> when it means <strong>sh</strong>.</p>
<p>Ubuntu, in their wisdom, have decided to go for <strong>dash</strong> as their shell.  It is an evolution of the Almquist shell and is smaller and lighter weight than <strong>bash</strong> however they install <strong>bash</strong> anyway.  <strong>dash</strong> and <strong>bash</strong> have the common subset of <strong>sh</strong> commands but are different.  So if you find you have a problem building or similar on Ubuntu it may be that the wrong shell is being used.  Ubuntu has a symlink as follows:</p>
<pre>
lrwxrwxrwx 1 root root       4 Mar 29  2009 sh -> dash
</pre>
<p>You may need to change this to point to dash as follows:</p>
<pre>
$ cd /bin
$ sudo rm sh
$ sudo ln -s bash sh
</pre>
<p>While we&#8217;re handling Ubuntu oddities building against NCurses, the terminal output library, can also be problematical.  A little while ago NCurses was split in to two libraries, <em>libncurses.so</em> and <em>libtinfo.so</em>.  Some badly written software will try and link explicitly with <em>libtinfo.so</em> directly rather than trying <em>libncurses.so</em> first.  Ubuntu does not split these two libraries but provides just the one <em>libncurses.so</em> library so if you have an issue with a missing <em>libtinfo.so</em> you will need to add symlinks in to your library directory as follows:</p>
<pre>
$ cd /usr/lib
$ ln -s libncurses.so.5 libtinfo.so.5
$ ln -s libtinfo.so.5 libtinfo.so
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2009/12/24/tinfo-about-dash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building PHP C extensions on Ubuntu 9.10</title>
		<link>http://www.cyberspice.org.uk/blog/2009/12/01/building-php-c-extensions-on-ubuntu-9-10/</link>
		<comments>http://www.cyberspice.org.uk/blog/2009/12/01/building-php-c-extensions-on-ubuntu-9-10/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 13:58:28 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PECL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=395</guid>
		<description><![CDATA[I have just taken over maintenance of the PECL Direct IO extension as it has been unmaintained for a while. Naturally the first thing I did before writing any new code was to check out the extension from SVN and try and build it. Building the source was fine but when I tried make test [...]]]></description>
			<content:encoded><![CDATA[<p>I have just taken over maintenance of the PECL Direct IO extension as it has been unmaintained for a while.  Naturally the first thing I did before writing any new code was to check out the extension from SVN and try and build it.  Building the source was fine but when I tried <em>make test</em> it failed producing output like the following:</p>
<pre>
PHP Warning:  PHP Startup: Unable to load dynamic library 'modules/gd.so' -
modules/gd.so: cannot open shared object file: No such file or
directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' -
modules/gd.so: cannot open shared object file: No such file or
directory in Unknown on line 0
</pre>
<p>The default PHP package on Ubuntu 9.10 is fairly minimalist.  Most extensions are provided as separate packages which include an INI file and a dynamic library.  The dynamic library is stored in:</p>
<pre>
/usr/lib/php5/20060613+lfs
</pre>
<p>And the INI file for each extension is in: </p>
<pre>
/etc/php5/conf.d.
</pre>
<p>The <em>make tests</em> rule in the generated Makefile in the extension you are compiling modifies the path that PHP searches for extensions by to point to the modules directory within the extension source.  So PHP, which is used to run the tests, cannot find the extensions.</p>
<p>I&#8217;ve found the easiest way (if slightly hacky) to fix the <em>make test</em> failure is just to copy the .so files from the PHP5 extension directory in to the modules directory within the extension source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2009/12/01/building-php-c-extensions-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing eclipse for multiple programming languages</title>
		<link>http://www.cyberspice.org.uk/blog/2009/11/20/installing_eclipse_for_multiple_programming_languages/</link>
		<comments>http://www.cyberspice.org.uk/blog/2009/11/20/installing_eclipse_for_multiple_programming_languages/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 14:39:59 +0000</pubDate>
		<dc:creator>cyberspice</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CDT]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[JDT]]></category>
		<category><![CDATA[PDT]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=378</guid>
		<description><![CDATA[I can do almost everything I need to do in OS X but just occasionally I need Linux. So I recently installed a VirtualBox VM running Ubuntu 9.10. I use Eclipse as my favoured IDE since I can run it on all three of the major OSes and it has good support for C, C++ [...]]]></description>
			<content:encoded><![CDATA[<p>I can do almost everything I need to do in OS X but just occasionally I need Linux.  So I recently installed a <a href="http://www.virtualbox.org/">VirtualBox</a> VM running <a href="http://www.ubuntu.com/">Ubuntu 9.10</a>.  I use <a href="http://www.eclipse.org/">Eclipse</a> as my favoured IDE since I can run it on all three of the major OSes and it has good support for C, C++ and Java which is what I use mostly for work.  So the next thing for me was to install Eclipse.  This is where things became interesting.<br />
<span id="more-378"></span><br />
My usual technique for installing Java and Eclipse on Linux is to grab the JDK from <a href="http://java.sun.com/">Sun&#8217;s site</a> and Eclipse from the Eclipse site. (Never try to run Eclipse on GNU Java, it just doesn&#8217;t work.)  I did this, installed Java, unpacked Eclipse and ran it.  It just didn&#8217;t seem to run right.  I suspected some Ubuntu 9.10 incompatibility since it was shortly after the release.  So I decided to use the Ubuntu packages for Sun&#8217;s Java and Eclipse.  It worked but the latter was somewhat minimalist.  </p>
<p>I really wanted to run &#8216;proper&#8217; Eclipse as released by Eclipse so it was time to Google for the problem and I found this <a href="http://mou.me.uk/2009/10/31/fixing-eclipse-in-ubuntu-9-10-karmic-koala/">link</a>.  It turns out that there is a bug in Eclipse to do with GTK which will be fixed in the next release.  However you can work around it.  Put the following shell script in to your Eclipse directory and when you run Eclipse using that and not the binary directly its fixed.</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">#!/bin/bash
export GDK_NATIVE_WINDOWS=1
/path/to/eclipse/eclipse</pre></div></div>

<p>Anyway that&#8217;s a bit of an aside.  So now the post proper, how do you install Eclipse for multiple languages?  This is what I did.</p>
<h3>Eclipse for C/C++</h3>
<p>Go to <a href="http://www.eclipse.org/downloads">http://www.eclipse.org/downloads</a>, select packages and grab Eclipse IDE for C/C++.  <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?tar">Untar</a> it somewhere suitable like /usr/local.  You will have to be superuser to untar there so use <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sudo">sudo</a>.</p>
<h3>Java Development Tools</h3>
<p>These come from <a href="http://download.eclipse.org/eclipse/downloads">http://download.eclipse.org/eclipse/downloads</a>.  Scroll down the page until you find &#8216;JDT Runtime Binary&#8217; and select the latest version.  This will download a ZIP file containing all the additional Java classes which provide the Java Development Tools.</p>
<p>Eclipse ZIP files are typically one of two kinds.  Either a collection of files you unzip in the directory where you eclipse directory is or one which that&#8217;s an &#8216;All in 1&#8242; update site.  The latter is a zip file that you can install via the Eclipse IDE itself since it contains the appropriate site.xml file used by the Eclipse installer.</p>
<p>The Eclipse JDT ZIP is not an update site so you will need to unzip in it in the directory you untarred the original files.  I.e. /usr/local.  If there are any clashes (because the file already exists) just select &#8216;N&#8217; meaning don&#8217;t overwrite.  </p>
<p>Once you&#8217;ve unpacked start Eclipse (sudo /path/to/eclipse/eclipse.sh) to ensure it looks sane.  You run it as root until you&#8217;re completely installed so that the extensions are installed for all users.  Hopefully, if all is well, you should see C/C++, CVS and Java projects available in the Projects menu.  Leave Eclipse running.</p>
<h3>DLTK, EMF-XSD and GEF</h3>
<p>DLTK is the Dynamic Languages Toolkit extension; EMF is the Eclipse Modelling Framework extension and GEF is the Graphical Editing Framework.  These form dependencies on the Web Tools and the PHP Development Tools.  Download the &#8216;All in 1&#8242; update sites for these as follows.</p>
<h4>DLTK</h4>
<p>Go to <a href="http://download.eclipse.org/technology/dltk/downloads/">http://download.eclipse.org/technology/dltk/downloads/</a>.  Select &#8216;Stable&#8217; and then the &#8216;All in 1 Update Site&#8217; bundle.  Save the ZIP somewhere sensible.</p>
<h4>EMF-XSD</h4>
<p>Go to <a href="http://www.eclipse.org/modeling/emf/downloads/?project=emf">http://www.eclipse.org/modeling/emf/downloads/?project=emf</a>.  Select the &#8216;All in 1 Update&#8217; bundle and again save it.</p>
<h4>GEF</h4>
<p>Go to <a href="http://www.eclipse.org/gef/downloads/">http://www.eclipse.org/gef/downloads/</a> and select the &#8216;All in 1 Update&#8217; and save it.</p>
<h4>Installing</h4>
<p>In the help menu select &#8216;Install new software&#8217;.  The top right of the dialog that appears is an &#8216;Add&#8217; button which adds a new install site, i.e. a URI from which new software can be installed.  Click on it.</p>
<div style="text-align:center;"><img src="http://www.cyberspice.org.uk/blog/wp-content/uploads/2009/11/AddSitesButton.png" alt="AddSitesButton.png" border="0" width="228" height="178" /></div>
<p>A new dialog appears with two fields.  Type &#8216;DLTK Local&#8217; in the first (&#8216;local&#8217;) field.  This is the short name the install site will be known as locally.  Click on the &#8216;Archive&#8217; button and navigate to the DLTK ZIP file you downloaded.  Select it.  Then click the &#8216;OK&#8217; button in the new site dialog.</p>
<div style="text-align:center;"><img src="http://www.cyberspice.org.uk/blog/wp-content/uploads/2009/11/AddSiteDialog.png" alt="AddSiteDialog.png" border="0" width="561" height="223" /></div>
<p>Now Eclipse will display what software is available from your install site (i.e. the DLTK ZIP file).  If you expand the tree you will see a whole selection of different components.  Some will have &#8216;SDK&#8217; as part of the name.  These components are ones which allow you to develop the Eclipse components themselves.  You don&#8217;t need these if you are using Eclipse to develop regular code so ignore those.  For DLTK I selected the core component and support for Python and Ruby (since I want to learn them at some point).  </p>
<div style="text-align:center;"><img src="http://www.cyberspice.org.uk/blog/wp-content/uploads/2009/11/AvailableSoftware.png" alt="AvailableSoftware.png" border="0" width="437" height="340" /></div>
<p>Click &#8216;Next&#8217;.  All the dependencies should be there.  Eclipse may install additional packages which are dependencies on the one&#8217;s you&#8217;ve selected.  It may also show a licence agreement you need to agree to.  Click through until &#8216;Finish&#8217; is shown.  Click &#8216;Finish&#8217; to install the software.  Eclipse may want to restart at this point, everyone apart from Ubuntu 9.10 users can click &#8216;Restart&#8217; here.  Because of the bug Ubuntu 9.10 users should click &#8216;No&#8217; and exit and restart Eclipse manually using the shell script as described above.</p>
<p>Do the same for the EMF-XSD package and select &#8216;XSD-XL Schema Model, XSD Documentation and XSD Edit&#8217;.  (Probably not all needed but useful).  Install and restart as before.  Add the GEF ZIP to the install sites so that it can be found later but don&#8217;t bother installing anything if you don&#8217;t want to.  This seems to be needed by the Web Tools but I didn&#8217;t want anything from it myself.</p>
<p>You should now have Ruby and Python projects as well as DTD, XSD, etc. projects available in the projects menu.  Quit Eclipse.</p>
<h3>Web Tools Platform</h3>
<p>WTP provides support for developing HTML, JavaScript etc. and is needed by the PHP Developer Tools.  The download site is <a href="http://download.eclipse.org/webtools/downloads/">http://download.eclipse.org/webtools/downloads/</a>.  Select the latest release and then download the web tools platform, wtd, ZIP file.</p>
<p>Like the JDT ZIP this is not an install site so needs to be unpacked in the same directory as you unpacked Eclipse and the JDT ZIP.  You will need to be superuser as before.  Again there may be files that already exist so you have to stop them from being over written.</p>
<p>Restart Eclipse as superuser so that it can update its state.  Now you should have web tools projects available like JavaScript, HTML etc. in the new project menu.</p>
<h3>PHP Developer Tools</h3>
<p>Finally we can install PDT.  You can get the all in one update site from <a href="http://www.eclipse.org/pdt/downloads/">http://www.eclipse.org/pdt/downloads/</a> as a ZIP.  In Eclipse using the &#8216;Install New Software&#8217; dialog add it as an install site, select the PDT tools and install them.  Eclipse will install anything it needs from the other install sites you used earlier.  Finally restart Eclipse one last time.</p>
<p>Yay!  You should have Eclipse installed for a whole bucket load of languages.  Because you installed the plug-ins as superuser they are available for everyone on your system.  Finally, because you don&#8217;t want to have to do this all over again should something go wrong, tar up the entire Eclipse directory and put it somewhere safe.</p>
<div style="text-align:center;"><img src="http://www.cyberspice.org.uk/blog/wp-content/uploads/2009/11/ProjectMenu.png" alt="ProjectMenu.png" border="0" width="344" height="415" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberspice.org.uk/blog/2009/11/20/installing_eclipse_for_multiple_programming_languages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

