<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6042401333290389565</id><updated>2012-02-16T21:31:21.880Z</updated><category term='autoconf'/><category term='Python'/><category term='ic-3010'/><category term='Windows XP'/><category term='M900S'/><category term='carto'/><category term='Vespucci'/><category term='grub'/><category term='javascript'/><category term='3d'/><category term='openos'/><category term='OrdnanceSurvey'/><category term='tablet'/><category term='OS OpenData'/><category term='VirtualBox'/><category term='pygtk'/><category term='blender'/><category term='musicpal'/><category term='printing'/><category term='mapnik'/><category term='df3120'/><category term='OpenStreetMap'/><category term='openWRT'/><category term='OneTwo'/><category term='sound'/><category term='framebuffer'/><category term='animation'/><category term='nodejs'/><category term='firmware'/><category term='Autistic'/><category term='cross compile mediaMVP mvpmc'/><category term='GW620'/><category term='Android'/><category term='pywws'/><category term='VectorMapDistrict'/><category term='Windows 7'/><category term='NSLU2'/><category term='linux'/><category term='Learning Difficulties'/><category term='amilo'/><category term='embedded'/><category term='GPX'/><category term='MeterServ'/><category term='Li2727'/><category term='emacs'/><category term='TownGuide'/><category term='Weather Station'/><category term='mysql'/><category term='edimax'/><category term='usb'/><category term='engineering'/><category term='php'/><category term='contours'/><category term='lenovo'/><category term='modem'/><category term='apt'/><category term='battery'/><category term='postgis'/><category term='django'/><category term='deb'/><category term='networking'/><category term='Amilo Li2727'/><category term='openproc'/><category term='Drupal'/><category term='automake'/><category term='tilemill'/><category term='bifferboard'/><category term='ip camera'/><category term='wireless'/><category term='Packard Bell'/><category term='Autism'/><category term='Eclipse'/><category term='GPS'/><category term='bonfire'/><category term='pygame'/><category term='X60s'/><category term='Samsung'/><category term='maps'/><category term='ubuntu'/><category term='OSM'/><category term='codeIgniter'/><category term='svn'/><category term='graphics tablet'/><title type='text'>Nerdy Toad</title><subtitle type='html'>A record of me trying to fathom out how to do a few nerdy things - hopefully this will help me remember how I made things work when I have forgotten...
"Nerdy Toad" is what my family call me when I stare at the computer too much!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>94</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6117043263178779181</id><published>2012-02-03T19:27:00.001Z</published><updated>2012-02-03T19:38:16.026Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='lenovo'/><title type='text'>Ubuntu 11.10 on a Lenovo G570 Laptop</title><content type='html'>I have just bought myself a new laptop. &amp;nbsp;I got a Lenovo G570 from PC World for just under £450. &amp;nbsp;It seems pretty good Intel i5 processor with 4GB Ram.&lt;br /&gt;&lt;br /&gt;Installed the 64 bit version of Ubuntu 11.10. &amp;nbsp;Installation went without hitch. &amp;nbsp;Initial boot hang for some reason, but switching it off and on again solved that, and it has worked fine since. &amp;nbsp; Basically everything I have tried worked out of the box - screen, track pad mouse, web cam, USB. &amp;nbsp; Therefore absolutely no issues - a very good advert for Lenovo and Ubuntu.&lt;br /&gt;&lt;br /&gt;I was really surprised at how powerful it is - I just installed a simple OSM tile server on it using the instructions at&amp;nbsp;&lt;a href="http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server"&gt;http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server&lt;/a&gt;. &amp;nbsp; Loading the british isles OSM data extract took less than 2 hours. &amp;nbsp; My home server (ex laptop) - an intel dual core processor and 2GB Ram running 32 bit Ubuntu takes almost 24 hours.&lt;br /&gt;&lt;br /&gt;I am thinking I should have bought 2 of them and use one as the server - it only uses 20 Watts when running at low load, which is probably less than my existing one.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6117043263178779181?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6117043263178779181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6117043263178779181' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6117043263178779181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6117043263178779181'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2012/02/ubuntu-1110-on-lenovo-g570-laptop.html' title='Ubuntu 11.10 on a Lenovo G570 Laptop'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2790676572993068819</id><published>2012-01-01T08:13:00.001Z</published><updated>2012-01-01T14:25:26.719Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='animation'/><category scheme='http://www.blogger.com/atom/ns#' term='3d'/><category scheme='http://www.blogger.com/atom/ns#' term='blender'/><title type='text'>Using Blender 2.5</title><content type='html'>My daughter and I have been trying to learn to use Blender 2.5 to crate 3D models for use in our simple games for Benjamin. &amp;nbsp; It has proved harder than I had expected! &amp;nbsp; The main issue seems to be that most tutorials are written for Blender 2.4, and there are lots of changes to the user interfaces in 2.5. &amp;nbsp;Plus the official documentation is still for 2.4 and documentation for 2.6 is in preparation...but not 2.5.&lt;br /&gt;&lt;br /&gt;This is a few reminders for us for how to do things. &amp;nbsp; I will add more as I work them out.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adding an armature to pose a model:&lt;/b&gt;&lt;br /&gt;See&amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=nNTyE9SGRYw"&gt;http://www.youtube.com/watch?v=nNTyE9SGRYw&lt;/a&gt;&amp;nbsp;for details of linking bones using inverse kinematics. &amp;nbsp;The author has a web site with a lot of additional information &lt;a href="http://blender.freemovies.co.uk/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Add a bone in Object Mode&lt;/li&gt;&lt;li&gt;Go to edit mode and position the bone within the model mesh.&lt;/li&gt;&lt;li&gt;Extrude the bone to add a joint (e.g. elbow)&lt;/li&gt;&lt;li&gt;In Object mode select the model mesh then shift-right click to select the bone. &amp;nbsp; Do control-P to bring up the 'parenting' menu and select Armature Deform with Automatic Weights.&lt;/li&gt;&lt;li&gt;Set the model view to solid (or texture), and in the armature properties menu, select X-Ray so that you can see the bones.&lt;/li&gt;&lt;li&gt;You can now enter pose mode and move the armature to pose the model.&lt;/li&gt;&lt;li&gt;To do a complete skeleton you should set up the back bone to be the parents of all the other bones so you can just grab the back bone to move the model.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2790676572993068819?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2790676572993068819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2790676572993068819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2790676572993068819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2790676572993068819'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2012/01/using-blender-25.html' title='Using Blender 2.5'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2191565863158721829</id><published>2011-12-17T20:00:00.000Z</published><updated>2011-12-17T20:00:19.431Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tablet'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='M900S'/><title type='text'>Simple Games for Cheap Android Tablet</title><content type='html'>My Autistic son has developed quite a liking for hand held electronic devices - he likes our daughter's Nintendo DS with an animated dog on it, and apparently plays with an iPad at school.&lt;br /&gt;I am not a fan of 'i' anythings because of the difficulty developing software for them, so I thought I would get him a cheap android based tablet to try. &amp;nbsp; Just need some software for it now.&lt;br /&gt;&lt;br /&gt;I have got a &lt;a href="http://www.amazon.co.uk/gp/product/B005QJ7WTC"&gt;Eken M009S from Amazon&lt;/a&gt;&amp;nbsp;- it was just under £70. &amp;nbsp; I was hoping to develop some simple games using javascript to run in the web browser, which would mean they would work on any device, but the processor on the device is not up to it - there are some nice javascript game demos at &lt;a href="http://kevs3d.co.uk/dev/"&gt;http://kevs3d.co.uk/dev/&lt;/a&gt; which work very well on my laptop, but are so slow on the tablet that they are not useable.&lt;br /&gt;&lt;br /&gt;This is a shame as it would have been nice to develop something that would work on any platform - I think I will have to remember how to write 'native' (or at least java) android programs....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2191565863158721829?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2191565863158721829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2191565863158721829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2191565863158721829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2191565863158721829'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/12/simple-games-for-cheap-android-tablet.html' title='Simple Games for Cheap Android Tablet'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-353973552207681742</id><published>2011-12-13T22:07:00.000Z</published><updated>2011-12-13T22:07:27.914Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='VirtualBox'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Access Web Server on VirtualBox Guest</title><content type='html'>I have a Windows computer where I use &lt;a href="https://www.virtualbox.org/"&gt;Oracle VirtualBox&lt;/a&gt;&amp;nbsp;to allow me to run Ubuntu Linux.&lt;br /&gt;I just found out how to access the web server on the virtual machine from the Windows Host.&lt;br /&gt;You need to use the vboxmanage command that comes with virtualbox:&lt;br /&gt;First do:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;vboxmanage list vms&lt;/blockquote&gt;to list the names all of the virtual machines on the computer, then do:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;vboxmanage modifyvm "&lt;your machine="" name="" virtual=""&gt;" --natpf1 "http,tcp,,8080,,80"&lt;/your&gt;&lt;/blockquote&gt;You can then point your web browser on the windows host to http://localhost:8080 to see the web server on the virtual machine.&lt;br /&gt;&lt;br /&gt;I don't know the syntax - see the &lt;a href="http://www.virtualbox.org/manual/ch06.html"&gt;VirtualBox Manual, Chapter 6&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-353973552207681742?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/353973552207681742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=353973552207681742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/353973552207681742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/353973552207681742'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/12/access-web-server-on-virtualbox-guest.html' title='Access Web Server on VirtualBox Guest'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7871485328761251059</id><published>2011-12-04T13:59:00.001Z</published><updated>2011-12-04T14:11:02.461Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Packard Bell'/><category scheme='http://www.blogger.com/atom/ns#' term='OneTwo'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Linux on a Packard Bell OneTwo - Update</title><content type='html'>The &lt;a href="http://nerdytoad.blogspot.com/search/label/Packard%20Bell"&gt;Packard Bell OneTwo&lt;/a&gt; touch screen computer has not been used for quite a while, so I decided to start using it rather than my daughter's PC, because it uses a lot less power and is quieter.&lt;br /&gt;&lt;br /&gt;The main issues from when I tried it before were:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Screen flicker every now and then&lt;/li&gt;&lt;li&gt;Touch screen calibration issues.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;We installed Ubuntu 11.10 on it as a clean install. &amp;nbsp;Went pretty well. &amp;nbsp;The issues were:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Used a normal screen shape rather than wide screen. &amp;nbsp; Solved this by going to the settings / display menu and changing to a 16:10 aspect ratio screen resolution.&lt;/li&gt;&lt;li&gt;Touch Screen Calibration: &amp;nbsp;This took a while to solve because when you pressed the screen the mouse pointer appeared at a different position. &amp;nbsp;Eventually I traced it to the display settings that I had altered - Although there is only one monitor on the computer, the software detects two displays (there must be tv-out hardware in the box, but no connector outside). &amp;nbsp;I had un-clicked the 'mirror displays' option and this had resulted in the two screens being shown side by side. &amp;nbsp;I didn't think anything of it as there is no monitor connected to the second, but it confused the touch screen calibration - switching the un-used display to 'off' solved it and the touch screen calibration is fine now.&lt;/li&gt;&lt;li&gt;Multi-Touch: &amp;nbsp;The touch screen works just like a mouse. &amp;nbsp;I think it should be able to cope with multiple touches so you can do 'pinch' gestures etc. to re-size windows. &amp;nbsp;This is not working. &amp;nbsp; I tried using the mtview utility as described in the &lt;a href="https://wiki.ubuntu.com/Multitouch/Testing"&gt;Ubuntu wiki&lt;/a&gt;, and it seems like multi touch is working - you can draw with two fingers at the same time, but the window manager does not seem to be using them.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Therefore, Ubuntu 11.10 worked much better 'out of the box' than the previous version I had tried - the main missing thing is multi-touch support for the touch screen. &amp;nbsp;This is an important one to fix for me because our son is VERY short sighted, and looks very closely at the screen, often pressing his forehead against it. &amp;nbsp;Once he has done that, the touch screen does not work because it only detects one press at a time! &amp;nbsp; I am going to have to learn how x windows input devices work to debug this I think.....&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7871485328761251059?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7871485328761251059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7871485328761251059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7871485328761251059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7871485328761251059'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/12/ubuntu-linux-on-packard-bell-onetwo.html' title='Ubuntu Linux on a Packard Bell OneTwo - Update'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1823164717803950090</id><published>2011-11-16T06:09:00.001Z</published><updated>2011-11-16T06:10:43.203Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Breaking out of a Frozen SSH Terminal Session</title><content type='html'>For a long time I have found that if the internet connection is broken during a ssh terminal session that the terminal hangs and the keyboard is un-responsive - CTRL-C, CTRL-D etc. do not do anything. &amp;nbsp;I have always just cursed and closed the terminal window.&lt;br /&gt;&lt;br /&gt;I just found that &lt;enter&gt;~. will break out of the frozen session, giving you access back to the terminal. &amp;nbsp; &lt;enter&gt;~? gives a list of other escape commands, but I am not sure what I would use those for.&lt;/enter&gt;&lt;/enter&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1823164717803950090?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1823164717803950090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1823164717803950090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1823164717803950090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1823164717803950090'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/11/breaking-out-of-frozen-ssh-terminal.html' title='Breaking out of a Frozen SSH Terminal Session'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6488722077337312015</id><published>2011-11-08T09:23:00.000Z</published><updated>2011-11-08T09:23:23.644Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='modem'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>Using Android Phone as a Modem</title><content type='html'>For quite a while I had been able to use my Samsung Galaxy Apollo phone as a modem - I just plugged it into my work laptop (running Windows XP) and it appeared as a modem, which I could use to connect to the internet nicely.&lt;br /&gt;&lt;br /&gt;Then I tried (and failed) to update my phone using Samsung Kies and it stopped working. &amp;nbsp; I remembered as part of trying to get Kies to work I found an obscure code to type on the keypad to switch the phone between 'PDA' mode and 'Modem' mode. &amp;nbsp; I have just managed to switch it back to modem mode, and this has got my modem working again!&lt;br /&gt;&lt;br /&gt;To do this I had to type&amp;nbsp;*#7284# on the phone dialer keypad. &amp;nbsp;This brought up a menu where I selected the USB option to be 'Modem'&lt;br /&gt;&lt;br /&gt;Now plugging it into my computer shows it up as a Samsung Mobile Modem. &amp;nbsp; I have the phone number set to&amp;nbsp;*99***1#, which seems to work ok. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;I disabled the internal modem in the laptop because sometimes windows tried to dial that one instead, which is not connected to anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6488722077337312015?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6488722077337312015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6488722077337312015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6488722077337312015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6488722077337312015'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/11/using-android-phone-as-modem.html' title='Using Android Phone as a Modem'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8203134440658305698</id><published>2011-11-06T18:02:00.000Z</published><updated>2011-11-06T18:02:12.371Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Samsung Colour Laser Printer and Ubuntu Linux</title><content type='html'>I have got sufficiently sick of my Epson inkjet printer suffering from clogged print heads, and noticed how cheap colour laser printers have become, so decided to give one a try.&lt;br /&gt;&lt;br /&gt;I settled for a Samsung CLP-325W (w=wireless) colour laser printer. &amp;nbsp; The reason for this is that Samsung provide linux drivers for it, and I had an old Samsung laser printer a few years ago that worked nicely with linux.&lt;br /&gt;&lt;br /&gt;To start with, the CD that came with the printer would not mount on my daughter's Ubuntu 11.04 machine - no idea why, so we downloaded the Samsung unified driver for linux from the &lt;a href="http://www.samsung.com/uk/support/detail/supportPrdDetail.do?menu=SIA00200&amp;amp;prd_ia_cd=&amp;amp;prd_mdl_cd=CLP-325W/SEE&amp;amp;prd_mdl_name=CLP-325W&amp;amp;srchword=CLP-325W"&gt;Samsung UK support web site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We installed the driver by running install.sh as root, plugged in the printer and it detected ok and seems to work. &amp;nbsp;We had to select the "Samsung CLP-300 Series (SPL-C)" driver, because the recommended "CLP-325 foomatic...." one only printed black and white.&lt;br /&gt;&lt;br /&gt;So far, so good!&lt;br /&gt;&lt;br /&gt;The fun came when I tried to set up wireless printing so I could print to it from my laptop without my daughter's computer being switched on. &amp;nbsp; The first attempt was to repeat what I had done for the other computer, and install the Samsung unified driver on my laptop. &amp;nbsp;Unfortunately it refused to detect the printer, even when it was plugged into the USB port on the laptop. &amp;nbsp; I never found out why and tried a different approach.&lt;br /&gt;&lt;br /&gt;I plugged the printer into my ethernet network and re-started it. &amp;nbsp;I found out that to print the diagnostics you hold the 'cancel' button (with the triangle symbol on it) for a few seconds. &amp;nbsp;This printed &amp;nbsp;out a network diagnostic page that said the network type was 'dhcp' and the ip address was 192.0.0.192. &amp;nbsp; This is odd because my router, which would act as dhcp server should give out addresses 192.168.1.*, so I assumed that it was lying about using dhcp and had a static default address.&lt;br /&gt;Re-configured laptop to use the 192.0.0.* subnet and tried looking for the printer - tried a web browser, ping and nmap, and no sign of it.&lt;br /&gt;&lt;br /&gt;Had a look at my router's dhcp list, and realised that the printer had been assigned an ip address by the router, which was not the one on the network diagnostics!!!!!&lt;br /&gt;Re-printed the network diagnostics and got the correct ip address - don't know what happened there.&lt;br /&gt;&lt;br /&gt;Pointed a web browser at the printer's IP address and got a nice status web page, with a 'login' option at the top right hand corner of the screen (once I had scrolled across because I couldn't see it on my laptop screen for some reason....). &amp;nbsp; Had to search on the internet for the default login credentials - found out that it is user name - &amp;nbsp;"admin", password - "sec00000".&lt;br /&gt;&lt;br /&gt;Once logged in, I could set up the network to use a static IP address (so I always know where it is, and connect it to my wireless network).&lt;br /&gt;&lt;br /&gt;Disconnected the lan cable from the printer, and sure enough, I can see the printer from my laptop. &amp;nbsp;Used the Samsung printer configuration tool to set it up as a network printer on the laptop and....it works!!!&lt;br /&gt;&lt;br /&gt;phew!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8203134440658305698?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8203134440658305698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8203134440658305698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8203134440658305698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8203134440658305698'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/11/samsung-colour-laser-printer-and-ubuntu.html' title='Samsung Colour Laser Printer and Ubuntu Linux'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1629079951634796145</id><published>2011-10-11T06:56:00.000+01:00</published><updated>2011-10-11T06:56:08.261+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonfire'/><category scheme='http://www.blogger.com/atom/ns#' term='codeIgniter'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>CodeIgniter / Bonfire</title><content type='html'>I have been progressing an automated way of generating maps from openstreetmap data, allowing layers to be selected, including contours and hill shading etc. (&lt;a href="https://github.com/jones139/disrend"&gt;https://github.com/jones139/disrend&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I want a web front end to allow people to generate maps using this renderer. &amp;nbsp; When I did this for my townguide program I just built a very simple php based web interface.&lt;br /&gt;Ideally I would like things like user authentication though, which would mean writing a lot of code to go with it.&lt;br /&gt;The &lt;a href="http://codeigniter.com/"&gt;CodeIgniter&lt;/a&gt; framework goes some way to this by providing an interface to sessions etc, but there is still quite a bit of boilerplate code to write to produce the database interface.&lt;br /&gt;The &lt;a href="http://cibonfire.com/"&gt;CodeIgniter / Bonfire&lt;/a&gt; application seems to solve this by providing:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Roles based authentication.&lt;/li&gt;&lt;li&gt;Modular structure (this was an issue I had with codeigniter - you ended up with code scattered in different places).&lt;/li&gt;&lt;li&gt;A really neat module builder function that produces a basic module with database interface for you to build on.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I am just trying to get the hang of using bonfire now - I have had a few issues with installing modules based on the module builder code - will write up how to do this once I have it working...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1629079951634796145?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1629079951634796145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1629079951634796145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1629079951634796145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1629079951634796145'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/10/codeigniter-bonfire.html' title='CodeIgniter / Bonfire'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6197613471064275769</id><published>2011-07-22T21:18:00.000+01:00</published><updated>2011-07-22T21:18:25.056+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deb'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Building Debian Packages</title><content type='html'>I worked out how to make simple debian packages by hand as described in a previous post.&lt;br /&gt;Trying to build other software into packages is still rather difficult...&lt;br /&gt;I found a really good, simple tutorial on how to use the debian tools to do this more easily at:&lt;br /&gt;&lt;a href="http://www.debian.org/doc/packaging-manuals/packaging-tutorial/packaging-tutorial.pdf"&gt;http://www.debian.org/doc/packaging-manuals/packaging-tutorial/packaging-tutorial.pdf&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6197613471064275769?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6197613471064275769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6197613471064275769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6197613471064275769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6197613471064275769'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/07/building-debian-packages.html' title='Building Debian Packages'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-742585419818411232</id><published>2011-06-17T22:34:00.001+01:00</published><updated>2011-06-17T22:39:52.379+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apt'/><category scheme='http://www.blogger.com/atom/ns#' term='deb'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu packages and repositories</title><content type='html'>Creating Ubuntu (debian) packages always seems a bit fiddly....At the moment I can do it, so thought I'd better write down quickly how I did it.&lt;br /&gt;&lt;br /&gt;Packages&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create a directory and put the files you want to install into a directory tree under it (e.g. if you create a directory called [pkgname], files that you want in /usr/local/bin go in [pkgname]/usr/local/bin.&lt;/li&gt;&lt;li&gt;Create a directory called [pkgname]/DEBIAN and put a file in it called 'control'. &amp;nbsp;This can be as simple as:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;Package: grahamstestdeb&lt;br /&gt;Version: 001&lt;br /&gt;Architecture: i386&lt;br /&gt;Depends:&lt;br /&gt;Maintainer: Graham Jones (grahamjones139@gmail.com)&lt;br /&gt;Description: Test Debian Package&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create a file called 'postinst' in DEBIAN. &amp;nbsp;This will be executed when the package is installed. This can be&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;#!/bin/sh&lt;/li&gt;&lt;li&gt;echo "postinst works!!!!"&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Create the .deb package by doing&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;dpkg-deb --build [pkgname]&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;Copy your new [pkgname].deb file into a new folder called repository.&lt;/li&gt;&lt;li&gt;Run 'sudo dpkg-scanpackages . /dev/null | gzip -9c &amp;gt; Packages.gz' in the repostitory directory.&lt;/li&gt;&lt;li&gt;Upload the repository directory to your web server:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;ncftpput -v -R -u maps3.org.uk -p &lt;passwd&gt; ftp.maps3.org.uk public_html/apt/ *&lt;/passwd&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add the following to /etc/apt/sources.lst&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;blockquote&gt;deb http://apt.maps3.org.uk /&amp;nbsp;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Run sudo apt-get update&lt;/li&gt;&lt;li&gt;Run sudo apt-cache search [pkgname] - should find your package.&lt;/li&gt;&lt;li&gt;Run sudo apt-get install [pkgname] - should run your postinst script.&lt;/li&gt;&lt;/ul&gt;For better instructions see:&amp;nbsp;&lt;a href="http://odzangba.wordpress.com/2006/10/13/how-to-build-local-apt-repositories/#comment-7304"&gt;http://odzangba.wordpress.com/2006/10/13/how-to-build-local-apt-repositories/#comment-7304&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-742585419818411232?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/742585419818411232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=742585419818411232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/742585419818411232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/742585419818411232'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/06/ubuntu-packages-and-repositories.html' title='Ubuntu packages and repositories'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1854305340155690044</id><published>2011-05-19T22:29:00.001+01:00</published><updated>2011-05-19T22:41:46.539+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='carto'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='tilemill'/><title type='text'>Rendering OpenStreetMap Data using Carto and Mapnik</title><content type='html'>&lt;a href="http://mapnik.org/"&gt;Mapnik&lt;/a&gt;&amp;nbsp;is often used to render &lt;a href="http://wiki.openstreetmap.org/Mapnik"&gt;OpenStreetMap&lt;/a&gt;&amp;nbsp;(OSM) data.&amp;nbsp; &amp;nbsp;The map style (line colours and sizes, icons etc.) are defined by a style file. &amp;nbsp;There is a very detailed one provided with OpenStreetMap's &lt;a href="http://wiki.openstreetmap.org/wiki/Mapnik#Rendering_with_Mapnik"&gt;mapnik tools&lt;/a&gt;. &amp;nbsp; Unfortunately that level of detail means that the style definition is very complicated and it is hard to follow how it works.&lt;br /&gt;A tool called &lt;a href="https://github.com/mapbox/carto"&gt;carto&lt;/a&gt; is available which is a pre-processor that will take a simpler format of style file, and convert it into the mapnik file format. &amp;nbsp; I have been experimenting with trying to render OSM data using styles written for carto. &amp;nbsp; I had been hoping to use a nice graphical editor with map preview capability called &lt;a href="http://tilemill.com/"&gt;tilemill&lt;/a&gt;, but tilemill does not work with postgresql datasources, which are necessary for OSM rendering. &amp;nbsp; Instead, I installed tilemill and used the version of carto that is included with it, but did not use the tilemill editor.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Carto Layer Definitions&lt;/b&gt;&lt;br /&gt;Rendering data with carto needs you to do two things - define the data you want to plot on your map ('Layers'), and define how you want the data displayed ('Styles').&lt;br /&gt;&lt;br /&gt;The datasource definitions go in a .mml file that looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;{&lt;br /&gt;"_center":{"lat":36.870832154494,"lon":-113.79638671427,"zoom":5},&lt;br /&gt;"_format":"png",&lt;br /&gt;"srs":"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",&lt;br /&gt;"Stylesheet":["style2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"areas2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"roads2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"labels2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"natural2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"contours2.mss",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"POIs2.mss"],&lt;br /&gt;&lt;br /&gt;"Layer":[&lt;br /&gt;&amp;nbsp; {"id":"coastline",&lt;br /&gt;&amp;nbsp; &amp;nbsp;"name":"coastline",&lt;br /&gt;&amp;nbsp; &amp;nbsp;"srs":"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",&lt;br /&gt;&amp;nbsp; &amp;nbsp;"class":"",&lt;br /&gt;&amp;nbsp; &amp;nbsp;"geometry":"polygon",&lt;br /&gt;&amp;nbsp; &amp;nbsp;"Datasource":{"file":"/home/graham/OSM/data/mapdata/world_boundaries/processed_p.shp","type":"shape"}},&lt;br /&gt;&lt;br /&gt;&amp;nbsp;{"id":"landuse",&lt;br /&gt;&amp;nbsp; "name":"landuse",&lt;br /&gt;&amp;nbsp; "srs":"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",&lt;br /&gt;&amp;nbsp; "class":"",&lt;br /&gt;&amp;nbsp; "geometry":"area",&lt;br /&gt;&amp;nbsp; "Datasource": {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"type":"postgis",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "dbname":"kefalonia",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "user":"www",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "password":"1234",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "host":"localhost",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "port":"",&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; "table":"(select way,landuse,name,\"name:en\" from planet_osm_polygon where landuse is not null) as landuse"&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;]&lt;br /&gt;}&lt;/blockquote&gt;The first few lines define the projection of the output map, and the stylesheets that are to be used to define how to render the data. &amp;nbsp; The bulk of the file is layer definitions. &amp;nbsp; In this example two layers are defined. &amp;nbsp;One is a shapefile containing the coastlines (the same one that is used by the normal OSM style). &amp;nbsp; The second layer extracts all areas tagged with 'landuse=xxx'.&lt;br /&gt;&lt;br /&gt;We have not told mapnik how to plot the data though - this is done in the style files. &amp;nbsp;The ones relevant to this example are "style2.mss" and "areas2.mss". &amp;nbsp;Style2.mss contains:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;@land: #e0e0c0;&lt;br /&gt;@water: #C0E0F8;&lt;br /&gt;@waterline: #8CE;&lt;br /&gt;Map {&lt;br /&gt;&amp;nbsp; background-color:@water;&lt;br /&gt;}&lt;br /&gt;#coastline::outline {&lt;br /&gt;&amp;nbsp; line-color:@waterline;&lt;br /&gt;&amp;nbsp; line-width:1.6;&lt;br /&gt;}&lt;br /&gt;#coastline::fill {&lt;br /&gt;&amp;nbsp; polygon-fill:@land;&lt;br /&gt;&amp;nbsp; polygon-gamma:0.75;&lt;br /&gt;}&lt;/blockquote&gt;&lt;div&gt;Here the things starting '@' are variables which allow you to define colours etc. &amp;nbsp;at the top of the file, then use them several times throughout it, making future maintenance easier. &amp;nbsp; In this example we define the background colour for the map, fill it in blue to represent water. &amp;nbsp; We then draw a line around the costline, and fill in the land with a separate colour.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The areas2.mss style is slightly more complicated:&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;#landuse {&lt;br /&gt;&amp;nbsp; &amp;nbsp;[landuse="residential"]&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; polygon-fill: #b0b0b0;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp;[landuse="industrial"]&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; polygon-fill: #a0a0a0;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp;[landuse="forest"]&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; polygon-fill: #a0d0a0;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;In this example the [] expressions are filters, which allows us to define different fill colours depending on the landuse tag.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These are just extracts - the actual styles I am using are getting progressively more and more complicated. &amp;nbsp; You can see the files, and a modified version of the generate_image.py script provided by OSM, which takes a carto .mml file as input in my s&lt;a href="http://code.google.com/p/ntmisc/source/browse/#svn%2Fkefalonia_map%2Fcarto_style"&gt;vn repository&lt;/a&gt; (soon to be copied to github..)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using these styles, I have updated my &lt;a href="http://nerdytoad.blogspot.com/2011/04/kefalonia-map.html"&gt;kefalonia map&lt;/a&gt; to give this:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-RMxBJz6VgTQ/TdWKWh-FsSI/AAAAAAAAAHk/85QXgJLoeUI/s1600/image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-RMxBJz6VgTQ/TdWKWh-FsSI/AAAAAAAAAHk/85QXgJLoeUI/s640/image.png" width="448" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;and this:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-wdsMo7vQ5sc/TdWLf65cmFI/AAAAAAAAAHo/IVKghmjcIRM/s1600/image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-wdsMo7vQ5sc/TdWLf65cmFI/AAAAAAAAAHo/IVKghmjcIRM/s640/image.png" width="448" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These styles are nowhere near as clever as the standard OSM ones. &amp;nbsp;In particular I have not tried to devine different styles fo rdifferent zoom levels &amp;nbsp;instead I have two sets of stylesheets for two different zoom levels - I think in the end I will have there - one for a 'country level', another for a 'town level', and a third for higher zoom levels.&lt;br /&gt;&lt;br /&gt;There are also a few issues - the line styles do not look as nice as the OSM ones - I do not know why...and there is a problem with the road names where sometimes other roads crossing over each other obliterate the labels. &amp;nbsp; THe reason is that I draw the road and the label at the same time - it will probably look better if I do the labels after all roads have been drawn. &amp;nbsp; Will hav eto work out how to do that!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1854305340155690044?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1854305340155690044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1854305340155690044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1854305340155690044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1854305340155690044'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/05/rendering-openstreetmap-data-using.html' title='Rendering OpenStreetMap Data using Carto and Mapnik'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-RMxBJz6VgTQ/TdWKWh-FsSI/AAAAAAAAAHk/85QXgJLoeUI/s72-c/image.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4326281649515630627</id><published>2011-04-29T20:59:00.003+01:00</published><updated>2011-05-10T23:19:28.746+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='carto'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='tilemill'/><title type='text'>Installation of Carto Mapnik Style File Builder on Ubuntu</title><content type='html'>I find mapnik style files a bit clumsy to edit - lots of repetition that makes them hard to follow.&lt;br /&gt;There are (at least) two utilities available that may make style file generation simpler. &amp;nbsp;These are &lt;a href="https://github.com/mapnik/Cascadenik/wiki/Cascadenik"&gt;Cascadenik&lt;/a&gt; and &lt;a href="https://github.com/mapbox/carto"&gt;Carto&lt;/a&gt;.&lt;br /&gt;It appears that Carto is being more actively developed at the moment, so I thought I would look at that first. Carto also reports to be much faster than Cascadenink.&lt;br /&gt;The problem is that Carto is new-fangled and uses a javascript based language called &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt;. &amp;nbsp; Despite my dislike of javascript, I thought I would persevere. &amp;nbsp;This is how I got it working on my Ubuntu 10.10 system:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Downloaded node.js version 0.4.7 from http://nodejs.org, and extracted it into /usr/local/node-v0.4.7. &amp;nbsp;Built with&amp;nbsp;./configure; make; make install.&lt;/li&gt;&lt;li&gt;Installed the node package manager npm using:&amp;nbsp;curl http://npmjs.org/install.sh | sh&lt;/li&gt;&lt;li&gt;Installed carto dependencies:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;npm install get &amp;nbsp; &amp;nbsp; [used to be node-get, but the module has changed name]&lt;/li&gt;&lt;li&gt;npm install step&lt;/li&gt;&lt;li&gt;npm install srs&lt;/li&gt;&lt;li&gt;npm install underscore&lt;/li&gt;&lt;li&gt;npm install zipfile (actually did this twice because one of the document build actions failed on the first attempt...).&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Downloaded carto using: &amp;nbsp;git clone https://github.com/mapbox/carto.git&lt;/li&gt;&lt;li&gt;No compilation necessary (it is javascript). &amp;nbsp;Executing cd carto; ./bin/carto gave no nasty errors, just "no input files", which looks promising.&lt;/li&gt;&lt;/ul&gt;I just need to work out how to use it now.&lt;br /&gt;&lt;br /&gt;I have had a quick look at &lt;a href="http://tilemill.com/"&gt;TileMill&lt;/a&gt;, which is a web based editor for carto stylesheets - it is very impressive - you can change the stylesheet and preview the map in real time. &amp;nbsp; The only problem that I have found with tilemill is that it does not seem to work with a postgresql database as the data source, which is where my OSM data is stored. &amp;nbsp;But at least I should get the idea about the structure of the files using that tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4326281649515630627?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4326281649515630627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4326281649515630627' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4326281649515630627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4326281649515630627'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/04/carto-mapnik-style-file-builder.html' title='Installation of Carto Mapnik Style File Builder on Ubuntu'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5773788109805659596</id><published>2011-04-25T21:24:00.004+01:00</published><updated>2011-04-27T21:37:56.807+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='contours'/><title type='text'>Kefalonia Map</title><content type='html'>We are going to &lt;a href="http://www.openstreetmap.org/?lat=38.234&amp;amp;lon=20.593&amp;amp;zoom=10&amp;amp;layers=C"&gt;Kefalonia&lt;/a&gt; on our holidays this year, and I usually like to do a bit of &lt;a href="http://wiki.openstreetmap.org/"&gt;OSM&lt;/a&gt; mapping when I go somewhere new, and may do some 'armchair mapping' before I go to get a head start, so I thought I would have a look at how well mapped it is.&lt;br /&gt;The answer is not very - there are the main roads, and a few minor roads and footpaths, but not much else - this is a shame because I like to know where things like supermarkets and banks are. &amp;nbsp;Unfortunately there is not a lot of information available for remote mapping - very few GPS traces, and Bing Imagery does not cover the area I am interested in.&lt;br /&gt;So instead I decided to make myself a map of the island showing what is there (in OSM anyway). &amp;nbsp;Because there is not a lot of detail, I want to have contours so I can tell where the mountains are, and also highlight what points of interest there are at lower zoom levels than the standard OSM style. &amp;nbsp; These are my notes on how I produced the map, so I can remember next time I need to do it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The map bounding box was found by looking at the (lon,lat) &amp;nbsp;readouts on &lt;a href="http://www.informationfreeway.org/"&gt;http://www.informationfreeway.org&lt;/a&gt; to check the bottom left and top right of the island. &amp;nbsp;They are (20.33, 38.03) and (20.82,38.50).&lt;/li&gt;&lt;li&gt;I downloaded the OSM data from the mapquest XAPI server using:&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;wget http://open.mapquestapi.com/xapi/api/0.6/map?bbox=20.33,38.03,20.82,38.50 -O kefalonia.osm&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Imported the data into postgresql database using:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;osm2pgsql -s -S default.style -d kefalonia -m kefalonia.osm&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Downloaded the SRTM elevation data covering the island from&amp;nbsp;&lt;a href="http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/"&gt;http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/&lt;/a&gt;&amp;nbsp;- only needed one file (N38E020.hgt.zip), because it is a small island.&lt;/li&gt;&lt;li&gt;Generated the contours and imported them into my postgresql kefalonia database as described in&amp;nbsp;&lt;a href="http://wiki.openstreetmap.org/wiki/Contours"&gt;http://wiki.openstreetmap.org/wiki/Contours&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Modified the standard osm mapnik style file as described in&amp;nbsp;&lt;a href="http://wiki.openstreetmap.org/wiki/Contours"&gt;http://wiki.openstreetmap.org/wiki/Contours&lt;/a&gt;, using the 'PostGIS' method.&lt;/li&gt;&lt;li&gt;Generated the map image using the generate_image.py file from the OSM mapnik archive. &amp;nbsp;I initially had some trouble with no roads appearing, but solved this by re-compiling osm2pgsql from the latest sources - I do not know what the problem was.&lt;/li&gt;&lt;li&gt;Having done that, I get this map image:&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MdAVhjOMK5w/TbXWxugYDFI/AAAAAAAAAHM/IATZSVg7bLU/s1600/image.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-MdAVhjOMK5w/TbXWxugYDFI/AAAAAAAAAHM/IATZSVg7bLU/s400/image.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Kefalonia Map - Version 1 (25 April 2011)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Next I wanted to add a 1km grid to the map to make it easier to judge scale..."are we nearly there yet?" etc.&lt;br /&gt;I did this by adopting the generate_graticule script from &lt;a href="http://code.google.com/p/mapnik-utils"&gt;mapnik-utils&lt;/a&gt; to produce a grid on the google spherical mercator projection (=SRS 900913). &amp;nbsp;I must admit to not really knowing how this works, but my updated version (generate_grid.py) is in my &lt;a href="http://code.google.com/p/ntmisc/source/browse/#svn%2Fkefalonia_map"&gt;SVN repository&lt;/a&gt;. &amp;nbsp; I added this to the map by creating an extra xml include file to define the grid layer and style (&lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/inc/grid.xml.inc"&gt;inc/grid.xml.inc&lt;/a&gt;), adding this to layers.xml.inc, and finally defining the layer in osm.xml.&lt;br /&gt;&lt;br /&gt;The result (Version 2) is shown below:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-pRMgUwASVEg/TbcgfJz0CJI/AAAAAAAAAHY/1cz-3x7SJGw/s1600/kefalonia_v2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-pRMgUwASVEg/TbcgfJz0CJI/AAAAAAAAAHY/1cz-3x7SJGw/s320/kefalonia_v2.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Kefalonia Map Version 2 (26 April 2011)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I created another include file for holiday based points of interests (&lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/inc/holiday_pois.xml.inc"&gt;holiday_pois.xml.inc&lt;/a&gt;), added it to l&lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/inc/layers.xml.inc"&gt;ayers.xml.inc &lt;/a&gt;and again added the actual layer definition to &lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/osm.xml"&gt;osm.xml&lt;/a&gt;.&lt;br /&gt;This gave the following map:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-kdQgTk9MCbQ/Tbc8KeoQiLI/AAAAAAAAAHc/1L3UtY8a-hM/s1600/kefalonia_v3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-kdQgTk9MCbQ/Tbc8KeoQiLI/AAAAAAAAAHc/1L3UtY8a-hM/s320/kefalonia_v3.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Kefalonia Map Version 3 (26 April 2011)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The final thing I needed was the English spelling adding to the Greek text labels. &amp;nbsp; I did this by adding name:en to the &lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/default.style"&gt;default.style&lt;/a&gt; file used by osm2pgsql and re-importing the OSM data into the database.&lt;br /&gt;The challenge was updating the mapnik style file to use the name:en column - the OSM style files are very complicated with lots of SQL SELECT statements to extract the data out of the database. &amp;nbsp;I was tempted to do a global replace of 'name' with 'name:en'...but 'name' appears all over the place.&lt;br /&gt;I decided the main thing I wanted with both writing styles were place names and I found the code for them in &lt;a href="http://code.google.com/p/ntmisc/source/browse/kefalonia_map/inc/layer-placenames.xml.inc"&gt;inc/layer-placenames.xml.inc&lt;/a&gt;. &lt;br /&gt;I modified the SELECT statement from a simple 'name' to&amp;nbsp;,'"name" || ' (' || "name:en" || ')' as name'. &amp;nbsp;This gives me the greek spelling followed by the english spelling in brackets using the postgresql '||' string concatenation operator. &amp;nbsp;The result is here:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-KsE6IqsZN0g/Tbh-GVYi-JI/AAAAAAAAAHg/11c6gQicHdo/s1600/kefalonia_v4.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-KsE6IqsZN0g/Tbh-GVYi-JI/AAAAAAAAAHg/11c6gQicHdo/s320/kefalonia_v4.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Kefalonia Map Version 4 (27 April 2011)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I think that is about the finished product - I will have to try printing it to see how it looks, then may need to adjust the image size to suit printing....then do some mapping to add some more POIs - Sacla in the south east of the island should be a lot better by the middle of June....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5773788109805659596?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5773788109805659596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5773788109805659596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5773788109805659596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5773788109805659596'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/04/kefalonia-map.html' title='Kefalonia Map'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-MdAVhjOMK5w/TbXWxugYDFI/AAAAAAAAAHM/IATZSVg7bLU/s72-c/image.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3389559949339103339</id><published>2011-04-17T20:39:00.001+01:00</published><updated>2011-04-17T20:40:03.739+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Problems with GoogleCode SVN</title><content type='html'>I use GoogleCode (http://code.google.com) for my little open source projects, and it usually works quite nicely.&lt;br /&gt;I was just trying to set up one of my repositories in writable mode on a new computer, and "svn ci" (checkin) gave 500-Internal Server errors, which was not very helpful.&lt;br /&gt;Eventually I realised that although I had done the "svn checkout" with a --username=&lt;my code="" google="" username=""&gt;", when I was doing the checking it was using my computer username, rather than my google one...so presumably the authentication failed.&lt;/my&gt;&lt;br /&gt;I had to do "svn ci --username=&lt;my code="" gogole="" username=""&gt;", then it worked ok. &amp;nbsp; I don't know why!&lt;/my&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3389559949339103339?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3389559949339103339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3389559949339103339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3389559949339103339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3389559949339103339'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/04/problems-with-googlecode-svn.html' title='Problems with GoogleCode SVN'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4334721704544190496</id><published>2011-04-03T23:35:00.000+01:00</published><updated>2011-04-03T23:35:59.702+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='codeIgniter'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Trouble with mysql, apache, php5 and codeIgniter</title><content type='html'>I am working on a new web interface to townguide based on php so it can be used on a low cost web hosting service (rendering will be done by a separate computer).&lt;br /&gt;I am going to use the codeIgniter web framework because it seems simple, and is simiar to django, which I was just starting to get used to.....&lt;br /&gt;Alas getting database access working on my laptop for development was difficult.&lt;br /&gt;I have apache, php5 and mysql all working, but whenever I tried to load the database module of codeIgniter I got a 500 Internal Server error, but no errors in either the apache or codeigniter error logs. &amp;nbsp; This made debugging difficult.&lt;br /&gt;After much searching on the internet I realised it was because I needed to install&amp;nbsp;libapache2-mod-auth-mysql as well as php5-mysql.&lt;br /&gt;Doing sudo apt-get install&amp;nbsp;libapache2-mod-auth-mysql and re-starting apache made the following trivial mysql db connection work:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;!--?php&lt;br--&gt;$conn = mysql_connect('localhost', 'www', '1234');&lt;br /&gt;if($conn) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo 'Finally connected!!!';&lt;br /&gt;&amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;die('Still cannot connect' . mysql_error());&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;?&amp;gt;&amp;nbsp;&lt;/blockquote&gt;A bit late now, but I think this will also have solved the problem connecting to the database using codeigniter....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4334721704544190496?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4334721704544190496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4334721704544190496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4334721704544190496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4334721704544190496'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/04/trouble-with-mysql-apache-php5-and.html' title='Trouble with mysql, apache, php5 and codeIgniter'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2242211778068619025</id><published>2011-03-29T17:01:00.001+01:00</published><updated>2011-03-29T19:45:56.324+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amilo Li2727'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Disk Crash on Linux</title><content type='html'>Well, I thought that the introduction of the ext3 (and higher) file systems had stopped all of the problems of disk crashes and mangled filesystems on linux.&lt;br /&gt;But, after a few years of reliable operation the root filesystem on my home server (my old Fujitsu Siemens laptop) seems to have mangled.&lt;br /&gt;The symptoms were....not booting - you get the 'Starting up......' message during boot then the system appears to hang. &amp;nbsp;But if you listen carefully you hear that the disk is actually doing something. &amp;nbsp;So I left it for a few hours.....&lt;br /&gt;When I came back to it there was a 'failed to mount /dev/sda1' type error message, with an option to skip mounting or manually fix it.&lt;br /&gt;I went for manually fixing it, because not mounting the root filesystem will not get me very far. &lt;br /&gt;This dropped me into a single user shell.&lt;br /&gt;I ran fsck and it said that an Inode has illegal blocks. &amp;nbsp;I selected the option to clear them...and again said yes when it asked me again.&lt;br /&gt;It then said it was restarting e2fsck from the beginning, and spent quite a few minutes checking....&lt;br /&gt;&lt;br /&gt;Then at Pass 2 fsck said it had found a deleted or unused inode. &amp;nbsp;Again I said 'y' to the 'Clear?' question....&lt;br /&gt;Then lots of offers to fix things (to the extent that I just held my finger on the 'y' key...)&lt;br /&gt;&lt;br /&gt;Then fsck announced that it was complete and I should re-boot linux. &amp;nbsp; Re-ran fsck and it announced that /dev/sda1 was clean, so re-booted.....but booting is taking a suspiciously long time.....like it has been trying for 10 minutes and hasn't got past the boot up splash screen...I'm going to need a plan B...&lt;br /&gt;&lt;br /&gt;Well, I don't know what the problem is. &amp;nbsp; Tried booting off a USB memory stick, and the disk checks ok and mounts, but the boot process just hangs. &amp;nbsp; I decided I had spent too long on this so it is currently installing Ubuntu 10.10 on the disk instead, so can't try any more diagnosis!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2242211778068619025?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2242211778068619025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2242211778068619025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2242211778068619025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2242211778068619025'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/03/disk-crash-on-linux.html' title='Disk Crash on Linux'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1340636808197906220</id><published>2011-03-06T19:15:00.000Z</published><updated>2011-03-06T19:15:10.323Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='Drupal'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Emacs Drupal Mode</title><content type='html'>I am trying to learn how to write Drupal modules for a new map rendering on demand web service (a bit like townguide, but distributed with a separate front end and rendering servers).&lt;br /&gt;&lt;br /&gt;First thing is to get emacs23 working with php and drupal modes - the instructions &lt;a href="http://drupal.org/node/59868"&gt;here&lt;/a&gt; give me obscure errors about c-lang-def only being used in a file. &amp;nbsp; After a bit of hunting on the internet I found it is a problem with Emacs V23, and a simple work around is to put the php-mode.el and drupal-mode.el files in ~/.emacs.d, then add the following to ~/.emacs:&lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;; make sure the target directory is on your load-path&lt;/blockquote&gt;&lt;blockquote&gt;(add-to-list 'load-path "~/.emacs.d")&lt;/blockquote&gt;&lt;blockquote&gt;(autoload 'php-mode "php-mode" "Major mode for editing php code" t)&lt;/blockquote&gt;&lt;blockquote&gt;(autoload 'drupal-mode "drupal-mode" "Major mode for editing drupal php " t)&lt;/blockquote&gt;&lt;blockquote&gt;(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . drupal-mode))&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;(add-to-list 'auto-mode-alist '("\\.\\(php\\|inc\\)$" . php-mode))&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;(add-to-list 'auto-mode-alist '("\\.info" . conf-windows-mode))&lt;/blockquote&gt;&lt;/blockquote&gt;With that in my .emacs file, loading a .php or .module file starts php or drupal mode - success!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1340636808197906220?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1340636808197906220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1340636808197906220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1340636808197906220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1340636808197906220'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/03/emacs-drupal-mode.html' title='Emacs Drupal Mode'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8270726301446011448</id><published>2011-02-24T16:33:00.000Z</published><updated>2011-02-24T16:33:21.077Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><title type='text'>Easier Map Creation with OpenStreetMap Data</title><content type='html'>I have been giving some thought to making the process of creating maps form OpenStreetMap data easier. &amp;nbsp;The problem is that to use the mapnik map renderer, you need to install quite a lot of tools and set different configuration files before you can even start to create a map.&lt;br /&gt;This means you have to be pretty keen to persevere enough to get to an end result.&lt;br /&gt;I am thinking of creating a service to allow you to bypass the tool installing bits, and concentrate on the setting up of the map configuration, so you can get to a result quicker - see&amp;nbsp;&lt;a href="http://wiki.openstreetmap.org/wiki/User:Grahamjones#Speciality%20Maps"&gt;http://wiki.openstreetmap.org/wiki/User:Grahamjones#Speciality%20Maps&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Quite a few of the responses that I got to that proposal were about the lack of good documentation to get people started on the process. &amp;nbsp;I have had a go at addressing this by putting together a simple overview presentation to go through the main concepts and tools that you need to generate a map using mapnik. &amp;nbsp; The presentation is on slideshare.net, and should be visible below:&lt;br /&gt;&lt;div id="__ss_7036274" style="width: 425px;"&gt;&lt;strong style="display: block; margin: 12px 0 4px;"&gt;&lt;a href="http://www.slideshare.net/jones139/rendering-openstreetmap-data-using-mapnik" title="Rendering OpenStreetMap Data using Mapnik"&gt;Rendering OpenStreetMap Data using Mapnik&lt;/a&gt;&lt;/strong&gt; &lt;object height="355" id="__sse7036274" width="425"&gt; &lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mapnikosmpresentation-110223161304-phpapp01&amp;stripped_title=rendering-openstreetmap-data-using-mapnik&amp;userName=jones139" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse7036274" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mapnikosmpresentation-110223161304-phpapp01&amp;stripped_title=rendering-openstreetmap-data-using-mapnik&amp;userName=jones139" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;br /&gt;&lt;div style="padding: 5px 0 12px;"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/jones139"&gt;jones139&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8270726301446011448?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8270726301446011448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8270726301446011448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8270726301446011448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8270726301446011448'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/02/easier-map-creation-with-openstreetmap.html' title='Easier Map Creation with OpenStreetMap Data'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4203540353116957778</id><published>2011-02-18T21:11:00.001Z</published><updated>2011-02-18T21:14:56.233Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Mounting FTP Directory as a Filesystem</title><content type='html'>I just discovered a really useful trick to mount the directory structure of a remote FTP server as a directory on a linux computer. &amp;nbsp; You use a program called curlftps. &amp;nbsp; On Ubuntu do:&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install curlftps&lt;/blockquote&gt;The directories on the remote ftp server are then mounted using:&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;curlftpfs ftp://[username]:[password]@[server address] [local directory mount point]&amp;nbsp;&lt;/blockquote&gt;This works fine (you do not even need to be root to do it), but the password will be present if you do 'ps -ef | grep ftp'.&lt;br /&gt;A solution is to create a .netrc file in the /root directory containing:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;machine [server address]&lt;/blockquote&gt;&lt;blockquote&gt;&lt;server address=""&gt; &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;login [username]&lt;username&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;password [password]&lt;password&gt;&lt;/password&gt;&lt;/username&gt;&lt;/server&gt;&lt;/blockquote&gt;You can then add the file system to /etc/fstab by adding the following line to /etc/fstab:&lt;br /&gt;&lt;blockquote&gt;curlftpfs#[server address] [local directory mount point]&lt;server address=""&gt; &lt;local directory="" mount="" point=""&gt; fuse allow_other,rw,user,noauto 0 0&lt;/local&gt;&lt;/server&gt;&lt;/blockquote&gt;You can then just do&lt;br /&gt;&lt;blockquote&gt;sudo mount [local directory mount point]&lt;local directory="" mount="" point=""&gt;&lt;/local&gt;&lt;/blockquote&gt;and you get the same effect with the server password invisible.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4203540353116957778?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4203540353116957778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4203540353116957778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4203540353116957778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4203540353116957778'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/02/mounting-ftp-directory-as-filesystem.html' title='Mounting FTP Directory as a Filesystem'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4607962903112974398</id><published>2011-02-13T10:38:00.000Z</published><updated>2011-02-13T10:38:45.439Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='MeterServ'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>OpenWRT Based Utility Meter Monitor</title><content type='html'>I have made some progress porting my MeterServ application (&lt;a href="http://meterserv.webhop.net/"&gt;http://meterserv.webhop.net&lt;/a&gt;) to openWRT. &amp;nbsp; I have managed to work out how the openWRT makefile system works enough to add it to the build system and produce an openWRT package for the MeterServ application.&lt;br /&gt;To do the improvements that I want to make to the application though, it needs more work. &amp;nbsp;In particular I don't like Perl, so want to convert the web interface part of it to Python. &amp;nbsp; Rather than go for a completely DIY web framework, I have adopted webpy (&lt;a href="http://webpy.org/"&gt;http://webpy.org&lt;/a&gt;) - this seems like a simplified version of django - you define URLs that you want the application to work with, then point it to a python class that does the processing associated with the user requesting a particular URL.&lt;br /&gt;I have started a seperate google code project for meterserv, because a couple of people expressed an interest in it. &amp;nbsp;I have put the latest version of the software in its repository too - see &lt;a href="http://code.google.com/p/meterserv"&gt;http://code.google.com/p/meterserv&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4607962903112974398?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4607962903112974398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4607962903112974398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4607962903112974398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4607962903112974398'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/02/openwrt-based-utility-meter-monitor.html' title='OpenWRT Based Utility Meter Monitor'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2527544344698254987</id><published>2011-01-29T21:44:00.000Z</published><updated>2011-01-29T21:44:05.361Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='NSLU2'/><category scheme='http://www.blogger.com/atom/ns#' term='MeterServ'/><title type='text'>Utility Meter Monitor</title><content type='html'>I have had a simple utility meter monitoring system working in my parents and my house for a few years. &amp;nbsp;It uses an NSLU2 single board computer connected to a simple USB input/output interface, as described at &lt;a href="http://meterserv.webhop.net/"&gt;http://meterserv.webhop.net&lt;/a&gt;.&lt;br /&gt;It worked fine for at least 3 years, but started to misbehave recently. &amp;nbsp;I have not been able to determine if it is a hardware or software fault - I suspect that I may have worn out the USB memory sticks that I used for the root filesystems.&lt;br /&gt;We have gone for a hardware change to see if that is the problem, but I want to develop the software a bit more too.&lt;br /&gt;Future developments include:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add support for cheap electricity meters (e.g. OWL USB energy monitors).&lt;/li&gt;&lt;li&gt;Add support for temperature sensing.&lt;/li&gt;&lt;li&gt;Better web interface (the current one uses perl based CGI scripts, which are awful to maintain).&lt;/li&gt;&lt;li&gt;A simple (end user friendly) software upgrade process.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I want to get rid of the perl cgi scripts because I don't really speak perl, so they are hard to follow - will change them for an ajax based front end with python server side scripts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first stage is to get a sofware development environment working. &amp;nbsp;The original version used the nslu2-linux slugos operating system. &amp;nbsp;This has been changed quite a bit since I used it, so I decided that as I will need to do a complete re-build, I will standardise and use OpenWRT for all my little embedded system projects.&lt;/div&gt;&lt;div&gt;Compiling OpenWRT for the nslu2 was nice and easy - in the menuconfig just select the processor as an ixp4xxx and the sub-type as nslu2.&lt;/div&gt;&lt;div&gt;Edit target/linux/ixp4xxx/base_files/etc/config/network to give a default network configuration that will work on your system (the openwrt default ip address is 192.168.1.1, which clashes with my router....).&lt;/div&gt;&lt;div&gt;This creates a file called bin/ixp4xxx/openwrt-nslu2-squashfs.bin which can be flashed onto the nslu2 as follows:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Put the NSLU2 into upgrade mode by switching off, then powering on while holding in the reset button for about 10 seconds. &amp;nbsp; When the status LED changes colour (at about 10 sec), release the reset button. &amp;nbsp;The status LED now flashes different colours (very subtly different colours if you are colour blind like me!).&lt;/li&gt;&lt;li&gt;Use upslug2 (sudo apt-get install upslug2 on Ubuntu) to upgrade the NSLU2 using: &amp;nbsp;upslug2 -d wlan0 --image=openwrt-nslu2-squashfs.bin&lt;/li&gt;&lt;li&gt;The NSLU2 will re-boot, but then take a while (a few minutes) to set up a writeable overlay file system before being accessible over the network.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;This showed that I could build software for the NSLU2 using openwrt, but now I need to port meterserv to OpenWRT, which will be a separate post....&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2527544344698254987?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2527544344698254987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2527544344698254987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2527544344698254987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2527544344698254987'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/utility-meter-monitor.html' title='Utility Meter Monitor'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1335489604198525996</id><published>2011-01-23T15:41:00.001Z</published><updated>2011-01-23T17:15:33.195Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='NSLU2'/><title type='text'>OpenWRT on Linksys NSLU2</title><content type='html'>I have had a couple of NSLU2's running a little application to monitor utility meter readings for a few years now (&lt;a href="http://meterserv.webhop.net/"&gt;meterserv&lt;/a&gt;). &amp;nbsp; It worked fine until the autumn when my Dad's one stopped recording readings. &amp;nbsp;I have not been able to find out why - it looks ok. &amp;nbsp;It may be that the interface card has broken, or I do wonder if I have worn out the USB flash drive that I am using for the root filesystem.&lt;br /&gt;&lt;br /&gt;In my inability to find a fault, I decided to do a clean install on a usb disk to rule out software and flash drive problems. &amp;nbsp; They had been using OpenSlug (now called SlugOsBE) from &lt;a href="http://nslu2-linux.org/"&gt;nslu2-linux&lt;/a&gt;, but it is now very out of date, because I have not updated them for a few years. &amp;nbsp;This means that all the links to package directories are broken etc.&lt;br /&gt;&lt;br /&gt;Given the recent success in building &lt;a href="http://openwrt.org/"&gt;OpenWRT&lt;/a&gt; for the &lt;a href="http://bifferos.com/"&gt;bifferboard&lt;/a&gt;, I decided to use OpenWRT for the re-build. &amp;nbsp; These are my notes so I can do it again next time....&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the MenuConfig system, set the target system to 'Intel IXP4xx', sub target to 'Generic' and target profile to 'Linksys NSLU2'.&lt;/li&gt;&lt;li&gt;Because this is not my new router, I do not want it to use the default IP address of 192.168.1.1. &amp;nbsp;This can be changed in the 'Image Configuration' bit of the configuration menu.&lt;/li&gt;&lt;li&gt;I would like to re-code some of the meterserv software in python, so I need python and pyusb installed in the flash image - these were selected from the 'Languages' section of the openwrt menu.&lt;/li&gt;&lt;li&gt;Make builds a firmware image in bin/ixp4xxx called&amp;nbsp;openwrt-nslu2-squashfs.bin, which is an 8MB image - there is a 16MB one too, but I am not convinced that my nslu2 has that much flash memory.&lt;/li&gt;&lt;li&gt;You have to put the nslu2 into 'recovery mode' &amp;nbsp;by holding the re-set button in while you power up the machine - you have to release the reset button as soon as the status LED changes colour, after about 10 seconds. &amp;nbsp;The status LED then flashes a couple of different colours.&lt;/li&gt;&lt;li&gt;Flash the new firmware image onto the NSLU2 using upslug2 (sudo apt-get install upslug2 on ubuntu) - the command line was&amp;nbsp;sudo upslug2 --target 00:14:bf:64:df:be --image openwrt-nslu2-squashfs.bin.&lt;/li&gt;&lt;li&gt;The machine now appears on the network with the right IP address. &amp;nbsp;Telnet into it and change the root password, then connect using SSH instead.&lt;/li&gt;&lt;/ul&gt;The only problem is that when I type 'python' I get an error "python: can't resolve symbol 'BC'". &amp;nbsp;So now I need to work out which package is missing - looks like openWRT missed a dependency, but I don't know which one!&lt;div&gt;I have had a bit more of a look at it. &amp;nbsp;There are two surprising things. &amp;nbsp;The first is that if I write a simple 'hello world' script and execute it, it works, so it is just interactive python that is broken.&lt;/div&gt;&lt;div&gt;The second is that doing "ldd /usr/bin/python" on the nslu2 and on the bifferboard give very similar results, except that the bifferboard one is linked against libgcc and libc, but the nslu2 one is linked against libc.&lt;/div&gt;&lt;div&gt;I think this is telling me something, but I am not sure what....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1335489604198525996?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1335489604198525996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1335489604198525996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1335489604198525996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1335489604198525996'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/openwrt-on-linksys-nslu2.html' title='OpenWRT on Linksys NSLU2'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2742555691345818646</id><published>2011-01-21T20:20:00.000Z</published><updated>2011-01-21T20:20:02.798Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><title type='text'>Mapnik Map Rendering</title><content type='html'>Someone asked a question on the osm-gb mailing list about viewing coverage of waterways - canals and navigable rivers.&lt;br /&gt;We don't seem to have one, so I created one on my &lt;a href="http://maps.webhop.net/"&gt;http://maps.webhop.net&lt;/a&gt; web site.&lt;br /&gt;The trouble with that site is that although it is running on a nice powerful computer (my old laptop), it is behind my domestic broadband service from Virgin Media. &amp;nbsp; Although this service has a nice fast download speed, the upload speed is very poor ~900 kbps compared to 9600 kbps download. &amp;nbsp; This makes the web site very slow from the outside world.&lt;br /&gt;&lt;br /&gt;I have a little virtual server provided by CloudNext - it is nowhere near as powerful as my own server, and has much less disk space, but at least it has a fast internet connection.&lt;br /&gt;&lt;br /&gt;I loaded a british isles extract of OpenStreetMap data into the database - it took a very long time - maybe getting on for 12 hours (not sure when it finished!) - my server takes about 2 hours. &amp;nbsp; Performance rendering maps was not too bad though - rendering down to zoom level 14 took about 2 hours, which is respectable.&lt;br /&gt;&lt;br /&gt;Just need to get the database updating to keep it up to date, and re-generate changed tiles now....&lt;br /&gt;You can see the difference at &lt;a href="http://maps.webhop.net/canals"&gt;http://maps.webhop.net/canals&lt;/a&gt; (my home server) compared to &lt;a href="http://maps2.webhop.net/canals"&gt;http://maps2.webhop.net/canals&lt;/a&gt; (the virtual server)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2742555691345818646?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2742555691345818646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2742555691345818646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2742555691345818646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2742555691345818646'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/mapnik-map-rendering.html' title='Mapnik Map Rendering'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-322575030004770740</id><published>2011-01-16T20:52:00.006Z</published><updated>2011-01-16T23:26:31.615Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='bifferboard'/><category scheme='http://www.blogger.com/atom/ns#' term='Weather Station'/><title type='text'>Personal Weather Station using BifferBoard</title><content type='html'>I have managed to re-compile &lt;a href="http://www.openwrt.org/"&gt;openWRT&lt;/a&gt; to run on the &lt;a href="http://www.bifferos.com/"&gt;bifferboard&lt;/a&gt;, and include python, libusb and pyusb in the main root directory. &amp;nbsp; I also included the wget utility, because I thought it would come in useful, plus a few other potential future extensions (lighttpd web server and wireless LAN support).&lt;br /&gt;This fits on the bifferboard onboard flash memory, with about 1MB to spare.&lt;br /&gt;&lt;br /&gt;I created a /home/weather directory and extracted a recent &lt;a href="http://code.google.com/p/pywws"&gt;pywws&lt;/a&gt; tar archive into it. &amp;nbsp; I was very pleased that running TestWeatherStation.py produced a table of numbers as expected, so it looks as though the bifferboard is talking to the weather station ok.&lt;br /&gt;Here it is:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_iSw2e7ym1cU/TTNy4b3WOhI/AAAAAAAAAHE/vii5PjPFMGs/s1600/IMGP1209.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/_iSw2e7ym1cU/TTNy4b3WOhI/AAAAAAAAAHE/vii5PjPFMGs/s320/IMGP1209.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Set up the initial weather database by doing&lt;br /&gt;&lt;blockquote&gt;cd /home/weather&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;python pywws/pywws/LogData.py -vvv /home/weather/data&lt;/blockquote&gt;&lt;div&gt;This creates /home/weather/data/weather.ini and a directory /home/weather/data/raw which contains the raw data.&lt;/div&gt;&lt;div&gt;Run Hourly.py for the first time to process the data, and set up the weather.ini file ready for customisation:&lt;/div&gt;&lt;blockquote&gt;pywws/Hourly.py /home/weather/data&lt;/blockquote&gt;&lt;div&gt;Customise /home/weather/data/weather.ini to do what you want it to do - in my case update weatherunderground....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All is looking promising here - seems to send the update ok on an hourly basis. &amp;nbsp;There are two problems though:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;There is not much disk space left now I have added all of January's weather data (256kB ish)&lt;/li&gt;&lt;li&gt;I am concerned that I will wreck the flash chip on the bifferboard with all this writing.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;One option is to store the weather data in a ram disk and just accept that after a power-off it will need to re-initialise itself - not sure how pywws will cope with this - I will need to load some default weather.ini file from flash every time it boots, then let it update itself as best it can.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As a quick alternative I have found an old 256MB SD card and created an ext3 filesystem on it. &amp;nbsp;This detects as /dev/sda1 when plugged into the bifferboard. &amp;nbsp; I have modified /etc/rc.local to mount this as /home/weather. &amp;nbsp;This should solve my full filesystem problems. &amp;nbsp;[Note: &amp;nbsp;I used an ext3 filesystem because my openWRT build could not detect ext2 - this was a bit of a surprise because I thought you got ext2 support free with every Linux kernel...].&lt;br /&gt;Then it is just a matter of a cron job to do the hourly updates - crontab -e, then add:&lt;br /&gt;&lt;blockquote&gt;13 * * * * &amp;nbsp; &amp;nbsp; &amp;nbsp; python /home/weather/pywws/Hourly.py -v /home/weather/data &amp;gt;&amp;gt; /home/weather/Hourly.log 2&amp;gt;&amp;amp;1&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;If it works, you should continue to see the weather in our back garden at:&amp;nbsp;&lt;a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHARTLEP2"&gt;http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHARTLEP2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mistake 1&lt;/b&gt;: &amp;nbsp;If you put an SD card into the dual USB bifferboard, it disables one of the USB ports. &amp;nbsp;This is bad if it was the one the weather station was connected to....&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mistake 2&lt;/b&gt;: &amp;nbsp;Believe people when they say the clock on a board is no good. &amp;nbsp;The Bifferboard clock is no good. &amp;nbsp;Not only does it loose its time when powered off, but it drifts - by a few minutes an hour. &amp;nbsp;This meant that pywws got confused about when it should update weatherunderground, because it thought time had suddenly gone back to 2009.... &amp;nbsp; To avoid this I compiled ntpclient as a package and downloaded it onto the bifferboard. &amp;nbsp; I now have it set to be called once on boot, then every 10 minutes by a cron job. &amp;nbsp;This should keep it somewhere close - just hope the time server owner doesn't mind - If I get a complaint I will have to set up my own time server...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-322575030004770740?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/322575030004770740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=322575030004770740' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/322575030004770740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/322575030004770740'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/personal-weather-station-using.html' title='Personal Weather Station using BifferBoard'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_iSw2e7ym1cU/TTNy4b3WOhI/AAAAAAAAAHE/vii5PjPFMGs/s72-c/IMGP1209.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8250473136449817779</id><published>2011-01-16T15:40:00.002Z</published><updated>2011-01-16T17:12:29.413Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='bifferboard'/><title type='text'>Building openWRT for BifferBoard</title><content type='html'>I had a go at building openWRT for my new bifferboard computer last weekend, but had trouble with it - it looked like the kernel started, but then panicked around the time it was supposed to be starting init.   I suspect it was something to do with the j2ffs file system.&lt;br /&gt;&lt;br /&gt;I decided to try to be clever and rather than fix openWRT, start from scratch with an OpenEmbedded based build.   I think this was too big a step - the main problem was that OpenEmbedded failed to build because some sources from handhelds.org are not available, so I had to learn how to alter 'recipes' to build them from sources from another location.  I got ipkg-utils to build this way, but then hit more trouble with openssh.   I decided it was going to take me a long time, so went back to openWRT for now to try to get something working!&lt;br /&gt;&lt;br /&gt;This time I followed the exact instructions from the &lt;a href="http://sites.google.com/site/bifferboard/openwrt-svn"&gt;bifferboard site&lt;/a&gt;, including downloading the specific revision of openWRT. &amp;nbsp; This all compiled nicely without any errors, so the next challenge was to get it onto the board.&lt;br /&gt;&lt;br /&gt;Flashing over the serial line seemed to take a very long time, so I had a go with network setup.&lt;br /&gt;I downloaded the bifferboard utilities using:&lt;br /&gt;&lt;blockquote&gt;svn co https://bifferboard.svn.sourceforge.net/svnroot/bifferboard&lt;/blockquote&gt;This provides a simple python based tftp server. &amp;nbsp; I had to modify it to use a fixed ip address for my host computer, because the script assumes that you are using eth0 for the network interface, and I was using wireless.&lt;br /&gt;You then need to make sure that there is a file called bzImage in your working directory and start bootp_server.py - I had to do it as root because I got some permission denied errors about opening sockets, and the easiest way to fix it was to be root - there is probably a more elegant solution though.&lt;br /&gt;&lt;br /&gt;First I created a symbolic link to the bzImage file that openWRT had produced. &amp;nbsp; Then booted the bifferboard with the serial line connected and pressed ESC to stop the boot process. &amp;nbsp; Entering the tftpflash command downloaded the bzImage from the server and flashed it to the disk - much quicker than a serial line.&lt;br /&gt;The kernel started, but failed with a lot of j2ffs errors - I think this is because I had my old root filesystem in the flash memory.&lt;br /&gt;For the next attempt I created a symbolic link from&amp;nbsp;openwrt-rdc-jffs2-64k-bifferboard.img to bzImage.&lt;br /&gt;Re-flashed it again the same way and it boots!&lt;br /&gt;&lt;br /&gt;A minor detail was that I could not log into it - the serial console was fine and both telnetd and dropbear (the SSH server) were running, but I got 'connection refused' when I tried to connect. &amp;nbsp; It turned out that there was something called 'firewall' running. &amp;nbsp; I deleted /etc/rc.d/S45firewall and re-booted and it worked properly - I could telnet in initially without a password, set a root password, then use ssh to connect.&lt;br /&gt;Success - Now I just need to sort out the weather station software to run on it - back to the cross compiler....&lt;br /&gt;&lt;br /&gt;running make package/symlinks in the openWRT directory adds all of the available packages to the openWRT menuconfig program.&lt;br /&gt;Added the ones I know I need (libusb, python, pyusb), plus a few others that might come in useful later (atheros wireless card drivers). &amp;nbsp;Then make.....and wait...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8250473136449817779?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8250473136449817779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8250473136449817779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8250473136449817779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8250473136449817779'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/building-openwrt-for-bifferboard.html' title='Building openWRT for BifferBoard'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1375443313193368710</id><published>2011-01-08T16:22:00.000Z</published><updated>2011-01-08T16:22:25.701Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='NSLU2'/><title type='text'>A "Hacking Embedded Linux Devices" wiki site?</title><content type='html'>I have done a bit of work trying to hack cheap consumer devices to run different software - &lt;a href="http://nerdytoad.blogspot.com/search/label/NSLU2"&gt;NSLU2&lt;/a&gt;, mediaMVP, &lt;a href="http://nerdytoad.blogspot.com/search/label/musicpal"&gt;musicPal&lt;/a&gt;, &lt;a href="http://nerdytoad.blogspot.com/search/label/ip%20camera"&gt;edimax IP Cameras&lt;/a&gt; etc. &amp;nbsp; I have also had a look at 'off the shelf' single board computers like &lt;a href="http://www.bifferos.com/"&gt;bifferboard&lt;/a&gt;.&lt;br /&gt;Whenever I start I have the difficult learning curve of trying to remember how to set up a cross compiler, cross compile libraries and link them into new software.&lt;br /&gt;I also think it would be useful to have a nice list of which devices have been successfully hacked and which ones are difficult.&lt;br /&gt;I am thinking of setting up a site to collate such basic information, which could then link out to the more specific project sites.&lt;br /&gt;Unless anyone knows of one already?&lt;br /&gt;&lt;br /&gt;I think it would need a wiki to store most of the information, and an email discussion group. &amp;nbsp;I wonder how best to do it - there are google sites and google groups, wikispaces, pbworks.&lt;br /&gt;&lt;br /&gt;Any suggestions on the best way to do this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1375443313193368710?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1375443313193368710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1375443313193368710' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1375443313193368710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1375443313193368710'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/hacking-embedded-linux-devices-wiki.html' title='A &quot;Hacking Embedded Linux Devices&quot; wiki site?'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5802206061830439935</id><published>2011-01-08T15:04:00.003Z</published><updated>2011-01-15T20:59:43.856Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='openWRT'/><category scheme='http://www.blogger.com/atom/ns#' term='pywws'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Weather Station'/><title type='text'>Building openWRT</title><content type='html'>I have got a little &lt;a href="http://bifferos.com/"&gt;bifferboard&lt;/a&gt; single board computer which I intend to use to run &lt;a href="http://code.google.com/p/pywws"&gt;pywws&lt;/a&gt; to send data from our &lt;a href="http://nerdytoad.blogspot.com/search/label/Weather%20Station"&gt;weather station&lt;/a&gt; to the &lt;a href="http://wunderground.com/"&gt;weather underground&lt;/a&gt; site on the internet.&lt;br /&gt;&lt;br /&gt;The bifferboard comes installed with a very small linux distribution called &lt;a href="http://openwrt.org/"&gt;openWRT&lt;/a&gt;. &amp;nbsp; It has a very small python installed, but no python USB support.&lt;br /&gt;&lt;br /&gt;I have struggled a bit to work out how the openWRT package system works - the official wiki is a bit confused about what the current version is called (kamikaze or backfire). &amp;nbsp;It implies you can add packages by downloading them from svn, but this didn't seem to do anything.&lt;br /&gt;I found a useful forum post &lt;a href="https://forum.openwrt.org/viewtopic.php?id=16040"&gt;here&lt;/a&gt;, which seems to be the best set of instructions.&lt;br /&gt;You can do&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;./scripts/feeds update -a&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Times, 'Times New Roman', serif; font-size: 19px; white-space: pre;"&gt;This downloads the list of packages, but does not do anything else.&lt;/span&gt;&lt;br /&gt;&lt;pre style="color: #333333; font-size: 1.2em; font-weight: normal; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;To get the buildroot system to compile it for you you need to 'install' it using:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px; white-space: normal;"&gt;./scripts/feeds install python&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px; white-space: normal;"&gt;./scripts/feeds install pyusb&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;You can then do "make menuconfig" and python and pyusb are shown to be compiled as packages "&lt;m&gt;".&lt;/m&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;'make' actually compiles it.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;I'll update this when I work out how to add these to the firmware image...&lt;/span&gt;&lt;/pre&gt;&lt;pre style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;pre style="color: #333333; font-family: monaco, 'Bitstream Vera Sans Mono', 'Courier New', courier, monospace; font-size: 1.2em; font-weight: normal; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5802206061830439935?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://openwrt.org' title='Building openWRT'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5802206061830439935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5802206061830439935' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5802206061830439935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5802206061830439935'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/building-openwrt.html' title='Building openWRT'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3561330624020848346</id><published>2011-01-01T22:37:00.000Z</published><updated>2011-01-01T22:37:56.479Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='df3120'/><title type='text'>Hacking the Parrot-DF3120 Picture Frame</title><content type='html'>Some clever people have been working on running Linux on a parrot DF-3120 Picture Frame, as described on&amp;nbsp;&lt;a href="http://sites.google.com/site/repurposelinux/df3120"&gt;http://sites.google.com/site/repurposelinux/df3120&lt;/a&gt;. &amp;nbsp;&lt;br /&gt;The device sounds like a little computer with a colour display, USB connection, SD card and bluetooth wireless (I would have liked a wireless lan, but never mind!). &amp;nbsp; Most significantly, Amazon are selling them for less than £10, so I thought it was worth getting one to play with. &amp;nbsp; It arrived very quickly so I started to play with it yesterday.&lt;br /&gt;&lt;br /&gt;The instructions at&amp;nbsp;&lt;a href="http://sites.google.com/site/repurposelinux/df3120"&gt;http://sites.google.com/site/repurposelinux/df3120&lt;/a&gt;&amp;nbsp;fall into two distinct parts:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Produce a cross compiler for the board, and use it to compile a Linux kernel, busybox and other things needed to construct a basic root filesystem. &amp;nbsp;This is all done by a single clever script (minifs). &amp;nbsp; It actually took a bit of doing to get it to work on my Ubuntu 10.10 system - when it fails you have to look at the log files to see why it has failed. &amp;nbsp; The most noticeable thing was that I had to install gtk-doc from a source tarball because Ubuntu does not have a package for it - everything else (bison, flex etc.) were installed from ubuntu packages. &amp;nbsp; &lt;br /&gt;The script produced an iso image of a root filesystem.&lt;/li&gt;&lt;li&gt;Install a boot loader on the device. &amp;nbsp; The instructions have you download and compile the u-boot boot loader for the device, and package it into &amp;nbsp;a false firmware upgrade file (.plf) file. &amp;nbsp; There is some black magic required to copy the file file onto the device in the right directory etc.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;The boot loader installation apparently worked. &amp;nbsp;If you just switch on the device without touching anything, it boots normally. &amp;nbsp;If you hold down the centre and left buttons (when viewed from the front of the device) as you power it on, the screen goes blank, which is what the instructions said would happen if u-boot tries to boot linux.&lt;/div&gt;&lt;div&gt;In the 'black screen' mode, connecting the device to my computer creates a /dev/ttyACM0 device, which sounds promising for this being the u-boot serial console.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have tried using a terminal emulator program to connect to the device via ttyACM0 (picocom /dev/ttyACM0, or cu -l /dev/ttyACM0). &amp;nbsp;In both cases the program connects without error, but I do not see anything on the display or in the terminal.&lt;/div&gt;&lt;div&gt;The copy of u-boot seems to have come from openMoko, so I tried their wiki (&lt;a href="http://wiki.openmoko.org/wiki/U-boot"&gt;http://wiki.openmoko.org/wiki/U-boot&lt;/a&gt;). &amp;nbsp; It sounds like what I am doing should have worked - tried a few baud rates, but I am getting nothing, rather than gibberish - I think I'll read through the u-boot configuration that I just installed and try to work it out.....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3561330624020848346?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://sites.google.com/site/repurposelinux/df3120' title='Hacking the Parrot-DF3120 Picture Frame'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3561330624020848346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3561330624020848346' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3561330624020848346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3561330624020848346'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2011/01/hacking-parrot-df3120-picture-frame.html' title='Hacking the Parrot-DF3120 Picture Frame'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-57896221170803294</id><published>2010-12-31T09:02:00.000Z</published><updated>2010-12-31T09:02:57.637Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Inside the Edimax IC-3010WG IP Camera</title><content type='html'>I have just added my photos of the inside of the Edimax IC-3010WG IP camera to my web page: &lt;a href="http://ic-3010wg.webhop.net/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;.&lt;br /&gt;If anyone knows what 'J1' is, I would like to know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-57896221170803294?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='https://sites.google.com/site/edimaxipcamerasandlinux/hardware/inside-the-case' title='Inside the Edimax IC-3010WG IP Camera'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/57896221170803294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=57896221170803294' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/57896221170803294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/57896221170803294'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/inside-edimax-ic-3010wg-ip-camera.html' title='Inside the Edimax IC-3010WG IP Camera'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2617818330374322226</id><published>2010-12-30T15:23:00.000Z</published><updated>2010-12-30T15:23:47.153Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='firmware'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Edimax IC-3010 Firmware Modification</title><content type='html'>I just discovered the 'stats' facility in blogger.com and realised that the most read posts in my blog are the ones about the Edimax IC3010 wireless ip camera.   People are also looking at my web pages about it (&lt;a href="http://ic-3010wg.webhop.net/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;).&lt;br /&gt;This got me thinking about it again so I have had a poke around inside the case - I'll post some pictures at the weekend.&lt;br /&gt;There is not much to see in side - there is a mini wireless card and a single board computer.   I was hoping to see a USB port, but the nearest I can find is a four pin header that is likely to be one (or more of):&lt;br /&gt;- USB Port&lt;br /&gt;- Serial (RS232 ish) console&lt;br /&gt;- JTAG interface&lt;br /&gt;&lt;br /&gt;I'll have to find the main system-on-chip pin-outs to try to decide what it is.&lt;br /&gt;&lt;br /&gt;The main thing I struggle with is getting into the firmware files - I think the choice if you want to hack a device is to either connect a serial line to the console to get access to the boot loader, or modify the firmware. &amp;nbsp; Modifying the firmware sounds simplest, but you run the risk of turning the device into a brick....&lt;br /&gt;&lt;br /&gt;That is about where I got to in the summer of 2009. &amp;nbsp;I am just downloading the latest firmware and source code from edimax to try to de-code the firmware building utility. &amp;nbsp; While I was doing this, I discovered that someone has already done it -&amp;nbsp;&lt;a href="http://www.suborbital.org.uk/canofworms/index.php?/archives/3-Getting-telnet-access-on-an-Edimax-IC3010-webcam.html"&gt;http://www.suborbital.org.uk/canofworms/index.php?/archives/3-Getting-telnet-access-on-an-Edimax-IC3010-webcam.html&lt;/a&gt;. &amp;nbsp; Well done to them!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2617818330374322226?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2617818330374322226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2617818330374322226' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2617818330374322226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2617818330374322226'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/edimax-ic-3010-firmware-modification.html' title='Edimax IC-3010 Firmware Modification'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4742963367501986719</id><published>2010-12-29T15:09:00.001Z</published><updated>2010-12-29T15:17:04.053Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='NSLU2'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Weather Station'/><title type='text'>Personal Weather Station using NSLU2</title><content type='html'>&lt;object width="290" height="130"&gt;&lt;param name="movie" value="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=IHARTLEP2&amp;freq=2.5&amp;units=metric&amp;lang=EN" /&gt;&lt;embed src="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=IHARTLEP2&amp;freq=2.5&amp;units=metric&amp;lang=EN" type="application/x-shockwave-flash" width="290" height="130" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;While I wait for my new bifferboard to be delivered I thought I would get the weather station working and updating to &lt;a href="http://wunderground.com/"&gt;weatherunderground.com&lt;/a&gt; using a Linksys NSLU2 that I have available.&lt;br /&gt;The NSLU2 is already configured to run Linux. &amp;nbsp;There are quite a few varieties of &lt;a href="http://nslu2-linux.org/"&gt;NSLU2 linux&lt;/a&gt;, and I think this one was called OpenSlug when I installed it, but it now seems to be called SlugOSBE.&lt;br /&gt;When I first set it up there was no python package available for it, so I had to write my &lt;a href="http://meterserv.webhop.net/"&gt;utility meter monitoring program&lt;/a&gt; using Perl (yuk!).&lt;br /&gt;Fortunately there is now a repository at&amp;nbsp;&lt;a href="http://ipkg.nslu2-linux.org/feeds/optware/slugosbe/cross/unstable/"&gt;http://ipkg.nslu2-linux.org/feeds/optware/slugosbe/cross/unstable/&lt;/a&gt;&amp;nbsp;that includes python packages.&lt;br /&gt;To get python running (with USB support) on the NSLU2 I had to download the following packages from the repository, and install them with ipkg install &lt;package&gt;.ipk:&lt;/package&gt;&lt;br /&gt;libusb, libdb, libstdc++,ncursesw,readline,sqlite_3, zlib, python25, py25-usb&lt;br /&gt;&lt;br /&gt;The python distribution did not put an executable in /usr/bin, so I had to do&lt;br /&gt;ln -s /opt/bin/python2.5 /usr/bin/python&lt;br /&gt;&lt;br /&gt;With all this installed I could plug the weather station into the NSLU2 (via a USB hub in my case) and pywws just worked.&lt;br /&gt;I hope the bifferboard is as easy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4742963367501986719?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4742963367501986719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4742963367501986719' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4742963367501986719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4742963367501986719'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/personal-weather-station-using-nslu2.html' title='Personal Weather Station using NSLU2'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2751998230810590437</id><published>2010-12-28T20:49:00.003Z</published><updated>2010-12-28T22:38:33.470Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pywws'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Weather Station'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Personal Weather Station</title><content type='html'>I have just bought my wife, Sandie a personal weather station from &lt;a href="http://www.maplin.co.uk/module.aspx?moduleno=223254"&gt;Maplin&lt;/a&gt;. &amp;nbsp;It is a much better one than the simple one that broke recently - it has external humidity as well as temperature, plus wind speed and direction and rain detection. &amp;nbsp;Most importantly it has a USB connection so we should be able to connect it to an internet weather network so it can appear on our iGoogle home pages.&lt;br /&gt;&lt;br /&gt;The maplin version is apparently a re-branded WH1080PC weather station - I chose this one rather than a more modern one because people have managed to get it working with Linux - I want to use a very low power single board computer to interface it, rather than a big PC running Windows.&lt;br /&gt;&lt;br /&gt;I have chosen a &lt;a href="http://bifferos.bizhat.com/"&gt;bifferboard&lt;/a&gt; single board computer because it is cheap and has both USB and ethernet connections (I would have liked wireless lan too, but could not find something to do that, so I got the two USB port version of bifferboard, so will have a go at adding a USB wireless network interface card to it later).&lt;br /&gt;My original idea was to use some software called &lt;a href="http://wiki.meteoplug.com/Introduction"&gt;meteoplug&lt;/a&gt; because you can buy a bifferboard with that already installed, so I know it would work. &amp;nbsp;However, when I looked into it, it is a subscription service that is not open source - all I really want to do is obtain data from the weather station and send it to &lt;a href="http://wunderground.com/"&gt;&lt;span id="goog_1775598578"&gt;&lt;/span&gt;weatherunderground&lt;/a&gt;, which can not be that difficult.&lt;br /&gt;Fortunately there is an open source project, &lt;a href="http://code.google.com/p/pywws/"&gt;pywws&lt;/a&gt;, which is compatibly with the WH-1080PC weather station.&lt;br /&gt;I thought it best to get it going on a desktop linux set-up first, then try to get it working on the single board computer.&lt;br /&gt;From my Ubuntu 10.10 laptop I did:&lt;br /&gt;&lt;blockquote&gt;svn checkout http://pywws.googlecode.com/svn/trunk/ pywws&lt;/blockquote&gt;&lt;blockquote&gt;sudo apt-get install python-usb&lt;/blockquote&gt;&lt;blockquote&gt;cd pywws&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;python&amp;nbsp;TestWeatherStation.py&lt;/blockquote&gt;Initially this gave an error "IOError: Claim interface failed", so I tried:&lt;br /&gt;&lt;blockquote&gt;sudo python TestWeatherStation.py&lt;/blockquote&gt;Success - a string of numbers, and no errors!&lt;br /&gt;&lt;br /&gt;To get rid of the requirement to run the program as root you have to tell 'udev' to give other users permission.&lt;br /&gt;lsusb reports the vendor and product ID of the device (1941 and 8021 respectively), but this is actually reported as a USB missile launcher rather than a weather station.&lt;br /&gt;I added a file called 05-weatherstation.rules to /etc/udev/rules.d, which contained the following line:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE:="0666", GROUP:="usb"&lt;/blockquote&gt;&lt;br /&gt;I also added a line to /etc/group to create the 'usb' group, and made myself a member of that group.&lt;br /&gt;Re-started udev with 'sudo service udev restart', and now the test works without being root (note the colon in 'MODE:=' - it is very important!&lt;br /&gt;&lt;br /&gt;pywws seems to work suspiciously well - creating a data directory (~/weather/data) and running&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;pywws/LogData.py -vvv ~/weather/data/&lt;/blockquote&gt;&lt;div&gt;creates a file with some convincing looking numbers in it. &amp;nbsp; I have created a weather station on weatherunderground, so I think the next thing to do is install the weather station outside, then try to use pywws to send data to weatherunderground.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2751998230810590437?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2751998230810590437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2751998230810590437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2751998230810590437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2751998230810590437'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/personal-weather-station.html' title='Personal Weather Station'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1715390763647193509</id><published>2010-12-28T19:20:00.004Z</published><updated>2011-01-01T20:18:08.898Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Packard Bell'/><category scheme='http://www.blogger.com/atom/ns#' term='OneTwo'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Linux on a Packard Bell OneTwo</title><content type='html'>This post is a record of me getting Ubuntu Linux (Release 10.10 - Maverick) running on our new Packard Bell OneTwo all-in-one touch screen PC. &amp;nbsp; I will update it as I make progress fixing the bits that have caused problems.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Installation&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;Installation was pretty easy - I booted of an Ubuntu 10.10 USB memory stick, and selected manual disk partitioning.&lt;br /&gt;I kept the Windows 7 partition (/dev/sda1) unchanged, and did not touch the other two windows partitions (/dev/sda2 and /dev/sda3). &amp;nbsp; I deleted the blank 'Data' partition (/dev/sda4) and created a new swap partition (/dev/sda5) and ext4 root partition (/dev/sda6).&lt;br /&gt;Installation went without problem and the machine now dual boots Ubuntu and Windows 7.&lt;br /&gt;&lt;br /&gt;Note that I did have a funny happening yesterday when the machine completely refused to boot after I had been using windows. &amp;nbsp;I fixed this by booting off the USB memory stick and re-installing grub as described in a &lt;a href="http://nerdytoad.blogspot.com/2010/12/trouble-with-ubuntu-and-windows-7-dual.html"&gt;previous post&lt;/a&gt; - This has not happened again.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Audio&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Worked out of the box.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Video&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Ubuntu did not detect the correct screen size initially - it used a normal aspect ratio rather than wide screen, so only the centre of the screen was used, and the touch screen calibration was way out - this is because it thinks it has two displays (I don't know where the second is - there is no VGA or s-video connector on the back).&lt;br /&gt;This was fixed by going to the System-&amp;gt;Preferences-&amp;gt;Monitor menu and un-checking the "Same image in all monitors" option.&lt;br /&gt;You can then drag the main screen (labelled "Laptop") away from the second (labelled "Unknown") and set the laptop resolution to 1600x900 resolution.&lt;br /&gt;&lt;br /&gt;This makes the screen the correct size, but every now and then it flickers twice within less than a second - it seems that the screen backlight dims momentarily before coming back to full brightness. &amp;nbsp;This seems to be associated with disk activity - I don't know what causes this - it does not do it in Windows - Any suggestions for fixing it would be appreciated!.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Touch Screen&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;I was impressed that the touch screen worked 'out of the box' once I had fixed the monitor resolution issue.&lt;br /&gt;&lt;b&gt;&lt;u&gt;Update 01/01/2011&lt;/u&gt;&lt;/b&gt; - I decided to do a clean install of Ubuntu 10.10, just in case I had mangled it installing different testing packages going through bugs on launchpad. &amp;nbsp; Having done the install and updating all packages using update manager, the touch screen is working perfectly - pressing the screen is the same as moving the mouse to the location and left click - Success!!!! (I hope!) &amp;nbsp;- Ok, I'll give it a couple of days to make sure it doesn't beak before I say success.&lt;br /&gt;&lt;br /&gt;&lt;s&gt;Unfortunately there are problems with it. &amp;nbsp; It seems that once you have done a 'drag' using the touch screen, x-windows thinks the mouse button is still pressed - moving the real mouse changes the shape of the drag region, and worse still, the real mouse button stops working. &amp;nbsp; Sometimes the keyboard stops working too (both mouse and keyboard are wireless, using a USB receiver)&lt;/s&gt;&lt;br /&gt;&lt;s&gt;&lt;br /&gt;&lt;/s&gt;&lt;br /&gt;&lt;s&gt;Investigations so far:&lt;/s&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;s&gt;sudo apt-get install input-utils&lt;/s&gt;&lt;/blockquote&gt;&lt;s&gt;provides a program called 'lsinput'. &amp;nbsp;Doing&lt;/s&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;s&gt;sudo lsinput&lt;/s&gt;&lt;/blockquote&gt;&lt;s&gt;lists the touch screen as:&lt;/s&gt;&lt;br /&gt;&lt;s&gt;&lt;br /&gt;&lt;/s&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;s&gt;/dev/input/event6&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; bustype : BUS_USB&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; vendor &amp;nbsp;: 0x408&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; product : 0x3001&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; version : 272&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; name &amp;nbsp; &amp;nbsp;: "PixArt Imaging Inc. Optical Touc"&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; phys &amp;nbsp; &amp;nbsp;: "usb-0000:00:1a.2-1/input0"&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; uniq &amp;nbsp; &amp;nbsp;: ""&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;&amp;nbsp;&amp;nbsp; bits ev : EV_SYN EV_KEY EV_ABS EV_MSC&lt;/s&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;s&gt;Installing multi-touch utilities by doing:&lt;/s&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;s&gt;sudo apt-get install utouch libutouch-grail-dev utouch-grail-tools&lt;/s&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;s&gt;sudo apt-get install mtdev-tools&lt;/s&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;s&gt;bzr branch lp:~utouch-team/utouch/mtview&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;cd mtview&lt;/s&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;s&gt;make&lt;/s&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;s&gt;Provides amongst other things a utility called mtview. &amp;nbsp;Running that lets you draw pretty patterns on the screen using multi touch - it certainly seems capable of detecting and tracking two fingers at once.&lt;/s&gt;&lt;/div&gt;&lt;div&gt;&lt;s&gt;Given this I think the touch screen is basically working, and it is the interface to x-windows that is the problem.&lt;/s&gt;&lt;/div&gt;&lt;div&gt;&lt;s&gt;I'll have to work out how x-windows drivers work to fix this though....&lt;/s&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I will update this section as I investigate further.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Web Cam&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Not tested.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1715390763647193509?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1715390763647193509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1715390763647193509' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1715390763647193509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1715390763647193509'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/ubuntu-linux-on-packard-bell-onetwo.html' title='Ubuntu Linux on a Packard Bell OneTwo'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6182977053808943969</id><published>2010-12-27T15:50:00.002Z</published><updated>2011-01-01T20:43:33.453Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='grub'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='OneTwo'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Trouble with Ubuntu and Windows 7 dual boot</title><content type='html'>I just had a surprising problem with our new Packard Bell OneTwo.&amp;nbsp;&amp;nbsp; While it had apparently worked fine after installing Ubuntu on a spare partition in the hard drive, I booted it under its original Windows 7 operating system this morning to test &lt;a href="http://code.google.com/p/benjap"&gt;benjamin's program&lt;/a&gt; with windows.&lt;br /&gt;It worked fine, but after it had been switched off it absolutely refused to boot - no error messages or anything.&lt;br /&gt;Went into the bios settings to take off quite boot and quick boot, but still no errors.&lt;br /&gt;It booted off the Ubuntu live CD ok, and I could mount the linux root partition.&lt;br /&gt;&lt;br /&gt;My best guess was that the boot loader was mangled, so I re-installed grub by doing:&lt;br /&gt;&lt;blockquote&gt;sudo mount /dev/sda6 /mnt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [sda6 is my root partition]&lt;/blockquote&gt;&lt;blockquote&gt;grub-install --root-directory=/mnt /dev/sda&lt;/blockquote&gt;&amp;nbsp;This worked ok with no errors, and re-booting the machine gave the familiar grub boot menu. &amp;nbsp; Ubuntu booted ok...we'll see if it works after I use Windows next time - I suspect it was Windows that killed the boot loader!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6182977053808943969?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6182977053808943969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6182977053808943969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6182977053808943969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6182977053808943969'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/trouble-with-ubuntu-and-windows-7-dual.html' title='Trouble with Ubuntu and Windows 7 dual boot'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5501983181949878614</id><published>2010-12-26T22:01:00.001Z</published><updated>2010-12-26T22:02:21.732Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='framebuffer'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Framebuffer on Ubuntu</title><content type='html'>I would like to be able to run my&lt;a href="http://code.google.com/p/benjap"&gt; benjap&lt;/a&gt; application in a simple framebuffer rather than using X windows.&lt;br /&gt;Unfortunately the 'out of the box' ubuntu desktop does not have a framebuffer (/dev/fb0) installed by default.&lt;br /&gt;It looks like you need to load the fbcon and vesafb modules (found &lt;a href="http://superuser.com/questions/143898/framebuffer-not-available-how-to-install-the-device-dev-fb-0-on-ubuntu"&gt;here&lt;/a&gt;):&lt;br /&gt;&lt;blockquote&gt;sudo modprobe fbcon vesafb&lt;/blockquote&gt;Having done this /dev/fb0 appears. &amp;nbsp; It appears to work as long as you run applications as root (a job for later to fix that!), but I have a problem with sound, which is that even running as root I get a "no available audio device" error when pygame.mixer.init() runs. &amp;nbsp;Not sure how to fix this.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5501983181949878614?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5501983181949878614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5501983181949878614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5501983181949878614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5501983181949878614'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/framebuffer-on-ubuntu.html' title='Framebuffer on Ubuntu'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2986994569490714128</id><published>2010-12-26T21:27:00.000Z</published><updated>2010-12-26T21:27:29.990Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pygame'/><category scheme='http://www.blogger.com/atom/ns#' term='Learning Difficulties'/><category scheme='http://www.blogger.com/atom/ns#' term='Autism'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Autistic'/><title type='text'>Benjap - A program for children with Autism or Learning Difficulties</title><content type='html'>I have decided to write a program for our autistic son (who also has severe learning difficulties) with my daughter, Laura.&lt;br /&gt;We have bought a Packard Bell OneTwo all-in-one PC with a touch screen to use for it.&lt;br /&gt;This is because Benjamin will not use a keyboard or mouse, but I hope that the cause and effect will be more obvious using a touch screen.&lt;br /&gt;&lt;br /&gt;The basic program is written in Python using the pygame library. &amp;nbsp; The structure is of a main application with big icons to select the other applications. &lt;br /&gt;The various applications are (or will be):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Stars (a bit like the start of star-trek) you can change the origin of the stars that shoot towards the edge of the screen by pressing the touch screen.&lt;/li&gt;&lt;li&gt;Bounce: &amp;nbsp;Lots of bright coloured balls bouncing off each other and the edge of the screen (not very interactive at the moment!).&lt;/li&gt;&lt;li&gt;Comet: &amp;nbsp;Dragging your finger around the screen leaves a multi-coloured trail like a comet.&lt;/li&gt;&lt;li&gt;Fireworks: &amp;nbsp;Pressing the screen launches a firework that explodes colourfully.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I have started a new project page for the application at &lt;a href="http://code.google.com/p/benjap"&gt;http://code.google.com/p/benjap&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More to follow....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2986994569490714128?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://code.google.com/p/benjap' title='Benjap - A program for children with Autism or Learning Difficulties'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2986994569490714128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2986994569490714128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2986994569490714128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2986994569490714128'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/benjap-program-for-children-with-autism.html' title='Benjap - A program for children with Autism or Learning Difficulties'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7285170788445712915</id><published>2010-12-22T16:25:00.003Z</published><updated>2011-01-01T22:49:28.520Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Packard Bell'/><category scheme='http://www.blogger.com/atom/ns#' term='OneTwo'/><category scheme='http://www.blogger.com/atom/ns#' term='Learning Difficulties'/><category scheme='http://www.blogger.com/atom/ns#' term='Autism'/><category scheme='http://www.blogger.com/atom/ns#' term='Autistic'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Packard Bell OneTwo with Linux</title><content type='html'>&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;Our son, Benjamin is autistic and has severe learning disabilities. Persuading him to do anything other than his current 'favourite' activity is really difficult. We took him to a light room today and I was impressed that he showed signs of interacting with a white square which lit up where you touched it. Laura and I started to think about making him one. It looks quite difficult because as well as the hardware to mount all of the lights we will need a touch sensitive panel and produce some software to drive it. For this reason I started to think about going for a purely software solution instead - just use a simple computer and a touch sensitive monitor.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;I have contacted a couple of suppliers to see what they can do, but the first quote for a whole panel PC (which would be neat - no wires!) was very expensive £1620 for a 32" one.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;An alternative would be to go for something smaller - HP and Acer make 23" all-in-one touch screen PCs for &amp;lt;£800k, which is still quite a lot, but getting better.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;PC World and Currys are selling a&amp;nbsp;&lt;a href="http://www.currys.co.uk/gbuk/packard-bell-viseo-200t-touch-edition-20-widescreen-lcd-monitor-03714119-pdt.html" rel="nofollow" style="color: #0000cc;"&gt;20" touch sensitive monitor&lt;/a&gt;&amp;nbsp;for £180 which is more like the price I was thinking of, but I will need to add a computer, which will mean wires. I do have a little netbook which I don't use anymore, which could do the job though, so I may try this and just invest in a bigger one if he seems interested.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;When I went to PC World today they did not have any of the monitors, but they did have a Packard Bell OneTwo all in one PC with touch sensitive screen. &amp;nbsp;This was £599 so I decided to give it a go, because at least it meant no wires.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;I downloaded Ubuntu 10.10 onto a USB memory stick and installed it in the spare 'Data' partition on the drive (I actually deleted the data partition and re-created a 10GB swap partition and the rest as a ext4 filesystem to use for the ubuntu filesystem. &amp;nbsp; The install went ok, and grub appears to give me the option of booting windows (I haven't tried yet).&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;The most noticeable thing was that the screen resolution was not very good, and it was not using the widescreen aspect ratio. &amp;nbsp; I fixed this by going to the monitor settings in the ubuntu system menu and un-clicking the 'mirror' option - it seemed to think it has two monitors, one of which is low resolution. &amp;nbsp;Once I had de-selected that option I could select the resolution of the main monitor (called 'laptop' in this case). &amp;nbsp; Now that is done it looks better, and the touch screen appears to be working.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For more information on my experiences using Linux on the Packard Bell OneTwo, see &lt;a href="http://nerdytoad.blogspot.com/search/label/OneTwo"&gt;my other blog entries&lt;/a&gt;, in particular&amp;nbsp;&lt;a href="http://nerdytoad.blogspot.com/2010/12/ubuntu-linux-on-packard-bell-onetwo.html"&gt;http://nerdytoad.blogspot.com/2010/12/ubuntu-linux-on-packard-bell-onetwo.html&lt;/a&gt;.&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;My daughter Laura and I are working on the applications for Benjamin to use - I am doing the code and she is on graphics at the moment.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;The application is at an early stage, but the outline can be downloaded using&lt;/div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"&gt;svn co&amp;nbsp;https://ntmisc.googlecode.com/svn/benApp&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;There will be more about this application as we work on it and try to get Benjamin interested in it.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; max-width: 65em;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7285170788445712915?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7285170788445712915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7285170788445712915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7285170788445712915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7285170788445712915'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/packard-bell-onetwo-with-linux.html' title='Packard Bell OneTwo with Linux'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1594506766432920601</id><published>2010-12-12T14:01:00.001Z</published><updated>2010-12-31T12:17:40.614Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>SVN Keywords</title><content type='html'>I just realised that my townguide files are no longer automatically updating their SVN keywords to record the revision number of the files.&lt;br /&gt;It turns out that this is because the keyword properties in svn is set by the client, not the repository, and worse still you can not apply keyword properties to directories - you have to do each file individually.&lt;br /&gt;I got around this by using the find command to add keywords to all of the python files by doing:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;find . -name \*.py -exec svn propset svn:keywords "LastChangedDate Rev Author" '{}' \;&amp;nbsp;&lt;/blockquote&gt;&lt;div&gt;Of course for files that do not have keywords set you have to edit them to add $Rev$ etc. into the comments.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1594506766432920601?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1594506766432920601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1594506766432920601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1594506766432920601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1594506766432920601'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/svn-keywords.html' title='SVN Keywords'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8072915573366606046</id><published>2010-12-12T09:13:00.000Z</published><updated>2010-12-12T09:13:45.857Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='TownGuide'/><title type='text'>Townguide - progress at last!</title><content type='html'>You can't beat some really bad weather to help make progress with my nerdy jobs.&lt;br /&gt;I have got Waldemar's django front end to townguide working (http://dtownguide.webhop.net), and have managed to make a few changes, including adding fancy tab things to the main map selection form.&lt;br /&gt;There are still a few things to sort out:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The area selection on the map does not align properly with the mouse pointer - not sure why - must be something to do with OpenLayers projections...&lt;/li&gt;&lt;li&gt;Mapnik re-sizes the output map to match the bounding box, so townguide needs to check the actual map size to make sure the grid squares are right.&lt;/li&gt;&lt;li&gt;There is something funny about the output resolution - need to see what it is using - the output looks much higher resolution than I asked for, so I suspect there is a sum wrong somewhere!&lt;/li&gt;&lt;li&gt;Add the GPX track and waypoint plugins (they are just templates at the moment).&lt;/li&gt;&lt;li&gt;Add an option to suppress un-named ways - the 'None' in the street index can confuse people.&lt;/li&gt;&lt;li&gt;Reinstate other output formats - only 'poster' is working.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8072915573366606046?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8072915573366606046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8072915573366606046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8072915573366606046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8072915573366606046'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/12/townguide-progress-at-last.html' title='Townguide - progress at last!'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-590831936221274298</id><published>2010-11-27T17:03:00.000Z</published><updated>2010-11-27T17:03:07.049Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='TownGuide'/><title type='text'>Townguide - where next?</title><content type='html'>My &lt;a href="http://townguide.webhop.net/"&gt;townguid&lt;/a&gt;e map rendering application is about a year old now, but hasn't changed much since last winter.&lt;br /&gt;Waldemar did a lot of work on it for his &lt;a href="http://wiki.openstreetmap.org/wiki/OpenPaperMaps"&gt;Google Summer of Code project&lt;/a&gt;&amp;nbsp;where he re-hashed the townguide renderer code to make it more modular and produced a &lt;a href="http://dtownguide.webhop.net/"&gt;django based web front end&lt;/a&gt;.&lt;br /&gt;I have not done very well getting this working because I do not understand django well enough to sort out a few minor bugs in it.&lt;br /&gt;Instead I have taken his re-hashed renderer code and developed it further to make it even more modular - as well as 'plugins' for different PDF output formats, there are plugins for the base map and for different map overlays (a grid, custom markers, gpx tracks etc.) [well nearly anyway]. &amp;nbsp;It also uses mapnik2 so can now produce nice high resolution output to make it comparable to the much prettier &lt;a href="http://www.maposmatic.org/"&gt;maposmatic&lt;/a&gt; output.&lt;br /&gt;&lt;br /&gt;I have been reading a book about django for a few days now (&lt;a href="http://www.amazon.co.uk/Python-Web-Development-with-Django/dp/B001ANYCGO/ref=sr_1_1?ie=UTF8&amp;amp;qid=1290877262&amp;amp;sr=8-1"&gt;Python Web Development with Django&lt;/a&gt; by Forcier, Bissex and Chun) and feel that I should be able to understand both Waldemar's code and the maposmatic version, so I will have a go at the web front end now - there seems little point in developing my clanky php version with these two much slicker front ends available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-590831936221274298?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://townguide.webhop.net' title='Townguide - where next?'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/590831936221274298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=590831936221274298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/590831936221274298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/590831936221274298'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/11/townguide-where-next.html' title='Townguide - where next?'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2797435738335603733</id><published>2010-10-24T08:39:00.000+01:00</published><updated>2010-10-24T08:39:23.001+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='X60s'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>IBM ThinkPad X60S Middle Mouse Button</title><content type='html'>Every time a new release of Ubuntu linux comes out, something breaks. &amp;nbsp; Fortunately over time the somethings are becoming less and less significant!&lt;br /&gt;This time it was the middle mouse button on my IBM ThinkPad X60S. &amp;nbsp; &amp;nbsp;I had got it working following the instructions &lt;a href="http://askubuntu.com/questions/2557/thinkpad-middle-button-scrolling"&gt;here&lt;/a&gt; in version 10.04 - it just needed a configuration file in /usr/lib/X11/xorg.conf.d.&lt;br /&gt;But it stopped working following the upgrade to Ubuntu 10.10.&lt;br /&gt;It turns out that the xorg.conf.d location has changed to /usr/share/X11/xorg.conf.d.&lt;br /&gt;Putting a file named 20-thinkpad.conf in that directory with the following contents got middle button scrolling working nicely again!&lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;Section "InputClass"&lt;/blockquote&gt;&lt;blockquote&gt;Identifier&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"Trackpoint Wheel Emulation"&lt;/blockquote&gt;&lt;blockquote&gt;MatchProduct&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;TouchPad / TrackPoint"&lt;/blockquote&gt;&lt;blockquote&gt;MatchDevicePath&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"/dev/input/event*"&lt;/blockquote&gt;&lt;blockquote&gt;Option&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "EmulateWheel"&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "true"&lt;/blockquote&gt;&lt;blockquote&gt;Option&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "EmulateWheelButton"&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"2"&lt;/blockquote&gt;&lt;blockquote&gt;Option&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "Emulate3Buttons"&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"false"&lt;/blockquote&gt;&lt;blockquote&gt;Option&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "XAxisMapping"&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "6 7"&lt;/blockquote&gt;&lt;blockquote&gt;Option&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "YAxisMapping"&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; "4 5"&lt;/blockquote&gt;&lt;blockquote&gt;EndSection&lt;/blockquote&gt;&lt;/blockquote&gt;&amp;nbsp;There is talk that it should work by doing:&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Ubuntu Beta', UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 17px;"&gt;sudo apt-get install gpointing-device-settings&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;But it did not work for me (at least not just like that - tried re-starting xwindows, but still no scrolling - maybe there is some configuration needed, but I like the old way of dropping a file into a configuration directory!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2797435738335603733?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2797435738335603733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2797435738335603733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2797435738335603733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2797435738335603733'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/10/ibm-thinkpad-x60s-middle-mouse-button.html' title='IBM ThinkPad X60S Middle Mouse Button'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1048264713047285232</id><published>2010-10-03T19:10:00.002+01:00</published><updated>2010-10-03T19:18:48.580+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='postgis'/><category scheme='http://www.blogger.com/atom/ns#' term='OrdnanceSurvey'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><title type='text'>OS Vector Map District with PostGIS - Take 3</title><content type='html'>To recap:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The entire UK's VectorMapDistrict dataset has been loaded into my postgresql/postgis database using my vmd2pgsql script, which is based around shp2pgsql.&lt;/li&gt;&lt;li&gt;I created some stylesheets for mapnik rendering of the data based on the &lt;a href="http://trac.mapnik.org/wiki/XMLGettingStarted"&gt;mapnik tutorial&lt;/a&gt;, but they came out with a transparent background and black lines and text, which is not what I wanted.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;The rendering problem turned out to be quite easy - it is just that the mapnik tutorial is based on Mapnik 0.7, not mapnik2. &amp;nbsp;To make it work with mapnik2 you need to:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Replace the bgcolor parameter of the map element with background-color.&lt;/li&gt;&lt;li&gt;Remove all of the CSSParameter business in the style definitions with simple name="xyz" constructs.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;It is a shame that mapnik did not complain about these issues, even in debug mode, but never mind!&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Adding the different linear features works ok - you see something of an improvement from the black and white version to something resembling a map:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s1600/image.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s200/image.png" width="200" /&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; color: black;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_iSw2e7ym1cU/TKjDqb34V2I/AAAAAAAAAFs/jX2CzG6lyS4/s1600/image.png" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_iSw2e7ym1cU/TKjDqb34V2I/AAAAAAAAAFs/jX2CzG6lyS4/s200/image.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;So now all I need to do is add the areas (water, woodland towns etc.) to make it look extra pretty, and sort out what to plot at different zoom levels so it is reasonable.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Here I hit a problem. &amp;nbsp; When I tried to add the settlement_area or naturalfeature_area items, mapnik crashed with an "invalid geometry" error, after taking quite a long time thinking about it! &amp;nbsp; It is something to do with polygons not being closed properly. &amp;nbsp; I suspect it is rounding errors, but am not too sure. &amp;nbsp;One possibility is that I should have used the shp2pgsql option to just use integers, which would have avoided rounding, or I could try to fix the database. &amp;nbsp;As it took 9 hours to import, and I don't know if integers will work, I'll try to fix it.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;With much internet searching I discovered that you can check the validity of each geometric feature with the postgis st_isvalid() function. &amp;nbsp;Running a simple select statement on the database like:&lt;/div&gt;&lt;blockquote&gt;select gid from naturalfeature_area where not st_isvalid(the_geom);&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;takes a long time (about an hour I think) and gives me a list of invalid geometries, after pages and pages of warnings about things crossing over themselves.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;It seems that one trick that people use to force gemetries to be valid is to use the st_buffer() command with the buffer radius set to zero. &amp;nbsp; I checked it worked by doing:&lt;/div&gt;&lt;blockquote&gt;select st_isvalid(st_buffer(the_geom,0.0)) from naturalfeature_area where gid=2342149;&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;(2342149 was the first entry in my list of invalid geometries) - Success - it returns 't' for true meaning the st_buffer trick fixes it.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now to update the database. &amp;nbsp;To correct the error I had to do:&lt;/div&gt;&lt;blockquote&gt;update naturalfeature_area set the_geom=st_multi(st_buffer(the_geom,0.0)) where gid=2342149;&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Note that I do not really know what the st_multi thing does, but I got errors about geometry constraint violations without it - I think that st_buffer returns the simplest type of geometry it can, and st_multi forces it to be a multipolygon, but I could be wrong!.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now all I need to do is remember enough about subqueries to write a bit of SQL that does the correction for every invalid geometry - back to that well known search engine....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Well, I have set it going using the following to try to repair the geometries:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;blockquote&gt;update naturalfeature_area set the_geom=st_multi(st_buffer(the_geom,0.0)) where gid in (select gid from naturalfeature_area where not st_isvalid(the_geom));&lt;/blockquote&gt;&lt;div&gt;I think I'll leave it for a few hours....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1048264713047285232?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1048264713047285232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1048264713047285232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1048264713047285232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1048264713047285232'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/10/os-vector-map-district-with-postgis.html' title='OS Vector Map District with PostGIS - Take 3'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s72-c/image.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6355523221031261548</id><published>2010-10-03T09:11:00.000+01:00</published><updated>2010-10-03T09:11:06.778+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='X60s'/><category scheme='http://www.blogger.com/atom/ns#' term='battery'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ThinkPad X60s Battery Trouble</title><content type='html'>I recently bought myself a second hand IBM Thinkpad X60s because I wanted a small laptop to use on the train, which has enough power to run postgresql/mapnik etc. so I can play with maps while I am living out of hotels (better on the body than too much food and beer, but not as pleasant!).&lt;br /&gt;The problem I have is that at every charge cycle the gnome power manager in Ubuntu reports that the battery is less charged than before, and then it shuts down very quickly when running off battery because it thinks it is discharged.&lt;br /&gt;I tried running it to completely empty by letting it suspend on low battery, then waiting for the battery to really die. &amp;nbsp;The next charge was higher than before, but the same problem has repeated.&lt;br /&gt;I just used gconf-editor to set the action on low battery to 'nothing' so that it will run until the battery is properly dead. &amp;nbsp; The charge history is shown below:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_iSw2e7ym1cU/TKg3mvCpsoI/AAAAAAAAAFo/6ZeGHmxYvrQ/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/_iSw2e7ym1cU/TKg3mvCpsoI/AAAAAAAAAFo/6ZeGHmxYvrQ/s320/Screenshot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Basically Ubuntu thinks the battery was dead nearly an hour ago, but it is still running!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I think this must be a problem with ACPI, but don't know how to sort it - a job for a very rainy afternoon. &amp;nbsp; For now I will just leave the auto-suspend switched off and try to guess when the battery is about to give up.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6355523221031261548?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6355523221031261548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6355523221031261548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6355523221031261548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6355523221031261548'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/10/thinkpad-x60s-battery-trouble.html' title='ThinkPad X60s Battery Trouble'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_iSw2e7ym1cU/TKg3mvCpsoI/AAAAAAAAAFo/6ZeGHmxYvrQ/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1727606452527594314</id><published>2010-10-02T22:43:00.002+01:00</published><updated>2011-02-22T20:47:22.405Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OrdnanceSurvey'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='VectorMapDistrict'/><title type='text'>Using VectorMapDistrict with PostGIS</title><content type='html'>Well, vmd2pgsql took about 9 hours to import the entire UK into my postgresql database...No too bad.&lt;br /&gt;Now I need to do something with it, because the mapnik stylesheets that I set up to use the shapefiles will not work - need to change it to use the postgresql database instead.&lt;br /&gt;The things that need changing are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Add the layers and datasources in XML (no need to do it in python now I don't have hundreds of separate datasources).&lt;/li&gt;&lt;li&gt;Convert the styles to use lowercase letters for the fields ('featcode' rather than 'FEATCODE') - postgresql seems to be case sensitive, and they have gone into the database lower case, but were upper case in the shapefiles.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Sounds easy, &amp;nbsp;but I decided I don't want it to look like the OSM stylesheet, which is a bit garbled - I want a nice structure to make it easy to maintain. &amp;nbsp;I could have used XML entities, but that seems a bit crude - define an entity, then 'use' it to actually 'call' it. &amp;nbsp; Includes seem much more suitable....But to get includes working I need mapnik2. &amp;nbsp;I have put a basic structure at code.google.com/p/ntmisc/vmdmap, but still have a few issues:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;I have had to define the database parameters manually because entities do not seem to be working in the include files, which is no good!&lt;/li&gt;&lt;li&gt;The output is transparent background with black lines (see picture below), which is not what I asked for - not sure if this is a problem with the style file, or my build of mpanik2 - I'll have to run some tests on mapnik2 to make sure it works right.&lt;/li&gt;&lt;li&gt;But it's too late to fix it now - job for tomorrow!&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s1600/image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s1600/image.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1727606452527594314?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1727606452527594314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1727606452527594314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1727606452527594314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1727606452527594314'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/10/using-vectormapdistrict-with-postgis.html' title='Using VectorMapDistrict with PostGIS'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_iSw2e7ym1cU/TKen1hTKTvI/AAAAAAAAAFk/M4-D0kyHxr8/s72-c/image.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5377938227874041308</id><published>2010-10-01T22:06:00.001+01:00</published><updated>2011-02-22T20:47:53.934Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS OpenData'/><category scheme='http://www.blogger.com/atom/ns#' term='OrdnanceSurvey'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='VectorMapDistrict'/><title type='text'>More Rendering of VectorMapDistrict Data</title><content type='html'>The nice people from Ordnance Survey have sent me a complete set of VectorMapDistrict data (which is on 6 DVDs!). &amp;nbsp; Surprisingly they didn't even charge me for the DVDs or postage.&lt;br /&gt;Now I have all that data I thought I'd better do something with it!&lt;br /&gt;&lt;br /&gt;First step was to get it onto a nice fast disk, so I copied it onto the hard disk of my server...which took a while...&lt;br /&gt;&lt;br /&gt;Then I tried to use my vmdmap.py program to render it all, but mapnik bombed out with an error as it was adding the various shapefile layers. &amp;nbsp;I suspect that this is because every single shapefile is in its own layer, as it is a completely separate datasource, and I think I either ran out of memory or hit some mapnik internal limit. &amp;nbsp; This means I can't use vmdmap.py to render the whole country, which is a bit of a shame.&lt;br /&gt;&lt;br /&gt;To get around this I think I need to merge them into a single datasource. &amp;nbsp;I don't know enough about manipulating shapefiles to do this, so instead am making use of shp2pgsql which allows you to import a shapefile into a postgresql database. &amp;nbsp; I have written another program, based on vmdmap.py called vmd2pgsql which will scan through a directory tree looking for the various shapefiles in the vectormap district dataset, and importing them into postgresql. &amp;nbsp; This gives a much lower number of tables - just one per shapefile name, but each one will have a lot of data.&lt;br /&gt;&lt;br /&gt;It is importing now, so will see how long the import takes, then how well it renders. &amp;nbsp;I suppose it should render ok because I have the whole UK OSM dataset in a single database and that works, but we'll see over the weekend if it ever finishes! &amp;nbsp;The code is at my &lt;a href="http://code.google.com/p/ntmisc/source/browse/#svn/vmdmap"&gt;google code site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5377938227874041308?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5377938227874041308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5377938227874041308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5377938227874041308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5377938227874041308'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/10/more-rendering-of-vectormapdistrict.html' title='More Rendering of VectorMapDistrict Data'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-990726938551074066</id><published>2010-09-03T22:15:00.003+01:00</published><updated>2011-02-22T20:46:51.145Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OrdnanceSurvey'/><category scheme='http://www.blogger.com/atom/ns#' term='mapnik'/><category scheme='http://www.blogger.com/atom/ns#' term='VectorMapDistrict'/><title type='text'>Mapnik and OS_OpenData</title><content type='html'>I decided to compare the quality of &lt;a href="http://www.openstreetmap.org/"&gt;OpenStreetMap&lt;/a&gt; mapping to that which has been released by &lt;a href="http://www.ordnancesurvey.co.uk/oswebsite/opendata/"&gt;Ordnance Survey OpenData&lt;/a&gt;. &amp;nbsp; &lt;br /&gt;I started with VectorMapDistrict, which is a dataset provided as ESRI Shapefiles. &amp;nbsp; It is provided as a large number of shapefiles, so setting up a mapnik stylesheet manually would have been a pain. &amp;nbsp;Instead I separated the styles into an XML file, but added the layers using a python program which scans down the directory tree to add the various shapefiles to the map. &amp;nbsp;The python code is &lt;a href="http://code.google.com/p/ntmisc/source/browse/vmdmap/vmdmap.py"&gt;vmdmap.py&lt;/a&gt; and the stylesheet is &lt;a href="http://code.google.com/p/ntmisc/source/browse/vmdmap/styles.xml"&gt;styles.xml&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Then I tried Meridian2. &amp;nbsp;This is much simpler - just one shapefile for each sort of feature (A-Road, river etc.). &amp;nbsp;I kept the same structure with the styles defined in an XML file, and the layers in python, but it could have all been done in a single XML file this time. &amp;nbsp;The python code is&amp;nbsp;&lt;a href="http://code.google.com/p/ntmisc/source/browse/vmdmap/md2map.py"&gt;md2map.py&lt;/a&gt;&amp;nbsp;and the stylesheet is&amp;nbsp;&lt;a href="http://code.google.com/p/ntmisc/source/browse/vmdmap/styles_md2.xml"&gt;styles_md2.xml&lt;/a&gt;.&lt;span id="goog_2022958838"&gt;&lt;/span&gt;&lt;span id="goog_2022958839"&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can see the results below.&lt;br /&gt;&lt;br /&gt;The most notable things are that Meridian2 is much simpler geometry, but it includes more road names than Vector Map District. &amp;nbsp;The OpenStreetMap rendering is fancier because I used the standard OSM style, rather than the home made ones I used for the OS Data. &amp;nbsp; I do like the rocks that appear in the VectorMap District rendering though - I will have to import it into OSM!.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_iSw2e7ym1cU/TIFkjJ4eweI/AAAAAAAAAE0/40Z4m7oUa6A/s1600/image_vmd_sm.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_iSw2e7ym1cU/TIFkjJ4eweI/AAAAAAAAAE0/40Z4m7oUa6A/s200/image_vmd_sm.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;VectorMapDistrict&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_iSw2e7ym1cU/TIFkmT8qF_I/AAAAAAAAAE8/rhBg-h01PzI/s1600/image_md2_sm.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_iSw2e7ym1cU/TIFkmT8qF_I/AAAAAAAAAE8/rhBg-h01PzI/s200/image_md2_sm.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Meridian2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_iSw2e7ym1cU/TIFko3ygksI/AAAAAAAAAFE/x9xgalAKJxo/s1600/image_osm_sm.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_iSw2e7ym1cU/TIFko3ygksI/AAAAAAAAAFE/x9xgalAKJxo/s200/image_osm_sm.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;OpenStreetMap&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-990726938551074066?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/990726938551074066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=990726938551074066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/990726938551074066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/990726938551074066'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/09/mapnik-and-osopendata.html' title='Mapnik and OS_OpenData'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_iSw2e7ym1cU/TIFkjJ4eweI/AAAAAAAAAE0/40Z4m7oUa6A/s72-c/image_vmd_sm.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5743211953040885834</id><published>2010-08-08T22:20:00.000+01:00</published><updated>2010-08-08T22:20:07.156+01:00</updated><title type='text'>Mapping - OSM and Mapnik</title><content type='html'>I have been playing with &lt;a href="http://www.mapnik.org/"&gt;mapnik&lt;/a&gt; quite a bit lately - I decided I needed to learn how to use it better to improve my &lt;a href="http://code.google.com/p/townguide"&gt;townguide&lt;/a&gt; program.&lt;br /&gt;I have been very impressed with &lt;a href="http://osm.lonvia.de/world_hiking.html"&gt;Lonvia's Hiking Map&lt;/a&gt;, which is an overlay showing hiking routes on top of a standard &lt;a href="http://www.openstreetmap.org/"&gt;OpenStreetMap&lt;/a&gt; map, and thought I could do something similar.&lt;br /&gt;&lt;br /&gt;My first effort was a map showing the locations of supermarkets (handy when we go on holiday so we know where to go to stock up on provisions) - It can be seen &lt;a href="http://www.maps.webhop.net/supermarkets"&gt;here&lt;/a&gt;.&lt;br /&gt;Someone has imported a lot of powerline data from Ordnance Survey into my local area, so I tried a &lt;a href="http://www.maps.webhop.net/power"&gt;Power Station Map&lt;/a&gt;. &amp;nbsp;These maps all have an 'about' link showing how they work.&lt;br /&gt;&lt;br /&gt;I have produced a similar one to show the use of Ordnance Survey &lt;a href="http://www.ordnancesurvey.co.uk/opendata"&gt;OpenData&lt;/a&gt; in the OpenStreetMap map of the UK, which can be seen &lt;a href="http://www.maps.webhop.net/osm_opendata"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;More recently I have wanted to produce maps that include contours, and also allow me to plot GPX traces to show where we have been. &amp;nbsp; To do this I have imported the SRTM data for the UK into my postgresql database using the technique described &lt;a href="http://wiki.openstreetmap.org/wiki/Contours#The_PostGIS_approach"&gt;here&lt;/a&gt;. &amp;nbsp; This allows me to render an Openstreetmap map with contours, which is useful for the countryside.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://farm5.static.flickr.com/4093/4872269997_120689b0e9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://farm5.static.flickr.com/4093/4872269997_120689b0e9.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Adding a GPX trace over the top was a bit difficult - I wanted to do it in python to save hard coding the path to the GPX file in the mapnik style file, but I haven't managed to do that - I ended up adding a GPX layer to my mapnik style file using the mapnik ogr plugin. &amp;nbsp; The result can be seen &lt;a href="http://www.blogger.com/%3Ca%20href=%22http://www.flickr.com/photos/jones139/4872269997/%22%20title=%22Map%20of%20Day%201%20by%20jones139,%20on%20Flickr%22%3E%3Cimg%20src=%22http://farm5.static.flickr.com/4093/4872269997_120689b0e9.jpg%22%20width=%22500%22%20height=%22500%22%20alt=%22Map%20of%20Day%201%22%20/%3E%3C/a%3E"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5743211953040885834?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5743211953040885834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5743211953040885834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5743211953040885834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5743211953040885834'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/08/mapping-osm-and-mapnik.html' title='Mapping - OSM and Mapnik'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4093/4872269997_120689b0e9_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2134842068853037098</id><published>2010-04-25T08:17:00.000+01:00</published><updated>2010-04-25T08:17:53.036+01:00</updated><title type='text'>The Irritating thing about Android</title><content type='html'>I have recently got an Android phone so that I can write software for it without the irritating security issues you get with J2ME on 'normal' phones (boxes popping up saying 'do you want to let this program do this?' etc.).&lt;br /&gt;&lt;br /&gt;I was very surprised that some things that most phones do 'out of the box' are a real pain in Android, that makes me think this is still a platform for gadget enthusiasts rather than end users.&lt;br /&gt;&lt;br /&gt;These include:&lt;br /&gt;&lt;br /&gt;  * Sharing Contacts:  All of the phones I have seen with bluetooth let you send contacts from one phone to another over bluetooth.   Not Android - I ended up adding my contacts from my old phone to Google Mail manually.  This made them appear on the Android one.&lt;br /&gt;  * Using the phone as a modem:  My Sony Ericsson W890i just works - plug the phone into a computer and it appears as an ethernet card - dead easy (I think I had to select this as an option in the phone menu, but it was just a simple menu action.   The nearest thing I have got with Android is a program called 'Proxoid' to run on the phone.  You then have to use the ADB program that comes with the Android Developers SDK to forward packets to the phone, and set up your browser to use a proxy.   A long way from an end user experience.  I'll do a separate post on this so I can remember how to do it next time I am stranded in Spain and my T-Mobile broadband dongle won't work!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2134842068853037098?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2134842068853037098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2134842068853037098' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2134842068853037098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2134842068853037098'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/04/irritating-thing-about-android.html' title='The Irritating thing about Android'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-868701626640140643</id><published>2010-04-03T21:34:00.000+01:00</published><updated>2010-04-03T21:34:32.685+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OrdnanceSurvey'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><title type='text'>Reprojecting Ordnance Survey Raster Data</title><content type='html'>I have been looking at the Ordnance Survey StreetView data that was released to the public on 1st April.&lt;br /&gt;This has got me thinking about a previous project that I failed to make work - I have some old maps of my home town and wanted to be able to display them on the web and switch between them so you can see what changes from year to year - I have maps from 1870 and 1914. &amp;nbsp;I want to use OpenStreetMap as the recent data. &amp;nbsp;Now StreetView is available I can use that too for comparison.&lt;br /&gt;&lt;br /&gt;The problem is projecting them onto the same coordinate system - I failed miserably last time, but my two scanned old maps were on the same scale, so you can see them at (&lt;a href="http://maps.webhop.net/oldmaps/openlayers.html"&gt;http://maps.webhop.net/oldmaps/openlayers.html&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The maps are in Ordnance Survey projection, which has the code EPSG:27700. &amp;nbsp; The downloaded OS data has the origin specified in metres northings and eastings.&lt;br /&gt;You can translate this into the same projection as OpenStreetMap (EPSG:900113) using:&lt;br /&gt;&lt;blockquote&gt;gdalwarp -s_srs EPSG:27700 -t_srs EPSG:900913 *.TIF nz.tif&lt;/blockquote&gt;Check the projection information with&lt;br /&gt;&lt;blockquote&gt;gdalinfo nz.tif | more&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-868701626640140643?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/868701626640140643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=868701626640140643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/868701626640140643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/868701626640140643'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/04/reprojecting-ordnance-survey-raster.html' title='Reprojecting Ordnance Survey Raster Data'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4382955569654225988</id><published>2010-04-01T20:38:00.002+01:00</published><updated>2010-04-01T22:20:17.553+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openos'/><title type='text'>Ordnance Survey Data Released</title><content type='html'>Ordnance Survey have released quite a lot of data for free use (&lt;a href="http://www.ordnancesurvey.co.uk/oswebsite/opendata/"&gt;http://www.ordnancesurvey.co.uk/oswebsite/opendata/&lt;/a&gt;).&lt;br /&gt;The most interesting sounding data (meridian) is a 2Gb shape file, so I chickened out of trying to do anything with that tonight.&lt;br /&gt;Instead I downloaded the 50k Gazetteer and have put it into a postgresql database so it can be queried to look for things.&lt;br /&gt;Work in progress is at &lt;a href="http://www.maps2.webhop.net/openos"&gt;http://www.maps2.webhop.net/openos&lt;/a&gt;.&lt;br /&gt;It sort of works (just not very useful yet - you can do&amp;nbsp;&lt;a href="http://maps2.webhop.net/openos/gaz/www/doSearch.php"&gt;http://maps2.webhop.net/openos/gaz/www/doSearch.php&lt;/a&gt;, and it gives you a list of all of the items in the database containing the string 'hartlepool' - just need to transfer them back to the browser and plot them on a map now....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4382955569654225988?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://maps2.webhop.net/openos/gaz/www/doSearch.php?sstr=hartlepool' title='Ordnance Survey Data Released'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4382955569654225988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4382955569654225988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4382955569654225988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4382955569654225988'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/04/ordnance-survey-data-released.html' title='Ordnance Survey Data Released'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5195445895421375438</id><published>2010-03-07T22:33:00.000Z</published><updated>2010-03-07T22:40:47.587Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android User Interfaces</title><content type='html'>I am working on a colour processing program for android (more later once it works).  A fundamental part of this is to create a custom view to use in the user interface - it will eventually display a colour wheel, but it is nowhere near that yet!&lt;br /&gt;The problem was that I am creating a subClass of View, which draws something on the screen.&lt;br /&gt;I then simply added it to my UI XML description and tried to use it.&lt;br /&gt;I got an InflateException, which was a bit of a surprise.&lt;br /&gt;It turns out that I made a mistake - I had overridden the simple View(Context) constructor, which would be fine if I was adding the view directly from a program, but to use it from XML you need to override another constructor, View(Context, AttributeSet).&lt;br /&gt;&lt;br /&gt;Now I have done that it works.  Sorry this makes no sense unless you are used to Android things, and if you are used to Android, it is probably obvious, but this will help me next time I forget!   I found this out &lt;a href="http://developer.android.com/guide/topics/graphics/2d-graphics.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5195445895421375438?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5195445895421375438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5195445895421375438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5195445895421375438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5195445895421375438'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/03/android-user-interfaces.html' title='Android User Interfaces'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-626289920310724530</id><published>2010-03-07T19:53:00.000Z</published><updated>2010-03-07T20:04:12.665Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='GPS'/><category scheme='http://www.blogger.com/atom/ns#' term='GPX'/><title type='text'>GPX Route Editor</title><content type='html'>I was trying to plan a family cycling trip in a rush this morning and struggling to find a map to&lt;br /&gt;use (&lt;a href="http://www.opencyclemap.org"&gt;opencyclemap&lt;/a&gt; is no good because I like to go to un-mapped places so I can add them to the map).&lt;br /&gt;I finally remembered that ages ago I wrote a little javascript application to display an Ordnance Survey map, and let you put route markers on it which you can then put onto a Garmin GPS receiver to use for navigation - I used that to record where I intended to go, so I knew where there was &lt;span style="font-weight: bold; font-style: italic;"&gt;supposed&lt;/span&gt; to be a bridleway...&lt;br /&gt;Anyway I thought I should add that program to my repository in case anyone else is interested.  There are a few things to do to it - see the README file in the repository directory - The source code is in my &lt;a href="http://code.google.com/p/ntmisc"&gt;ntmisc&lt;/a&gt; code repository under &lt;a href="http://code.google.com/p/ntmisc/source/browse/#svn/gpxedit"&gt;gpxedit&lt;/a&gt;.&lt;br /&gt;You can find the program working at &lt;a href="http://www.maps.webhop.net"&gt;http://www.maps.webhop.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I will do a bit more work on this when I get chance.   I always intended to convert it to &lt;a href="http://www.openlayers.org"&gt;&lt;/a&gt;&lt;a href="http://www.openlayers.org"&gt;OpenLayers&lt;/a&gt; rather than multimap's proprietary API, and at the moment you have to copy and paste the GPX file into a text editor to get around the irritating web browser security - need a way of getting around that - the simplest would be to add an 'echo' server side application that would allow you to download the GPX file from the server, but that feels like brute force and ignorance!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-626289920310724530?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/626289920310724530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=626289920310724530' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/626289920310724530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/626289920310724530'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/03/gpx-route-editor.html' title='GPX Route Editor'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5603842368553127486</id><published>2010-02-17T22:35:00.000Z</published><updated>2010-02-17T22:42:34.699Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='GW620'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Vespucci'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Android Development on Ubuntu</title><content type='html'>I just got an LG GW620 android mobile phone.  I want to use it for mapping (&lt;a href="http://www.openstreetmap.org"&gt;http://www.openstreetmap.org&lt;/a&gt;).   There is an android editor called Vespucci available, but it needs some work to make the UI easier to use.  I thought I would have a look at the source code to see if I can work out how to modify it.&lt;br /&gt;The android developer web site says that it is best to use the Eclipse IDE, but when I tried I got all sorts of errors about un-satisfied dependencies.&lt;br /&gt;Fortunately someone had posted some instructions to get it working on Ubuntu (&lt;a href="http://ubuntuforums.org/showthread.php?p=8842292#post8842292"&gt;http://ubuntuforums.org/showthread.php?p=8842292#post8842292&lt;/a&gt;).&lt;br /&gt;Now I have followed this I have a working IDE to develop Android applications, and have got a basic "Hello World" application working.  I have also downloaded and complied the Vespucci source code, and run it on the SDK emulator.&lt;br /&gt;Just need to understand how Android UIs work now....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5603842368553127486?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5603842368553127486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5603842368553127486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5603842368553127486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5603842368553127486'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/02/android-development-on-ubuntu.html' title='Android Development on Ubuntu'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2323698191720949342</id><published>2010-02-14T22:36:00.001Z</published><updated>2010-02-14T22:40:08.568Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><title type='text'>Progress Mapping Hartlepool</title><content type='html'>Benjamin and I are making progress mapping &lt;a href="http://www.openstreetmap.org/?lat=54.6815&amp;amp;lon=-1.2083&amp;amp;zoom=12&amp;amp;layers=B000FFF"&gt;Hartlepool&lt;/a&gt; for &lt;a href="http://www.openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt;.&lt;br /&gt;I have just run a query on my database to see how many kilometers we must have cycled to produce the map.   I was really quite shocked that it was over 550 km!  No wonder I am tired...&lt;br /&gt;Progress with the map and the breakdown of the distances are shown on the &lt;a href="http://wiki.openstreetmap.org/wiki/Hartlepool"&gt;Hartlepool OpenStreetMap page&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2323698191720949342?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2323698191720949342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2323698191720949342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2323698191720949342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2323698191720949342'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/02/progress-mapping-hartlepool.html' title='Progress Mapping Hartlepool'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-982489297983157509</id><published>2010-02-02T20:47:00.000Z</published><updated>2010-02-04T20:25:25.946Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='TownGuide'/><title type='text'>Townguide Web Service Working</title><content type='html'>Well, I think the townguide web service is working now (&lt;a href="http://www.townguide.webhop.net"&gt;http://www.townguide.webhop.net&lt;/a&gt;).&lt;br /&gt;There is a simple queue so it only renders one job at a time, and you can view the progress of your job through the queue.&lt;br /&gt;The source code and early documentation is stored at &lt;a href="http://code.google.com/p/townguide"&gt;http://code.google.com/p/townguide&lt;/a&gt;.&lt;br /&gt;The main thing to fix now is the output resolution - if I increase the resolution (in dpi) of the output map too far, mapnik changes zoom level and reduces the size of the text, so it is no easier to read - I need to understand mapnik style sheets now....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-982489297983157509?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/982489297983157509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=982489297983157509' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/982489297983157509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/982489297983157509'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/02/townguide-web-service-working.html' title='Townguide Web Service Working'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5487016927573538801</id><published>2010-01-03T22:43:00.000Z</published><updated>2010-01-03T23:40:33.597Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='TownGuide'/><title type='text'>Town Guide Progress</title><content type='html'>The good thing about so much bad weather over Christmas was that I could do some nerdy work rather than going out walking or cycling.....&lt;br /&gt;The &lt;a href="http://code.google.com/p/ntmisc"&gt;town guide&lt;/a&gt; Python project has therefore made good progress.   The program can now generate a PDF 'poster' that can include a street index, and labelled features from the map database (pubs, shops, tourist attractions etc.).   A typical example is shown at&lt;a href="http://www.townguide.webhop.net/example1_hartlepool.pdf"&gt; &lt;/a&gt;&lt;a href="http://www.townguide.webhop.net/example1_hartlepool.pdf"&gt;http://www.townguide.webhop.net/example1_hartlepool.pdf&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have set up a very rudimentary web service using a PHP script to call townguide.py to generate a town guide on demand at &lt;a href="http://www.townguide.webhop.net/"&gt;http://www.townguide.webhop.net&lt;/a&gt;.   It is running on a very small computer, and there is no queue, so there is no saying what will happen if more than one person tries to use it at once - that is another job!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5487016927573538801?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5487016927573538801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5487016927573538801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5487016927573538801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5487016927573538801'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2010/01/town-guide-progress.html' title='Town Guide Progress'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7821336275801785388</id><published>2009-12-15T21:48:00.001Z</published><updated>2009-12-15T21:53:10.714Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='animation'/><title type='text'>Animation</title><content type='html'>Laura and I have been experimenting with stop-motion animation - set up a camera on a tripod with a remote shutter release, then position a scene in front of it, and change it by a very small amount between shooting frames.&lt;br /&gt;10 frames per second seems to work ok for what we are doing (and you get more video for your money, so it is a bit more rewarding!).&lt;br /&gt;I am using mencoder to turn the jpeg images from the camera into a mpeg4 video using the following:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mencoder mf://*.JPG -mf fps=10 -o leaves.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800 -vf scale=640:480&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This produces an mpeg4 encoded .avi file, scaled to 640x480 pixels.&lt;br /&gt;You can then run mencoder again to add a mp3 audio stream.&lt;br /&gt;The results can be seen at &lt;a href="http://www.flickr.com/photos/jones139/sets/72157623008049056/"&gt;http://flickr.com/jones139&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7821336275801785388?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7821336275801785388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7821336275801785388' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7821336275801785388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7821336275801785388'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/12/animation.html' title='Animation'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1068776039147791391</id><published>2009-11-29T20:03:00.001Z</published><updated>2009-11-29T20:07:06.156Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='TownGuide'/><title type='text'>Town Guide (again)</title><content type='html'>Progress with the Town Guide program stalled a bit when I went on holiday, then was rather busy at work for a while.  I am back to thinking about it now.&lt;br /&gt;The current version has two output modes, HTML and PDF - both are quite crude, but work.&lt;br /&gt;The PDF output uses LaTeX, which seemed like a good idea at the time, but I am struggling because LaTeX thinks it knows better than me what the output is supposed to look like - it keeps putting the tables etc. at the end, rather than where I ask for them.&lt;br /&gt;This means I have two options - either do battle with LaTeX to sort it out, or abandon it and go for a more 'direct' PDF production.&lt;br /&gt;I think that as the output I am producing is short and simple, I may as well go for 'direct' production.  I am going to have  a try with ReportLab's python library (&lt;a href="http://www.reportlab.org/oss/rl-toolkit/guide/"&gt;http://www.reportlab.org/oss/rl-toolkit/guide/&lt;/a&gt;).&lt;br /&gt;I'll go and read the instructions and see how it goes....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1068776039147791391?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1068776039147791391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1068776039147791391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1068776039147791391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1068776039147791391'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/11/town-guide-again.html' title='Town Guide (again)'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2080512175361665298</id><published>2009-10-04T23:06:00.001+01:00</published><updated>2009-10-04T23:12:25.361+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><title type='text'>Free Town Guide</title><content type='html'>For ages I have been intending to write a program to produce a nice guide to a town or area based on &lt;a href="http://www.openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; data.&lt;br /&gt;I finally decided that I knew enough about postgresql and python to have a go.&lt;br /&gt;The result is a program called &lt;a href="http://code.google.com/p/ntmisc/source/browse/townguide"&gt;townguide.py&lt;/a&gt;.   The idea is that you load the openstreetmap data into a postgresql database (like you do if you want to render it using Mapnik), then produce an xml file to tell townguide.py what you want rendering.  It then goes and produces the nice output for you.&lt;br /&gt;Version 0.1 is working and is on SVN.  At the moment it only produces html output (because that is easy), and it is not very pretty.&lt;br /&gt;The next stage is to make it produce postscript to give nice printable output on a defined paper size.&lt;br /&gt;An example of the html output is at &lt;a href="http://hartlepoolmap.webhop.net"&gt;http://hartlepoolmap.webhop.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Having looked at the output it looks like it will be quite useful from a mapping point of view - if you know the area you can review the features that are summarised and look for missing banks, supermarkets etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2080512175361665298?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2080512175361665298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2080512175361665298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2080512175361665298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2080512175361665298'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/10/free-town-guide.html' title='Free Town Guide'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8659277463075405665</id><published>2009-09-19T17:55:00.000+01:00</published><updated>2009-09-19T17:59:49.858+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics tablet'/><title type='text'>Using a Graphics Tablet in Ubuntu 9.04</title><content type='html'>I have a cheap Trust graphics tablet that I used to use for drawing in Inkscape or Gimp.&lt;br /&gt;It stopped working at some point (Can't remember which Ubuntu version), but I decided I needed to use it again, because drawing with a touchpad on a laptop is a pain in the thumb...&lt;br /&gt;It was surprising that it didn't just work when you plug it in, because I'm sure a previous version of Ubuntu behaved like this.&lt;br /&gt;I found the instructions at &lt;a href="https://help.ubuntu.com/community/AiptekTablet"&gt;https://help.ubuntu.com/community/AiptekTablet&lt;/a&gt;. &lt;br /&gt;You basically have to install the Aiptek xorg driver and put a configuration file in a directory under /etc/hal.  I wondered where the X11 configuration was now that Xorg.conf is so small....&lt;br /&gt;&lt;br /&gt;Anyway, it works now...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8659277463075405665?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8659277463075405665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8659277463075405665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8659277463075405665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8659277463075405665'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/09/using-graphics-tablet-in-ubuntu-904.html' title='Using a Graphics Tablet in Ubuntu 9.04'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3937379378077767474</id><published>2009-09-06T22:07:00.000+01:00</published><updated>2009-09-06T22:13:12.716+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='pygtk'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Progress with IP Camera Viewer</title><content type='html'>The Edimax IP Camera seems to work fairly well, but the video stream seems to get interrupted every now and again, which makes the player crash - vlc just hangs, and mplayer exits.&lt;br /&gt;I decided that exiting was better so I have written a simple pyGTK front end for mplayer to play the screen.  It also includes a wireless network link quality monitor to help understand why it is not working - it is &lt;a href="http://code.google.com/p/ntmisc"&gt;here&lt;/a&gt; as 'bentv'.&lt;br /&gt;&lt;br /&gt;Note that bentv uses a library that I have started work on (named ntpylib for want of a better name) - so far it only contains one class, 'prefs', which deals with saving and loading of simple key/value data from XML files.  It includes a dialog box that GUI programs (such as bentv.py) can use to allow the user to edit the data.  prefs.py and prefs.glade need copying or linking into the bentv directory to make it work - there is no clever installer!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3937379378077767474?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3937379378077767474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3937379378077767474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3937379378077767474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3937379378077767474'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/09/progress-with-ip-camera-viewer.html' title='Progress with IP Camera Viewer'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4626600312119451766</id><published>2009-08-23T22:30:00.001+01:00</published><updated>2009-08-23T22:41:37.646+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Embedded Linux Firmware Binary Files</title><content type='html'>I have always struggled to understand the format of the binary files that store the firmware upgrades.&lt;br /&gt;They tend to be a mixture of some simple text labels, a kernel image and one or more mountable filesystems.&lt;br /&gt;I have written a little script that goes through a file in a brute force (one byte at a time) way and attempts to mount it as various filesystem types (script stored &lt;a href="http://code.google.com/p/ntmisc/source/browse/fwutils/fwcrack.sh"&gt;here&lt;/a&gt;).&lt;br /&gt;I used the information found by this script, and the source code provided by Edimax to work out some information about the internals of the IC-3010WG IP Camera - it is written up &lt;a href="http://sites.google.com/site/edimaxipcamerasandlinux/hardware"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4626600312119451766?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4626600312119451766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4626600312119451766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4626600312119451766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4626600312119451766'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/08/embedded-linux-firmware-binary-files.html' title='Embedded Linux Firmware Binary Files'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4914695099309710466</id><published>2009-08-22T16:15:00.001+01:00</published><updated>2010-12-31T16:19:44.542Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Practical Experience using the Edimax IP Camera</title><content type='html'>We were away on holiday last week so I got to try using the Edimax IP camera 'for real' as a monitor to keep an eye on our disabled son - known as 'BenTV-ng' (next generation) to distinguish it from 'BenTV' which was the old analogue system I used to use.&lt;br /&gt;&lt;br /&gt;I gave up on using ad-hoc networking and instead took my wireless access point with me.  This had the added advantage of improving the range of transmission because I could arrange for the access point to be between the camera and the computer.  The computer I used was a Toshiba netbook running Ubuntu Linux.&lt;br /&gt;&lt;br /&gt;The first thing I noticed was that when I powered everything up, nothing happened.  At first I thought it was because the access point needed to see a wired connection as well as a wireless one, because when I connected the computer to it using a wire things started to work.  I soon realised that the range was awful - it stopped working as soon as you were outside of his room.  This turned out to be my fault because I had also switched on the analogue camera, which transmitted on the same frequency as the wireless network, so the noise level was huge.  Things got better when I switched off the analogue camera.&lt;br /&gt;&lt;br /&gt;At first everything appeared to work - vlc rtsp://admin:1234@bentv/ipcam.sdp played the video stream with sound.&lt;br /&gt;I soon noticed that if the network got interrupted vlc froze, giving an apparently good picture, but no movement, which was no use to me.  Instead I changed to mplayer - at least if that got into trouble it crashed and closed the video playback window so you knew something was wrong.&lt;br /&gt;&lt;br /&gt;I set up a simple shell script that loops indefinitely starting mplayer then when mplayer exits it re-boots the ip camera, waits for 30 seconds and starts mplayer again.  &lt;br /&gt;This approach worked pretty well - the 30 second interruptions during the re-boot were not usually too troublesome.&lt;br /&gt;&lt;br /&gt;We did find some problems when the video stream only worked for a few seconds before mplayer exited and the re-boot sequence started again, which was no good at all.  The only way I found to cure this was to power off the camera all together - a software re-boot via the web interface did not cure it.  I'll set up a little test at home now to see how long it takes to get into this state, and whether it makes a difference if you use wireless or wired networking.&lt;br /&gt;&lt;br /&gt;The code to achieve this is stored at &lt;a href="http://code.google.com/p/ntmisc/source/browse/bentv/"&gt;http://code.google.com/p/ntmisc/source/browse/bentv/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The most up to date information I have on using this camera with linux can be found at&amp;nbsp;&lt;a href="http://ic-3010wg.webhop.net/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4914695099309710466?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://ic-3010wg.webhop.net' title='Practical Experience using the Edimax IP Camera'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4914695099309710466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4914695099309710466' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4914695099309710466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4914695099309710466'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/08/practical-experience-using-edimax-ip.html' title='Practical Experience using the Edimax IP Camera'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7772720113392632251</id><published>2009-07-24T21:57:00.000+01:00</published><updated>2009-07-24T22:19:32.940+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Ad-Hoc Wireless Network Troubles</title><content type='html'>Now that I have the Edimax IP Camera working I want it to connect to my Toshiba NB100 netbook computer as simply as possible - the idea is to use it when we are away on holiday so I don't want to have to set up a whole network with an access point etc.  Instead I just want to set up an ad-hoc network between the computer and the IP Camera.&lt;br /&gt;According to the instructions this should be easy - I tell the IP Camera to connect to an ad-hoc network called 'bentv', and then use NetworkManager in the Ubuntu desktop of the netbook to create the ad-hoc network.&lt;br /&gt;This works fine on my main laptop, but fails on the netbook.&lt;br /&gt;It turns out that NetworkManager is not capable of putting the wireless card into ad-hoc mode.&lt;br /&gt;The work around was to have the script to start the VLC viewer shutdown network manager and set up the network manually as follows:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;/etc/init.d/NetworkManager stop&lt;br /&gt;ifconfig ath1 down&lt;br /&gt;wlanconfig ath1 destroy&lt;br /&gt;wlanconfig ath1 create wlandev wifi0 wlanmode adhoc&lt;br /&gt;iwconfig ath1 essid bentv&lt;br /&gt;iwconfig ath1 channel 1&lt;br /&gt;iwconfig ath1 192.168.1.35&lt;br /&gt;iwconfig ath1 netmask 255.255.255.0&lt;br /&gt;ifconfig ath1 up&lt;br /&gt;&lt;br /&gt;vlc --fullscreen rtsp://192.168.1.17/ipcam.sdp&lt;br /&gt;&lt;br /&gt;/etc/init.d/NetworkManager start&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This is based on information I found &lt;a href="http://wiki.debian.org/WiFi/ath_pci"&gt;here&lt;/a&gt;.&lt;br /&gt;This seems to work, but the wireless networking is a bit iffy after the script exits - I might have to do the wlanconfig destroy bit again to put it into infrastructure mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7772720113392632251?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7772720113392632251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7772720113392632251' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7772720113392632251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7772720113392632251'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/ad-hoc-wireless-network-troubles.html' title='Ad-Hoc Wireless Network Troubles'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6070058055943724555</id><published>2009-07-12T10:21:00.001+01:00</published><updated>2010-12-31T16:13:24.503Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>More on Edimax IP Camera</title><content type='html'>I think we're getting somewhere.  Searching around for references to IP cameras and mplayer yielded &lt;a href="http://lists.mplayerhq.hu/pipermail/mplayer-users/2005-June/053629.html"&gt;this&lt;/a&gt; thread which suggested the following:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;mkfifo fifo.mpeg4&lt;br /&gt;wget -q http://admin:1234@192.168.1.117:4322 -Ofifo.mpeg4 &amp;amp;&lt;br /&gt;mplayer  -V -demuxer 35 fifo.mpeg4&lt;/blockquote&gt;This seems to work ok - there is a bit of a delay in the video, but probably ~0.1 sec, which is acceptable.&lt;br /&gt;Progress!&lt;br /&gt;Just need to get sound working now....&lt;br /&gt;&lt;br /&gt;Well, I did a bit more hunting around in the camera web set-up and realised I had missed a section about RTSP.  The default was for RTSP to be enabled on port 554 with a rtsp path of ipcam.sdp.&lt;br /&gt;When I tried &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;mplayer rtsp://192.168.1.117:554/ipcam.sdp&lt;/blockquote&gt;&lt;br /&gt;I got pictures AND sound!&lt;br /&gt;I had tried rtsp before, but had missed the ipcam.sdp bit.  Mplayer complains that my little netbook is too slow to play the stream, so there is a bit more work to do, but it looks promising.  I'll try VLC now.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The most up to date information I have on using this camera with linux can be found at &lt;a href="http://ic-3010wg.webhop.net/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;.&lt;/u&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6070058055943724555?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='https://sites.google.com/site/edimaxipcamerasandlinux/receiving-images-and-video' title='More on Edimax IP Camera'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6070058055943724555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6070058055943724555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6070058055943724555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6070058055943724555'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/more-on-edimax-ip-camera.html' title='More on Edimax IP Camera'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5821150410444404348</id><published>2009-07-11T22:26:00.000+01:00</published><updated>2009-07-11T22:28:23.389+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Edimax IC-3010Wg yet again</title><content type='html'>Still struggling with my IP Camera.  Although mplayer can sort of play the mp4 stream, it does not seem reliable and takes a long time to start to play, so I do not think it is working correctly.  I think I'll try the Edimax support, but have upgraded from version 1.20 to 1.25 of the firmware first, because they are bound to ask if I am using the latest software....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5821150410444404348?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5821150410444404348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5821150410444404348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5821150410444404348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5821150410444404348'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/edimax-ic-3010wg-yet-again.html' title='Edimax IC-3010Wg yet again'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4024526879923296206</id><published>2009-07-09T21:42:00.000+01:00</published><updated>2009-07-09T21:53:20.432+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ic-3010'/><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Edimax IC-3010Wg again</title><content type='html'>I have made a bit more progress getting my Edimax IP Camera working, and detailed what I have learned at &lt;a href="http://sites.google.com/site/edimaxipcamerasandlinux/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The main problems are still that although I can download an MPEG4 stream using wget, neither mplayer nor vlc will play it directly, which is no good.&lt;br /&gt;The other issue is that sound still does not work.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4024526879923296206?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4024526879923296206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4024526879923296206' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4024526879923296206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4024526879923296206'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/edimax-ic-3010wg-again.html' title='Edimax IC-3010Wg again'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8501611184279923706</id><published>2009-07-07T21:45:00.001+01:00</published><updated>2010-12-31T16:15:21.286Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='edimax'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ip camera'/><title type='text'>Edimax IC-3010Wg IP Camera and Linux</title><content type='html'>I have just got an Edimax IC-3010Wg IP Camera.  I intend to use it as a replacement for the analogue video system we use to keep an eye on our disabled son.&lt;br /&gt;I was rather disappointed to find that it does not work with Firefox - you need an Internet Explorer ActiveX control to view the video images.  This means it will not work on my Linux computers as supplied by the manufacturer.&lt;br /&gt;&lt;br /&gt;What works:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The camera gets its network configuration by DHCP (despite what the quick start guide says) so by checking the DHCP deamon log you can find its IP address.&lt;/li&gt;&lt;li&gt;You can access its configuration screen with a web browser (default username admin, password 1234)&lt;/li&gt;&lt;li&gt;Receive a snapshot picture using http://&lt;ipaddr&gt;/snapshot.jpg&lt;/ipaddr&gt;&lt;/li&gt;&lt;li&gt;Download a mjpeg video stream using wget http://admin:1234@192.168.1.117/mjpg/video.mjpg. (I don't know how to display this in real time though - mplayer doesn't seem to work).&lt;/li&gt;&lt;li&gt;Some other things are detailed &lt;a href="http://translate.google.com/translate?hl=en&amp;amp;sl=nl&amp;amp;u=http://tweakers.net/productreview/12443/edimax-ic-3010-wired-dual-mode-%28mpeg4-en-motion-jpeg%29-ip-camera.html&amp;amp;ei=nq5TSseXK9uMjAe5zcieCQ&amp;amp;sa=X&amp;amp;oi=translate&amp;amp;resnum=6&amp;amp;ct=result&amp;amp;prev=/search%3Fq%3Dedimax%2B3010%2Bip%2Bcamera%2Blinux%2Bsupport%26hl%3Den%26rlz%3D1G1TSECCEN-GBUK331%26sa%3DG"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Someone has written a tcl application that works with a similar camera, but not this one (see &lt;a href="http://gem.win.co.nz/mb/misc/edicam/"&gt;here&lt;/a&gt;).&lt;/li&gt;&lt;/ol&gt;I think I am going to end up writing something based on the tcl application shown above to display live video with sound, which is what I need.  If anyone knows an off-the shelf one, please let me know!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The most up to date information I have on using this camera with linux can be found at&amp;nbsp;&lt;a href="http://ic-3010wg.webhop.net/"&gt;http://ic-3010wg.webhop.net&lt;/a&gt;.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8501611184279923706?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://ic-3010wg.webhop.net' title='Edimax IC-3010Wg IP Camera and Linux'/><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8501611184279923706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8501611184279923706' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8501611184279923706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8501611184279923706'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/edimax-ic-3010wg-ip-camera-and-linux.html' title='Edimax IC-3010Wg IP Camera and Linux'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4966399536932252583</id><published>2009-07-07T21:08:00.000+01:00</published><updated>2009-07-07T21:13:58.034+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>Re-Programming MusicPal</title><content type='html'>I have not made any progress with the MusicPal since Christmas, but someone else has been busy and made a good start on some alternative software to run on it, which he has published here &lt;a href="http://musicpal.v3v.de/"&gt;http://musicpal.v3v.de/&lt;/a&gt;.&lt;br /&gt;Well done Marco - you have got much further than I have! &lt;br /&gt;Giles also made progress with sound output and left his code in a comment to one of my earlier posts &lt;a href="https://www.blogger.com/comment.g?blogID=6042401333290389565&amp;amp;postID=8152418407059313332"&gt;here&lt;/a&gt;.&lt;br /&gt;Maybe it would be worth starting a project on Google Code or somewhere so other people can help develop it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4966399536932252583?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4966399536932252583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4966399536932252583' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4966399536932252583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4966399536932252583'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/07/re-programming-musicpal.html' title='Re-Programming MusicPal'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3516085390318351162</id><published>2009-06-28T21:06:00.000+01:00</published><updated>2009-06-28T21:13:52.767+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openproc'/><category scheme='http://www.blogger.com/atom/ns#' term='engineering'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>A General Purpose Network Solver?</title><content type='html'>I often get frustrated if I want to solve a simple fluid flow or thermal problem that is in the form of a network with branches, parallel paths etc.  These tend to be a bit to difficult for a "back of the envelope" solution, which is always my preferred approach, so you end up writing code to iterate to find solution.&lt;br /&gt;&lt;br /&gt;The easy way would be to use a commercial package like Aspen Hysis, SINDA or ESATAN, but these are very expensive for the once a year or thereabouts that I need to solve something like this.  It would be nice to have a simple, low cost solver available.&lt;br /&gt;&lt;br /&gt;I thought there would be plenty of open source ones available, but I have not been able to find a simple network solver, so I am going to resort to writing it myself.  I did do one once before, but I seem to have lost the source code....It never got finished properly anyway.&lt;br /&gt;&lt;br /&gt;I have started the project at &lt;a href="http://code.google.com/p/openproc"&gt;http://code.google.com/p/openproc&lt;/a&gt;.  There is no code worth talking of there yet, but the Wiki describes the sort of design I am thinking of.  Any offers of help greatly appreciated!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3516085390318351162?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3516085390318351162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3516085390318351162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3516085390318351162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3516085390318351162'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/06/general-purpose-network-solver.html' title='A General Purpose Network Solver?'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-263743112527877364</id><published>2009-06-09T22:34:00.000+01:00</published><updated>2009-06-10T20:32:15.152+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amilo Li2727'/><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>More Ubuntu 9.04 Sound Problems</title><content type='html'>I 'accidentally' wrecked my gnome desktop (no menus, toolabrs etc.) - I had been doing a bit of tidying up and must have uninstalled something important.  I could not decide what, so re-installed the whole ubuntu-desktop package.&lt;br /&gt;This came with pulseaudio again, so sound stopped working like last time.&lt;br /&gt;Decided to invest an hour in sorting it.  No real success searching on the web, but I did find this article - &lt;a href="http://ubuntuforums.org/showthread.php?t=962695%20%20"&gt;http://ubuntuforums.org/showthread.php?t=962695.&lt;/a&gt; The author provided a little script to update the ALSA drivers automatically, and quite a few people reported that this cured the sound for them.&lt;br /&gt;&lt;br /&gt;I am always wary about running unknown programs as root, but the script looked safe enough - just an automated way of downloading the ALSA source packages and running 'make install' etc. so I trusted it.&lt;br /&gt;It ran and it installed ALSA 1.0.20, compared to version 1.0.18 in the Ubuntu package.&lt;br /&gt;To my surprise, when I re-booted the computer, sound is back!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-263743112527877364?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/263743112527877364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=263743112527877364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/263743112527877364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/263743112527877364'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/06/more-ubuntu-904-sound-problems.html' title='More Ubuntu 9.04 Sound Problems'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7401867112891925430</id><published>2009-05-11T22:06:00.001+01:00</published><updated>2009-06-10T20:32:40.184+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amilo Li2727'/><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 9.04 Sound Problems</title><content type='html'>I upgraded my Fujitsu-Siemens laptop to Ubuntu 9.04 from 8.10 a few days ago.&lt;br /&gt;Everything worked fine except for sound.  Sound went from working perfectly in 8.10 to being quiet, and awfully crackly in 9.04.&lt;br /&gt;If I updated the gnome settings to use OSS rather than ALSA it worked ok, except flash movies still made crackly noises (I don't think flash can use OSS).&lt;br /&gt;I messed about with the gnome mixer without luck, except I did notice that changing the PCM volume did nothing (which is wrong), but changing the 'beep' volume did alter the sound volume (Along with crackles).&lt;br /&gt;I don't know why the beep and PCM are the wrong way around, and don't have time to work out how sound works properly, so I went for brute force and ignorance - I had heard a suggestion that Pulseaudio might be the problem, so I replaced pulseaudio with esound, and it all seems to work now...&lt;br /&gt;Therefore, I don't know what the problem was, but it was cured by getting rid of pulseaudio...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7401867112891925430?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7401867112891925430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7401867112891925430' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7401867112891925430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7401867112891925430'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/05/ubuntu-904-sound-problems.html' title='Ubuntu 9.04 Sound Problems'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5223332517772540121</id><published>2009-04-15T20:56:00.001+01:00</published><updated>2009-04-15T21:05:36.047+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSM'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenStreetMap'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>What has been happening?</title><content type='html'>I've been forgetting to update this with what has been happening.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/wherewasi"&gt;WherewasI&lt;/a&gt; now has a Python/GTK front end that allows you to plot your GPX traces on a &lt;a href="http://www.openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; map to see where you were, as well as altitude profiles etc.  It could still do with a few more features, but it does most of what I want at the moment.&lt;br /&gt;&lt;br /&gt;I have decided to make a concerted effort to finish off mapping &lt;a href="http://wiki.openstreetmap.org/wiki/Hartlepool"&gt;Hartlepool&lt;/a&gt; for &lt;a href="http://www.openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt;. The main problem is that am better at cycling around collecting GPX traces than I am at recording the street names.  This means I end up with lots of roads with no names - no use if anyone wants to search for an address....To do this I decided to use audio mapping by recording audio clips with my mobile phone.  The clips are GeoTagged using data from a little bluetooth GPS receiver.  I use &lt;a href="http://gpsmid.sourceforge.net"&gt;GPSMid&lt;/a&gt; on the mobile phone.  Unfortunately it does not produce the GPX file, or the audio clips in the correct format for the JOSM OpenStreetMap Editor.  I wrote a little python script to do the conversion so you can see the positions of the audio clips in the JOSM Editor (See the &lt;a href="http://wiki.openstreetmap.org/wiki/GpsMid#Using_GPSMid_for_Audio_Mapping"&gt;OSM GPSMid Page&lt;/a&gt; for details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5223332517772540121?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5223332517772540121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5223332517772540121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5223332517772540121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5223332517772540121'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/04/what-has-been-happening.html' title='What has been happening?'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8924610567684030057</id><published>2009-02-22T22:29:00.000Z</published><updated>2009-02-23T21:09:42.835Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='maps'/><category scheme='http://www.blogger.com/atom/ns#' term='GPS'/><category scheme='http://www.blogger.com/atom/ns#' term='GPX'/><title type='text'>GPX Track Analyser</title><content type='html'>I have realised why I never finish anything - it is far too easy to get distracted by another little job.&lt;br /&gt;This time my daughter asked me how far we had climbed after a very hilly bike ride on our holidays.&lt;br /&gt;I was a bit disappointed that I could not give an instant answer, as I had a track log from my Garmin Etrex GPS device, which includes elevation data.&lt;br /&gt;Therefore that evening I wrote a little program in Python to analyse GPX files and provide some basic statistics on the route - this can be found at &lt;a href="http://code.google.com/p/wherewasi"&gt;http://code.google.com/p/wherewasi&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8924610567684030057?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8924610567684030057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8924610567684030057' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8924610567684030057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8924610567684030057'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/02/gpx-track-analyser.html' title='GPX Track Analyser'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-6750642653033421511</id><published>2009-01-27T20:30:00.001Z</published><updated>2010-12-31T12:18:05.228Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='VirtualBox'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Integrating Windows XP and Ubuntu Linux</title><content type='html'>There are not many things that you can not do on Linux that you could on Windows, but there are a few, in particular there are some software packages that I can not manage to get running under Linux using Wine.  These are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Microsoft Office (I know OpenOffice is a good alternative, but it is different to Excel and Word that I use all the time at Work, and switching is difficult.  This is especially a problem for the rest of the family that are not as used to switching between operating systems as I am).&lt;/li&gt;&lt;li&gt;Family Tree Maker (My Mam is used to this program, and the Open Source equivalent (can't remember its name) just wasn't as good as far as she is concerned.&lt;/li&gt;&lt;li&gt;Microsoft Home Publishing (My daughter uses this to make cards etc.  Although you can use Inkscape or Scribus to do the same under linux, it is not as simple - maybe someone else knows an Open Source equivalent?).&lt;/li&gt;&lt;/ol&gt;When I heard about &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; I thought it was too good to be true - you are supposed to be able to run Ubuntu Linux as your main system (Host), but run Windows XP as a 'Guest' in an emulator - as far as Windows is concerned it is running on its own stand-alone machine, but VirtualBox is emulating a real computer in software.  This sounds like an awful job to do, and I expected everything to grind very slowly, but as my computers now have lots of memory (2GB and 4GB for my Laptop and the Kids desktop respectively), I thought it might be possible.&lt;br /&gt;&lt;br /&gt;Installing virtualbox in Ubuntu is easy: &lt;br /&gt;&lt;code&gt;sudo apt-get install virtualbox-ose&lt;/code&gt;&lt;br /&gt;Note that Ubuntu has another package "vboxgtk" which is an alternative front end to virtualbox.  I struggled this - the windows installer crashed when you used the keyboard, so I just stuck to the normal virtualbox program.&lt;br /&gt;&lt;br /&gt;You then start it by running &lt;code&gt;virtualbox&lt;/code&gt; as a normal user.  You then create a new virtual hard disk on which to install windows, which is actually a normal file in your home directory.&lt;br /&gt;&lt;br /&gt;You create a new 'virtual machine' by associating the virtual hard disk with it, and giving it access to your host system cdrom.  I put the Windows CD in the host computer CD drive, and selected 'run' to start the new virtual machine.  It booted off the CD and windows installed in the new virtual hard disk.&lt;br /&gt;&lt;br /&gt;Then the problems started.  The main one was that when I tried to boot windows off the new virtual hard disk it hung when it loaded a module called agp440.sys.  This was odd because it was the recovery disk for the version of WIndows XP that runs nicely on the real computer.  It turned out that the problem was that the recovery disk assumes the hardware configuration for the computer - in particular the graphics card (AGP), and the VirtualBox virtual computer has a different graphics card, which caused the crash.  I could not work out how to get around this, but I found another Windows XP CD, and this did a normal windows installation, where it picked the drivers for the particular hardware concerned.  This then booted nicely and you get a window, which contains the WinXP desktop.&lt;br /&gt;&lt;br /&gt;Using windows was a bit of a pain in this configuration - the desktop was very small, so it was difficult to fit application windows on it.  Also windows kept grabbing the mouse and keyboard, and you have to press a secret key (the right Ctrl key) to release it back to the host operating system.&lt;br /&gt;&lt;br /&gt;When I read a bit more about VirtualBox I found that it should work 'seamlessly' so you do not have a separate windows desktop - the Windows XP windows sit on the same desktop as the Ubunto Gnome ones.  To do this you have to use the web browser in Ubuntu (the host operating system) to download the &lt;a href="http://www.virtualbox.org/download/1.6.6/VBoxGuestAdditions_1.6.6.iso"&gt;guest additions&lt;/a&gt; package as an iso disk image, and put it in /usr/share/virtualbox with the filename "VBoxGuestAdditions.iso".  You can then install the guest additions package using the menu at the top of the windows desktop window.&lt;br /&gt;Once you have installed the Guest Additions package you can set the system into seamless mode using a menu, or pressing &lt;right&gt;-L.  This gives you a windows start menu bar at the bottom of the screen, in addition to the usual Ubuntu ones.&lt;br /&gt;&lt;br /&gt;There are menu options to give the guest operating system internet access - selecting the 'NAT' option seems to work, and to give it audio access (I selected the 'ALSA' option, which seems OK.&lt;br /&gt;&lt;br /&gt;You can share files between the guest operating system and the host one by selecting a 'shared folder' on the host system - this appears as a network share in Windows.&lt;br /&gt;&lt;br /&gt;Things appear to work now - MS Office installs and runs.  Haven't tried other things yet, and need to work out how printing works, but it looks very promising.&lt;/right&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-6750642653033421511?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/6750642653033421511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=6750642653033421511' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6750642653033421511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/6750642653033421511'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/01/integrating-windows-xp-and-ubuntu-linux.html' title='Integrating Windows XP and Ubuntu Linux'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4910589791039395958</id><published>2009-01-25T22:11:00.000Z</published><updated>2009-01-25T22:19:17.475Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><title type='text'>MusicPal USB Socket</title><content type='html'>&lt;a href="http://www.mydssd.de/musicpal/doku.php?id=my_musicpal:addusb"&gt;Other people&lt;/a&gt; have reported that it is easy to add a USB socket to the MusicPal.  As its internal memory is very limited I think this will be useful for software development, so decided to give it a try.&lt;br /&gt;Sure enough, you can open the case easily by removing three screws and pulling the knobs off the front panel.  There are clips on the right hand side of the front panel, so you have to start to open the case from the left (speaker) side and pull the front panel to the left a bit to release the clips.  I think it would have been possible to remove the front panel without removing the warranty seal on the screws behind the speaker - just removing the middle screw is probably enough to get the front panel off.&lt;br /&gt;I bought a USB socket from &lt;a href="http://rswww.com"&gt;RS Components&lt;/a&gt; and it soldered easily onto the circuit board, then just had to cut the back panel blank out and it went together nicely.  Now if you plug a USB memory stick into it, an extra menu item appears on the Freecom Nashville application menu, and you can play music off it.  I haven't tried to disable writing to the memory stick as they did &lt;a href="http://www.mydssd.de/musicpal/doku.php?id=my_musicpal:addusb"&gt;here&lt;/a&gt; because I think I will want to write to it from the musicpal.  We'll see....&lt;br /&gt;Haven't tried running software off it yet though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4910589791039395958?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4910589791039395958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4910589791039395958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4910589791039395958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4910589791039395958'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/01/musicpal-usb-socket.html' title='MusicPal USB Socket'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7913107658115904388</id><published>2009-01-19T19:41:00.000Z</published><updated>2009-01-19T19:51:04.960Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>Nearly Broke It</title><content type='html'>I'm trying to get back into fiddling with the MusicPal internet radio after I got distracted by a few other things instead over Christmas.&lt;br /&gt;The first thing I noticed was that I had broken the manufacturers' software - it appeared to boot up ok, and I could play files of my server, but internet radio didn't work, and neither did the clock on the device.&lt;br /&gt;I tried fiddling around with the settings via the MusicPal's menu, but couldn't find anything wrong.&lt;br /&gt;It turned out that I had filled up the filesystem on the device, so it did not have enough storage space to create /etc/resolve.conf or similar, so the internet DNS resolution did not work.  Once I deleted my experimental files, it all started to work again....&lt;br /&gt;&lt;br /&gt;This got me thinking that to do any serious development on this, I will need more storage space - deleting the manufacturers' software altogether is a bit of a big step given the rate I work on these things.  The simplest would be to persuade it to boot over the network, just like the MediaMVP - this means I can easily change the root filesystem image, and if it doesn't work it is trivial to put hte original back.  The trouble with this is that I will have to update the uboot configuration - this would be easy if I had a serial console for the device, but I don't.   I think there is a real possibility of turning it into a brick if I get this wrong.....&lt;br /&gt;The less intrusive alternative would be to compile a kernel with NFS support and have it nfs mount a filesystem with my software on it.  This is less drastic, but I will have to make sure I can do the emergency re-flash of the firmware in case I mess it up.  A job for later.&lt;br /&gt;The simplest would be to put my files on a USB memory stick and use that - people seem to have added USB support to the musicpal quite easily, so I had a look inside.  Sure enough, there is space for a solder connection USB socket, and a punch out panel in the back of the case.  I think I will get a USB socket and try this first to see how it goes - I can't find one in anything I can dismantle at the moment, so will have to buy one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7913107658115904388?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7913107658115904388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7913107658115904388' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7913107658115904388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7913107658115904388'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2009/01/nearly-broke-it.html' title='Nearly Broke It'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5341591865518464864</id><published>2008-12-15T22:31:00.000Z</published><updated>2008-12-15T22:43:28.703Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='cross compile mediaMVP mvpmc'/><title type='text'>Media MVP Slideshow</title><content type='html'>I want to create a simple slideshow viewer for the Hauppauge Media MVP. &lt;br /&gt;The user interface has to be simple, requiring no intervention other than powering up, because it is for our Autistic son and he does not press buttons.  I am intending to make a really big bright, easy to press button for him to power on the unit, and it will shutdown after a set period.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mvpmc.sf.net"&gt;Mvpmc&lt;/a&gt; almost does what I want, but you have to use the remote control to select an image to display before it will go into slideshow mode.  I am not keen on the mvpmc code - it has lots of 'modules' to do different functions, but the code is all interwoven, so it takes a bit of un-picking.  Therefore I thought I would go for something simpler.   &lt;a href="http://linux.bytesex.org/fbida/"&gt;Fbi&lt;/a&gt; is a simple frame buffer image viewer which should do the trick.  After much messing about I got it to compile, but unfortunately it complained that the MVP /dev/fb0 was not behaving like a standard linux frame buffer.  I gave up on fbi at this point and decided that un-picking the mvpmc code would be easier - at least I know it is capable of displaying images.&lt;br /&gt;&lt;br /&gt;I updated &lt;a href="http://musicpal.webhop.net/main.c"&gt;main.c&lt;/a&gt; and &lt;a href="http://musicpal.webhop.net/gui.c"&gt;gui.c&lt;/a&gt; in mvpmc to add a new command line startup option --startup slideshow:file=&lt;path&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5341591865518464864?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5341591865518464864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5341591865518464864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5341591865518464864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5341591865518464864'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/12/media-mvp-slideshow.html' title='Media MVP Slideshow'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3449482565478993640</id><published>2008-11-30T20:28:00.001Z</published><updated>2008-11-30T21:35:41.381Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='cross compile mediaMVP mvpmc'/><title type='text'>Cross Compiling for MediaMVP</title><content type='html'>I have a couple of Hauppauge Media MVP media players and I want to turn one into a customised photo view for our son - it will have to be very simple because he will not press buttons, so I want it to just start as soon as it is switched on, and provide a customised "Hello Benjamin" screen as it boots.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://mvpmc.sourceforge.net/"&gt;mvpmc&lt;/a&gt; project should provide most of what I need, so I just wanted to build a cross compiler and have a play.  I downloaded the binary distribution and got it running ok (needed a dhcp and tftp server on my little computer in the atic to do that), and the binary distribution of mvpmc works fine.&lt;br /&gt;I downloaded the source.  It says it is supposed to build its own toolchain if you do not have one, but this did not work - it ran for a long time, then complained about bits of the toolchain not being there.&lt;br /&gt;&lt;br /&gt;I thought I was too clever for that and I would just do it myself using crosstool.  This failed with obscure syntax errors, which was hard to believe.&lt;br /&gt;I eventually read that building cross compilers with recent versions of gcc is troublesome, so I installed an old one instead (gcc.3.4.6 from the Ubuntu repositories).  It worked ok and built a PPC-405 cross compiler for me.&lt;br /&gt;Unfortunately my "hello world" program compiled ok but would not run - the MVP responded with "not found" when I executed ./hello_world.  I think this is because the MVP is using uClibc, but I had just build a cross compiler with gLibc.  "oh dear...".&lt;br /&gt;Next tried the Embedded Linux Development Kit (&lt;a href="http://www.denx.de/en/view/Software/WebHome#Embedded_Linux_Development_Kit"&gt;ELDK&lt;/a&gt;).  Again "hello world" compiled ok, but got the same "not found" error.&lt;br /&gt;&lt;br /&gt;Looks like I will have to find out why the mvp toolchain build failed.&lt;br /&gt;&lt;br /&gt;Hunting a very long way back in the build log showed that the first error (that I spotted) was when it tried to download the linux headers to compile against.  It looks like the uClibc website has been rearranged and the ones that the MVP needs have been moved to a "old-releases" directory.  Downloading the file and putting it in ~/downloads like the mvpmc build script does resulted in the build running apparently ok - still hasn't finished though....&lt;br /&gt;&lt;br /&gt;OK, it's finished now, and the new toolchain compiles a "hello world" that runs ok!&lt;br /&gt;&lt;br /&gt;Now I just have to strip out the mvpmc code down to a very simple viewer, and it should work.....sounds easy, but it's getting late now...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3449482565478993640?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3449482565478993640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3449482565478993640' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3449482565478993640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3449482565478993640'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/cross-compiling-for-mediamvp.html' title='Cross Compiling for MediaMVP'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4652847670525313020</id><published>2008-11-28T22:00:00.000Z</published><updated>2008-11-28T22:20:55.258Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><category scheme='http://www.blogger.com/atom/ns#' term='autoconf'/><category scheme='http://www.blogger.com/atom/ns#' term='automake'/><title type='text'>autoconf / automake / aclocal</title><content type='html'>I am trying to build &lt;a href="http://mpd.wikia.com"&gt;Music Player Daemon&lt;/a&gt; for the FreeCom MusicPal.  I have written an output plugin that I think will drive the hardware, but now I am having trouble compiling this into the MPD source code.  I have never really understood the GNU configure scripts (./configure and all that), so I have probably messed something up.&lt;br /&gt;I have added new bits to configure.ac, Makefile.in etc.  But now what do I do?&lt;br /&gt;&lt;br /&gt;As far as I can tell from the simplest &lt;a href="http://mij.oltrelinux.com/devel/autoconf-automake"&gt;tutorial&lt;/a&gt; I can find suggests that I should just be able to edit configure.ac and Makefile.am then run autoconf, but it complains that the files are designed for automake version 1.6, and I have 1.10.  The error suggests running aclocal, but this just leads to more errors....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4652847670525313020?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4652847670525313020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4652847670525313020' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4652847670525313020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4652847670525313020'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/autoconf-automake-aclocal.html' title='autoconf / automake / aclocal'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8152418407059313332</id><published>2008-11-23T22:54:00.000Z</published><updated>2008-11-28T21:09:13.268Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>Progress with MusicPal Sound Programming</title><content type='html'>After a couple of hours of using strace to try to understand what Nashville was doing, and looking at the "base_audio" directory in the MusicPal kernel source directory, I have finally got it to make a noise.&lt;br /&gt;&lt;br /&gt;Basically you have to use /dev/audio and send some ioctl's to initialise the hardware, and set up the graphic equaliser.  You can then write raw data to /dev/audio just like you would with OSS.  In fact, I used the OSS sinegen.c example program as the basis and just altered the ioctls. &lt;a href="http://www.musicpal.webhop.net/audiotest.c"&gt;http://www.musicpal.webhop.net/audiotest.c&lt;/a&gt; is my sample program (it needs &lt;a href="http://musicpal.webhop.net/audio.h"&gt;audio.h&lt;/a&gt; from the MusicPal kernel source code to compile) - it makes a continuous tone come out of the MusicPal speaker, which is progress!  There are some comments in the code to show what it is doing (as far as I can work out anyway!).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8152418407059313332?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8152418407059313332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8152418407059313332' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8152418407059313332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8152418407059313332'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/progress-with-musicpal-sound.html' title='Progress with MusicPal Sound Programming'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2324067584758716656</id><published>2008-11-23T19:20:00.000Z</published><updated>2008-11-23T19:29:43.405Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>MusicPal Debug Tools</title><content type='html'>I am trying to get sound playback working in my own code on the MusicPal.  I have been advised to use a utility called 'strace' which allows you to monitor what system calls an application is executing - this should allow me to see how nashville initialises and uses the sound system on the MusicPal (http://forum.freecompromo.com/viewtopic.php?p=22633#22633).&lt;br /&gt;&lt;br /&gt;I downloaded the source code for strace from sourceforge.  It uses the standard gnu ./compile system to configure and compile it.&lt;br /&gt;I got it to compile for the MusicPal using:&lt;br /&gt;&lt;code&gt;source ~/alinux/setvars; CFLAGS=-I~/alinux/linux/include ./configure --host=arm-linux&lt;br /&gt;make&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;It compiled ok, and won't run on my PC, which is a good indication that it has cross compiled.&lt;br /&gt;The problem is that I can not transfer it to the MusicPal because the executable is about 290kB, and there is only 176kB free on the MusicPal /home directory.&lt;br /&gt;&lt;br /&gt;Oh Dear....I think the MusicPal has quite a lot of RAM - I'll see if I can make a RAM disk - either that or I have to get NFS working on the MusicPal so I can mount a decent sized directory, or even more drastic, pull the MusicPal appart and put a USB socket in it to use a USB disk - easier in the long run, but this is supposed to be a present for  my wife, so I'd better not.&lt;br /&gt;&lt;br /&gt;Silly me - there is already a ram disk mounted as /tmp....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2324067584758716656?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2324067584758716656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2324067584758716656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2324067584758716656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2324067584758716656'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/musicpal-debug-tools.html' title='MusicPal Debug Tools'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-2780673068013493424</id><published>2008-11-22T19:41:00.000Z</published><updated>2008-11-22T22:33:51.020Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>MusicPal Sound Programming</title><content type='html'>The MusicPal has a few devices that look like they are to do with sound:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;/dev/dsp&lt;/li&gt;&lt;li&gt;/dev/mixer&lt;/li&gt;&lt;li&gt;/dev/audio&lt;/li&gt;&lt;/ul&gt;I know very little about audio on Linux, but from a quick read I thought that these looked like &lt;a href="http://manuals.opensound.com/developer/"&gt;OSS&lt;/a&gt; devices.  I downloaded the simple OSS sine wave generator example &lt;a href="http://musicpal.webhop.net/singen.c"&gt;singen.c&lt;/a&gt;.  It runs ok on my laptop, and cross compiled ok, but when I tried to run it on the MusicPal I got a "/dev/dsp: No such device or address" error.  This makes me think that maybe it is not OSS - I'm going to have to learn more.&lt;br /&gt;&lt;br /&gt;A couple of hours later and I might be getting somewhere.  I tried doing fuser /dev/dsp and fuser /dev/audio.  These both returned nothing with the main application (nashville) sutdown.  Re-starting it with /etc/init.d/mainapp start, then repeating showed that /dev/dsp was still not used, but /dev/audio was used by the 12 running versions of /bin/nashville.  This has persuaded me that Freecom use /dev/audio, not /dev/dsp.&lt;br /&gt;&lt;br /&gt;So, what is /dev/audio, and how do I use it?&lt;br /&gt;&lt;br /&gt;The source code provided by freecom contains a directory .arch/arm/mach-mv88w8xx8/base_audio.  This might be a clue.  It even contains a file called audio_api.h - is this a modified version of OSS, or something unique?&lt;br /&gt;&lt;br /&gt;Tried doing cat file.au &gt; /dev/audio and cat file.mp3 &gt; /dev/audio - no sound at all if the machine had just been re-booted and nashville stopped, and had to CTRL-C to get back to the shell.&lt;br /&gt;&lt;br /&gt;Re-started nashville, played a tune, put nashville into sleep mode, then stopped it.  Repeated the cat xxx process - no sound, but dmesg showed "audio released irq disabled" messages, which come from audio.c in the base_audio directory.&lt;br /&gt;&lt;br /&gt;Re-started nashville, and now this does not make any sound either - I'm definitely doing something to its sound driver....&lt;br /&gt;&lt;br /&gt;Re-Booted.  Set nashville playing, then stopped it with /etc/init.d/mainapp stop.  Then did cat /usr/share/wakeup.mp3 &gt; /dev/audio - got awful noise out of the speaker!&lt;br /&gt;&lt;br /&gt;This is progress - I must have to do some initialisation to get it working, then send it data in the right format - just a matter of finding out how and what now - looks like audio.c might have some answers though...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-2780673068013493424?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/2780673068013493424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=2780673068013493424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2780673068013493424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/2780673068013493424'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/musicpal-sound-programming.html' title='MusicPal Sound Programming'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7213885654608705413</id><published>2008-11-22T18:28:00.000Z</published><updated>2008-11-22T19:41:17.021Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>My_MusicPal</title><content type='html'>I have added a page to the &lt;a href="http://www.mydssd.de/musicpal/doku.php?id=my_musicpal:compiling"&gt;My_Musicpal&lt;/a&gt; Wiki on what I have found out so far:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7213885654608705413?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7213885654608705413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7213885654608705413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7213885654608705413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7213885654608705413'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/mymusicpal.html' title='My_MusicPal'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-932076725061365862</id><published>2008-11-21T21:59:00.001Z</published><updated>2008-11-21T22:12:40.728Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>More on Writing to MusicPal Display</title><content type='html'>I've made some progress on writing to the MusicPal display now.&lt;br /&gt;This is all written in C - haven't got as far as trying to make Python work yet.&lt;br /&gt;I downloaded the Embedded Linux Development Kit and the MusicPal Linux source code from the &lt;a href="http://www.musicpal.info"&gt;FreeCom&lt;/a&gt; web site by clicking on the 'Legal Notice' link.&lt;br /&gt;The source code included a directory .../alinux/linux-2.6.16.16/arch/arm/mach-mv88w8xx8/lcd_framebuffer which appears to be the framebuffer driver source code for the MusicPal LCD Display.&lt;br /&gt;It included an example file "mvlcd_test.c" which did not work, but I managed to comment out the errors to get it to compile and run on the MusicPal - I transferred the executable to the MusicPal using wget on the MusicPal to download it from my web server.  Most of the options to do with filling in the screen did not work, but the 'Write String' one did once I realised that you have to do 'manually refresh display' afterwards to see what you have done.  It is also best to kill the MusicPal main application with:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/etc/init.d/watching stop&lt;br /&gt;/etc/init.d/mainapp stop&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Otherwise it overwrites the things  you have written.&lt;br /&gt;&lt;br /&gt;I have got a simple example running which shows text in three different fonts.  The example program is:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include "glcd.h"&lt;br /&gt;main() {&lt;br /&gt;  lcd_clear_screen();&lt;br /&gt;  lcd_set_font(0);&lt;br /&gt;  lcd_write_string("font0",0,0);&lt;br /&gt;  lcd_set_font(1);&lt;br /&gt;  lcd_write_string("font1",0,10);&lt;br /&gt;  lcd_set_font(2);&lt;br /&gt;  lcd_write_string("22:00",0,20);&lt;br /&gt;  lcd_redraw_screen();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This in turn relies on a simple library that I have started - glcd.c and glcd.h:&lt;br /&gt;glcd.h&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/*&lt;br /&gt; * glcd.h&lt;br /&gt; * Desc:  Graham's simple interface to display text on the MusicPal LCD&lt;br /&gt; *        Display.&lt;br /&gt; * HIST: 21nov2008  GJ ORIGINAL VERSIO&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;extern int lcd_font_number;  /* Default font - 0,1 or 2 */&lt;br /&gt;&lt;br /&gt;int lcd_set_font(int);&lt;br /&gt;int lcd_write_string(char *str,int x,int y);&lt;br /&gt;int lcd_clear_screen(void);&lt;br /&gt;int lcd_redraw_screen(void);&lt;br /&gt;int lcd_poll_buttons(void);&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;glcd.c&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;fcntl.h&gt;&lt;br /&gt;#include "lcdwrite.h"&lt;br /&gt;#include "glcd.h"&lt;br /&gt;&lt;br /&gt;int lcd_font = 0;&lt;br /&gt;&lt;br /&gt;int lcd_write_string(char *str, int x, int y) {&lt;br /&gt;  int fbfd = 0;&lt;br /&gt;  int retval = 0;&lt;br /&gt;  struct disp_string_lcd disp_lcd;&lt;br /&gt;  strcpy(disp_lcd.str,str);&lt;br /&gt;  disp_lcd.x = x;&lt;br /&gt;  disp_lcd.y = y;&lt;br /&gt;&lt;br /&gt;  switch (lcd_font) {&lt;br /&gt;  case 0:&lt;br /&gt;    disp_lcd.flags = STR_FLAG_FONT_6X8;&lt;br /&gt;    break;&lt;br /&gt;  case 1:&lt;br /&gt;    disp_lcd.flags = STR_FLAG_FONT_8X8;&lt;br /&gt;    break;&lt;br /&gt;  case 2:&lt;br /&gt;    disp_lcd.flags = STR_FLAG_FONT_24X24;&lt;br /&gt;    break;&lt;br /&gt;  default:&lt;br /&gt;    disp_lcd.flags = STR_FLAG_FONT_6X8;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  printf("write_string: str=%s, x=%d, y=%d, flags=%d\n",&lt;br /&gt;     disp_lcd.str, disp_lcd.x, disp_lcd.y, disp_lcd.flags);&lt;br /&gt;  // Open the file for reading and writing&lt;br /&gt;  fbfd = open("/dev/fb0", O_RDWR);&lt;br /&gt;  if (!fbfd) {&lt;br /&gt;    printf("Error: cannot open framebuffer device.\n");&lt;br /&gt;    retval = -1;&lt;br /&gt;  } else {&lt;br /&gt;    if (ioctl(fbfd, MVLCD_DISP_STRING, &amp;amp;disp_lcd)) {&lt;br /&gt;      printf("Error refreshing.\n");&lt;br /&gt;      return 1;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  close(fbfd);&lt;br /&gt;  return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int lcd_clear_screen() {&lt;br /&gt;  int fbfd = 0;&lt;br /&gt;  int retval = 0;&lt;br /&gt;  // Open the file for reading and writing&lt;br /&gt;  fbfd = open("/dev/fb0", O_RDWR);&lt;br /&gt;  if (!fbfd) {&lt;br /&gt;    printf("Error: cannot open framebuffer device.\n");&lt;br /&gt;    retval = -1;&lt;br /&gt;  } else {&lt;br /&gt;    if (ioctl(fbfd, MVLCD_CLEAR_SCREEN, 0)) {&lt;br /&gt;      printf("Error refreshing.\n");&lt;br /&gt;      return 1;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  close(fbfd);&lt;br /&gt;  return 0;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int lcd_redraw_screen() {&lt;br /&gt;  int fbfd = 0;&lt;br /&gt;  int retval = 0;&lt;br /&gt;  // Open the file for reading and writing&lt;br /&gt;  fbfd = open("/dev/fb0", O_RDWR);&lt;br /&gt;  if (!fbfd) {&lt;br /&gt;    printf("Error: cannot open framebuffer device.\n");&lt;br /&gt;    retval = -1;&lt;br /&gt;  } else {&lt;br /&gt;    if (ioctl(fbfd, MVLCD_REFRESH, 0)) {&lt;br /&gt;      printf("Error refreshing.\n");&lt;br /&gt;      return 1;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  close(fbfd);&lt;br /&gt;  return 0;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int poll_buttons() {&lt;br /&gt;  int fbfd = 0;&lt;br /&gt;  int retval = 0;&lt;br /&gt;  int buttons;&lt;br /&gt;  // Open the file for reading and writing&lt;br /&gt;  fbfd = open("/dev/fb0", O_RDWR);&lt;br /&gt;  if (!fbfd) {&lt;br /&gt;    printf("Error: cannot open framebuffer device.\n");&lt;br /&gt;    retval = -1;&lt;br /&gt;  } else {&lt;br /&gt;    if (ioctl(fbfd, MVLCD_POLL_BUTTONS, &amp;amp;buttons)) {&lt;br /&gt;      printf("Error refreshing.\n");&lt;br /&gt;      return 1;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  close(fbfd);&lt;br /&gt;  return buttons;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int lcd_set_font(int font) {&lt;br /&gt;  if (font&lt;0&gt;2) {&lt;br /&gt;    fprintf(stderr,"WARNING: Font Number %d is an odd number - this might not work\n", font);&lt;br /&gt;  }&lt;br /&gt;  lcd_font = font;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This doesn't do much, but I can now display text on the MusicPal display, so I am progressing towards a replacement firmware for it - just a little way to go still!&lt;br /&gt;&lt;br /&gt;NT&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-932076725061365862?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/932076725061365862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=932076725061365862' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/932076725061365862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/932076725061365862'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/more-on-writing-to-musicpal-display.html' title='More on Writing to MusicPal Display'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-3784146867021447871</id><published>2008-11-19T20:52:00.001Z</published><updated>2008-11-19T20:59:44.483Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>Writing to the MusicPal Display</title><content type='html'>Made a bit of progress with writing to the MusicPal display.&lt;br /&gt;There is a device /dev/lcd which looked promising, but I didn't know what to do with it, but then I noticed that /dev/fb0 links to it.  /dev/fb0 should be a linux &lt;a href="http://www.linux-fbdev.org/"&gt;framebuffer&lt;/a&gt; interface to the graphics hardware.  Unfortunately most of the guides I could find on the internet were not about how to program the framebuffer, but how to set it up.   I thought I was going to have to resort to reading /usr/include/linux/fb.h to try to understand it.  I was pleased to find that someone (lesky?) has done that and published a bit of code to work with the framebuffer &lt;a href="http://blog.csdn.net/lesky/archive/2008/03/27/2224102.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;He provided some example code to open the framebuffer device and extract information about it from the hardware as shown below:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include &lt;unistd.h&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;fcntl.h&gt;&lt;br /&gt;#include &lt;linux/fb.h&gt;&lt;br /&gt;#include &lt;sys/mman.h&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;        int fbfd = 0;&lt;br /&gt;        struct fb_var_screeninfo vinfo;&lt;br /&gt;        struct fb_fix_screeninfo finfo;&lt;br /&gt;        long int screensize = 0;&lt;br /&gt;        char *fbp = 0;&lt;br /&gt;        int x = 0, y = 0;&lt;br /&gt;        long int location = 0;&lt;br /&gt;&lt;br /&gt;        /* Open the file for reading and writing */&lt;br /&gt;        fbfd = open("/dev/fb0", O_RDWR);&lt;br /&gt;        if (!fbfd) {&lt;br /&gt;                printf("Error: cannot open framebuffer device.\n");&lt;br /&gt;                exit(1);&lt;br /&gt;        }&lt;br /&gt;        printf("The framebuffer device was opened successfully.\n");&lt;br /&gt;&lt;br /&gt;        /* Get fixed screen information */&lt;br /&gt;        if (ioctl(fbfd, FBIOGET_FSCREENINFO, &amp;amp;finfo)) {&lt;br /&gt;                printf("Error reading fixed information.\n");&lt;br /&gt;                exit(2);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        /* Get variable screen information */&lt;br /&gt;        if (ioctl(fbfd, FBIOGET_VSCREENINFO, &amp;amp;vinfo)) {&lt;br /&gt;                printf("Error reading variable information.\n");&lt;br /&gt;                exit(3);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        /* Figure out the size of the screen in bytes */&lt;br /&gt;        screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;&lt;br /&gt;&lt;br /&gt;    printf("xres=%d, yres=%d, bits_per_pixel=%d\n",&lt;br /&gt;        vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);&lt;br /&gt;       &lt;br /&gt;        /* Map the device to memory */&lt;br /&gt;        fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED,&lt;br /&gt;                fbfd, 0);      &lt;br /&gt;        if ((int)fbp == -1) {&lt;br /&gt;      printf("Error: failed to map framebuffer device to memory.\n");&lt;br /&gt;      exit(4);&lt;br /&gt;        }&lt;br /&gt;        printf("The framebuffer device was mapped to memory successfully.\n");&lt;br /&gt;&lt;br /&gt;        x = 100; y = 100;       /* Where we are going to put the pixel */&lt;br /&gt;&lt;br /&gt;        /* Figure out where in memory to put the pixel */&lt;br /&gt;    location = (x+vinfo.xoffset) * (vinfo.bits_per_pixel/8) +&lt;br /&gt;            (y+vinfo.yoffset) * finfo.line_length;&lt;br /&gt;&lt;br /&gt;        *(fbp + location) = 100;    /* Some blue */&lt;br /&gt;        *(fbp + location + 1) = 15;     /* A little green */&lt;br /&gt;        *(fbp + location + 2) = 200;    /* A lot of red */&lt;br /&gt;        *(fbp + location + 3) = 0;      /* No transparency */&lt;br /&gt;&lt;br /&gt;        munmap(fbp, screensize);&lt;br /&gt;        close(fbfd);&lt;br /&gt;        return 0;&lt;br /&gt;}&lt;br /&gt;       &lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-3784146867021447871?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/3784146867021447871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=3784146867021447871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3784146867021447871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/3784146867021447871'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/writing-to-musicpal-display.html' title='Writing to the MusicPal Display'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-8494402232002906745</id><published>2008-11-16T16:05:00.000Z</published><updated>2008-11-16T16:16:52.962Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='musicpal'/><title type='text'>MusicPal Internet Radio</title><content type='html'>I have bought a Freecom MusicPal internet radio as a present for Sandie.&lt;br /&gt;It turns out that it is actually a little single board computer running linux, so I have to see what I can do with it.&lt;br /&gt;Fortunately some other people have made a start as shown &lt;a href="http://www.mydssd.de/musicpal/doku.php"&gt;here&lt;/a&gt;.  Most importantly they show that if you point your web browser at the musicpal and log in, you can run an extra CGI script as http://&lt;musicpalip&gt;//admin/cgi-bin/debug.cgi.  This allows you to switch the telnet server on and off in the MusicPal.&lt;br /&gt;Once you have switched the telnet server on you can log into the machine as root and have a look around.&lt;br /&gt;To do anything interesting with it there will be three main requirements:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Read the keyboard (well the buttons on the device anyway!)&lt;/li&gt;&lt;li&gt;Display things on the screen.&lt;/li&gt;&lt;li&gt;Play music files.&lt;/li&gt;&lt;/ol&gt;I have made a start on this.  The buttons can easily be read from /dev/keypad.  Typing cat /dev/keypad shows the key currently being pressed.  Note that there seems to be a delay between typing cat /dev/keypad and anything starting to appear - not sure why.&lt;br /&gt;The codes returned are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fav - 1&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Menu - 2&lt;/li&gt;&lt;li&gt;Volume Button Press - 4&lt;/li&gt;&lt;li&gt;Volume Button Clockwise - V&lt;/li&gt;&lt;li&gt;Volume Button Anti-Clockwise - v&lt;/li&gt;&lt;li&gt;Select Button Press - 8&lt;/li&gt;&lt;li&gt;Select Button Clockwise - N&lt;/li&gt;&lt;li&gt;Select Button Anti-Clockwise - n&lt;br /&gt;&lt;/li&gt;&lt;li&gt;No Key Pressed - T&lt;/li&gt;&lt;/ul&gt;That's a start anyway - displaying things on the screen will be more difficult - I'll ahve to find out what sort of driver is provided - there /proc/mvlcd looks like something to do with it, but I don't know what.....&lt;br /&gt;&lt;br /&gt;NT&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-8494402232002906745?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/8494402232002906745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=8494402232002906745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8494402232002906745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/8494402232002906745'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/musicpal-internet-radio.html' title='MusicPal Internet Radio'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-1349726253626756814</id><published>2008-11-06T22:54:00.000Z</published><updated>2008-11-06T23:02:31.420Z</updated><title type='text'>Fujitsu Li2727 Sound Problems in Ubuntu 8.10</title><content type='html'>I just realised that the sound on my Futitsu Siemens Li2727 laptop had stopped working - probably when I upgraded to Ubuntu 8.10, but not sure.&lt;br /&gt;All you get when you play sound is crackling. &lt;br /&gt;Dmesg gave the following:&lt;br /&gt;[   13.411005] HDA Intel 0000:00:1b.0: PCI INT A -&gt; GSI 22 (level, low) -&gt; IRQ 22&lt;br /&gt;[   13.411038] HDA Intel 0000:00:1b.0: setting latency timer to 64&lt;br /&gt;[   13.442811] hda_codec: Unknown model for ALC268, trying auto-probe from BIOS.&lt;br /&gt;The 'Unknown model' looked like a problem, so I spent a while searching for solutions to do with this, but to no avail.&lt;br /&gt;&lt;br /&gt;Found a bug report - &lt;a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281322"&gt;https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281322&lt;/a&gt;, which sounded like my problem, but was solved by adjusting alsamixer. &lt;br /&gt;When I used alsamixer I only saw a single channel, which I think was the PC speaker, so it didn't sound right.   Looked at &lt;a href="https://wiki.ubuntu.com/DebuggingSoundProblems"&gt;https://wiki.ubuntu.com/DebuggingSoundProblems&lt;/a&gt; which said there was another program, gnome-alsamixer.  Tried this and it showed me lots of different sound card channels.  The volume of the PCM channel was zero - setting this to full volume cured the problem - Solved!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-1349726253626756814?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/1349726253626756814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=1349726253626756814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1349726253626756814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/1349726253626756814'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/fujitsu-li2727-sound-problems-in-ubuntu.html' title='Fujitsu Li2727 Sound Problems in Ubuntu 8.10'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-451561182588826238</id><published>2008-11-03T21:09:00.000Z</published><updated>2008-11-03T22:45:59.631Z</updated><title type='text'>Cross Browser JavaScript</title><content type='html'>I have been having terrible trouble making my daughter's '&lt;a href="http://www.christmas.webhop.info"&gt;Countdown to Christmas&lt;/a&gt;' google gadget work on internet explorer - works fine on firefox, but alas quite a lot of the world use IE, and on IE you just get a blank square.&lt;br /&gt;&lt;br /&gt;IE is not helpful with debugging - it seems to be fussier about little problems that firefox let me get away with, so there were quite a few typos (no closing '&gt;' etc.).&lt;br /&gt;&lt;br /&gt;One significant issue was that I was attempting to scale the background image in html using width='100%' height='100%' - firefox stretches the image to fit, but within a google gadget at any rate, internet explorer just displays a blank square - no helpful error messages or anything - useful! &lt;br /&gt;This means that my very clever bit of code to put the text in the correct position on the image doesn't work...Cured by forcing the image to a specified size in pixels rather than % - just means you have to size your page to fit it....This was not pretty, so had to solve it.  Went for specifying width=100%, which works, and let the height float to preserve the aspect ratio of the image  - just had to add yet more code to pick the vertical position of the text correctly.&lt;br /&gt;&lt;br /&gt;The last problem was the dates - IE said there were about 600000 days to christmas, which was not quite right - this was because getYear() returns 108 in Firefox and 2008 in IE.  Using getFullYear() cured it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-451561182588826238?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/451561182588826238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=451561182588826238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/451561182588826238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/451561182588826238'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/cross-browser-javascript.html' title='Cross Browser JavaScript'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-5380845058897726582</id><published>2008-11-02T20:38:00.002Z</published><updated>2010-12-31T12:19:05.982Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='amilo'/><category scheme='http://www.blogger.com/atom/ns#' term='Li2727'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><title type='text'>Wireless Networking in Linux on Fujitsu Siemens Amilo Li2727 laptop</title><content type='html'>I have a Fujitsu Siemens Amilo Li2727 laptop, which has a built in wireless network card. &lt;br /&gt;Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the &lt;a href="http://madwifi.org/wiki/Compatibility/Atheros"&gt;madwifi driver compatibility page&lt;/a&gt; says it should be an AR5007EG.&lt;br /&gt;&lt;br /&gt;The symptoms are that wireless networking does not work at all.  dmesg reports:&lt;br /&gt;"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".&lt;br /&gt;No wifi devices present when doing ifconfig, iwconfig etc.  There is one odd device (pan0) - I don't know what this is!&lt;br /&gt;&lt;br /&gt;There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver.  When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in &lt;a href="http://madwifi.org/ticket/1192"&gt;http://madwifi.org/ticket/1192&lt;/a&gt;.  That page gives a link to the driver source code and the compilation instructions are stored in &lt;a href="http://madwifi.org/wiki/UserDocs/FirstTimeHowTo"&gt;http://madwifi.org/wiki/UserDocs/FirstTimeHowTo&lt;/a&gt;.  I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one. &lt;br /&gt;&lt;br /&gt;After re-booting I have two devices - wifi0 and ath0.  iwconfig reports that ath0 has wifi extensions, so this looks promising.&lt;br /&gt;&lt;br /&gt;Tried iwlist ath0 scanning - it reported that the network was down.&lt;br /&gt;did ifconfig ath0 up.  Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...&lt;br /&gt;&lt;br /&gt;Had a look at &lt;a href="http://ubuntuforums.org/showthread.php?t=669267"&gt;http://ubuntuforums.org/showthread.php?t=669267&lt;/a&gt;.&lt;br /&gt;This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things?  Deactivated it..and rebooted again..&lt;br /&gt;&lt;br /&gt;To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:&lt;br /&gt;&lt;br /&gt;ath_hal: module license 'Proprietary' taints kernel.&lt;br /&gt;[  159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)&lt;br /&gt;[  160.035904] ath_pci 0000:08:00.0: PCI INT A -&amp;gt; GSI 18 (level, low) -&amp;gt; IRQ 18&lt;br /&gt;[  160.035939] ath_pci 0000:08:00.0: setting latency timer to 64&lt;br /&gt;[  160.534217] MadWifi: ath_attach: Switching rfkill capability off.&lt;br /&gt;[  160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)&lt;br /&gt;[  160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18&lt;br /&gt;[  198.800025] ath0: no IPv6 routers present&lt;br /&gt;&lt;br /&gt;At least there are no errors....but still iwlist reports no scan results.&lt;br /&gt;&lt;br /&gt;Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?&lt;br /&gt;&lt;br /&gt;The madwifi compatibility page pointed to this article:&lt;br /&gt;&lt;a href="http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01"&gt;http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01&lt;/a&gt;&lt;br /&gt;This talks about downloading the acerhk hotkey driver source and compiling it, but&lt;br /&gt;I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.&lt;br /&gt;I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on &amp;gt; /proc/driver/acerhk/wirelessled).  Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!&lt;br /&gt;&lt;br /&gt;It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.&lt;br /&gt;&lt;br /&gt;Now the procedure to get wireless networking working after boot is:&lt;br /&gt;modprobe ath-pci&lt;br /&gt;modprobe acerhk&lt;br /&gt;echo on &amp;gt; /proc/driver/acerhk/wirelessled&lt;br /&gt;ifdown ath0&lt;br /&gt;ifup ath0&lt;br /&gt;&lt;br /&gt;This needs automating!...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-5380845058897726582?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/5380845058897726582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=5380845058897726582' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5380845058897726582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/5380845058897726582'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/11/wireless-networking-in-linux-on-fujitsu.html' title='Wireless Networking in Linux on Fujitsu Siemens Amilo Li2727 laptop'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7179326057896764596</id><published>2008-10-23T22:14:00.000+01:00</published><updated>2008-10-23T22:57:02.790+01:00</updated><title type='text'>framework.system.filesystem</title><content type='html'>Making a bit of progress now - framework.system.filesystem look like it &lt;span style="font-style: italic;"&gt;should&lt;/span&gt; do what I want.&lt;br /&gt;I have tried this:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;     function buttonClicked() {&lt;br /&gt;&lt;blockquote&gt;    debug.trace("ButtonClicked");&lt;br /&gt;   fname=framework.BrowseForFile("*|*.*");&lt;br /&gt;   oFs = framework.system.filesystem;&lt;br /&gt;   alert("oFs="+oFs);&lt;br /&gt;        if oFs.FileExists(fname) {&lt;br /&gt;            alert("file exists!");&lt;br /&gt;            oFile = oFs.GetFile("/home/graham/Countdown.js");&lt;br /&gt;     oStream = oFile.OpenAsTextStream(1,-2);&lt;br /&gt;            linstr = oStream.ReadLine;&lt;br /&gt;            alert("ofile="+ofile+" linstr="+linstr);&lt;br /&gt;   } else {&lt;br /&gt;          alert("file "+fname+" does not exist");&lt;br /&gt;   }&lt;br /&gt;}&lt;/blockquote&gt;It looks promising - oFs is a real native object, which is encouraging, but I get an 'uncaught exception' error - still needs some digging into how it works!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7179326057896764596?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7179326057896764596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7179326057896764596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7179326057896764596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7179326057896764596'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/10/frameworksystemfilesystem.html' title='framework.system.filesystem'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-7790275928439550232</id><published>2008-10-22T21:56:00.000+01:00</published><updated>2008-10-22T22:00:37.254+01:00</updated><title type='text'>gadget.storage.openText()</title><content type='html'>A bit of progress with local file access.&lt;br /&gt;It is nice and easy to get a file browser to open to select a file name, using framwork.BrowseForFile().&lt;br /&gt;Still can't read it though.  The nearest I have found is gadget.storage.openText(), which works nicely reading files stored in the gadget .gg file, but I can't get it to open other files....&lt;br /&gt;Code for a simple button to demonstrate the above:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;function buttonClicked() {&lt;br /&gt;    debug.trace("ButtonClicked");&lt;br /&gt;    fname=framework.BrowseForFile("*|*.*");&lt;br /&gt;    debug.trace("fname="+fname);&lt;br /&gt;&lt;br /&gt;    file=gadget.storage.openText("main.xml");&lt;br /&gt;&lt;br /&gt;    alert("file="+file);&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;Unfortunately code.google.com seems to be dead, or I was going to ask on the developer's forum....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-7790275928439550232?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/7790275928439550232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=7790275928439550232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7790275928439550232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/7790275928439550232'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/10/gadgetstorageopentext.html' title='gadget.storage.openText()'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6042401333290389565.post-4936033183393227787</id><published>2008-10-21T22:39:00.000+01:00</published><updated>2008-10-21T22:49:44.957+01:00</updated><title type='text'>Google Desktop Gadgets</title><content type='html'>I've just discovered Google Desktop Gadgets.  This site is for me to record things I have tried, so I can find them again.&lt;br /&gt;Desktop Gadgets are simple javascript applications that run on Windows, Linux or Mac, which is neat.  I use the Linux version.&lt;br /&gt;&lt;br /&gt;A gadget is a simple zip file renamed to have a .gg extension.  As a minimum it needs to contain three files, gadget.gmanifest, main.xml and main.js. &lt;actually&gt;.&lt;br /&gt;&lt;br /&gt;gadget.gmanifest is a little file describing the gadget, so the Google Desktop application knows what to do with it.&lt;br /&gt;main.xml defines the user interface of the gadget.&lt;br /&gt;main.js is hte javascript code to provide the functionality.&lt;br /&gt;&lt;br /&gt;When you install a gadget you get a warning saying that the gadget is being granted access to the local file system.  This is good because the reason I am interested in them is that I have a web application which is a GPX route editor (&lt;a href="http://www.maps.webhop.net"&gt;http://www.maps.webhop.net&lt;/a&gt;) but I would like it to have access to the local file system so it can save its output file for you to put on your GPS device.  I think it should be possible to port the application to work as a Gadget so it will retain its network capability with local file access.&lt;br /&gt;It's just a matter of making it work.....&lt;br /&gt;&lt;br /&gt;I am struggling to make local file access work, never mind anything more complicated!&lt;/actually&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6042401333290389565-4936033183393227787?l=nerdytoad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nerdytoad.blogspot.com/feeds/4936033183393227787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6042401333290389565&amp;postID=4936033183393227787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4936033183393227787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6042401333290389565/posts/default/4936033183393227787'/><link rel='alternate' type='text/html' href='http://nerdytoad.blogspot.com/2008/10/google-desktop-gadgets.html' title='Google Desktop Gadgets'/><author><name>NT</name><uri>http://www.blogger.com/profile/05191458206760305309</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
