So recently I’ve been messing around with IPv6. Probably a good idea, seeing as IPv4 space is runningoutfast.
The Computer Networking module at my university didn’t seem to cover IPv6 in any great depth. It appears Surrey University haven’t even thought about providing IPv6 DNS records to any of their servers yet. But they do allocate IPv6 addresses to every user on the network (WiFi and ResNet I’ve found so far, but not the lab computers).
I decided to try and get IPv6 rolled out across all the domains on my VPS (perfectly hosted by bitfolk). This involved configuring IPv6 addresses for my VPS’ network interface, adding IPv6 AAAA records in my DNS server, setting up reverse DNS records for the IPv6 addresses I use, and making sure that my name servers have IPv6 AAAA records and glue records at my domain registrar. My VPS provider assigns each VPS a /64 of IPv6 space. I think that will be plenty of IP addresses for my needs
First problem I encountered was I failed to set up ip6tables correctly. Being used to using the simple ufw, which manages iptables for you, I had failed to think that ip6tables was filtering and then dropping my IPv6 packets! So once I understood properly how iptables worked, I was able to open up IPv6 traffic to my VPS (thanks @grifferz). Next I assigned 4 IPv6 addresses to my network adapater, after disabling auto configuration for IPv6.
I then added AAAA DNS records for the domains I host. So if you have IPv6 connectivity, you should now be viewing this blog over IPv6! AAAA DNS records are just like the A records but instead point to an IPv6 address, rather than IPv4. I then made sure that I had AAAA records for my DNS servers too.
Now my email. I have used Google Apps to host my email for a few years now. The main reason I use them is their excellent spam filter. But I was quite surprised to find that the MX servers they ask you to use aren’t IPv6 ready. And I can’t see anywhere that suggests this will be available in the near future.
I’ve been following through the he.net free IPv6 certification to make sure that I’m doing everything right. It’s been good to check that I’m doing everything correct and to understand what exactly I’m doing. Their tunnel service has also been useful for testing.
But by going through their free certification, I discovered glue records. I had always wondered how some domains have name servers defined under the same domain. For example andrewgee.org now has a name server of ns1.andrewgee.org. Glue records allow you to define these name servers at the registrar of your domain, by supplying the IP address of the name server. Now this doesn’t seem to be a widely supported feature, with few registrars allowing both IPv4 and IPv6 addresses for a name server. I’ve found a number of registrars that claim to, but I’m still waiting for their support departments to ensure this works for .uk domains.
So it hasn’t been a wasted easter break so far. I’d better get to some coursework soon, though.
So as I’m trying to make an effort to start being more productive again, I’ve kicked this off by packaging my python application, GPX Viewer, for Debian. Last year, I created GPX Viewer to read GPS trace files in the GPX format, calculate some stats, and display the trace on a map.
I started packaging it for Debian/Ubuntu last summer, but sort of forgot about it. But at the weekend I finished it off and submitted it to the Python Applications Packaging Team, where a Debian developer (Piotr Ożarowski) kindly reviewed my packaging, advised of a few tweaks, and then sponsored my package for the repositories.
So I upgraded to Ubuntu karmic a few weeks back. To my horror, I found that the PC Speaker has been disabled. I like the use of the PC Speaker, for irssi and my email. It’s very handy. I seem to be one of the few people that feel like this. Anyway… After a few weeks, I’ve finally worked out how to enable it again Yay!
Open up /etc/modprobe.d/blacklist.conf
gksudo gedit /etc/modprobe.d/blacklist.conf
(Use kdesu rather than gksudo, in KDE)
Comment out the following lines, by placing a # at the start:
Save and exit.
Load the modules manually, rather than restarting
sudo modprobe snd_pcsp
sudo modprobe pcspkr
It could work now. Have a try. If not, you may have to change a gconf setting. To do this:
Load the gconf editor:
Navigate to /desktop/gnome/peripherals/keyboard
Adjust bell_mode to on
Edit: Now this did originally work for me, but it stopped after I rebooted and snd_pcsp was making the pc speaker make strange noises. So I’ve tweaked it a bit.
Blacklist the two modules again in /etc/modprobe.d/blacklist.conf
Open up /etc/rc.local
gksudo gedit /etc/rc.local
Before the exit line add these two lines:
The end. It REALLY should be working now. Good luck!
So, I’ve been using MythTV recently. I have my master backend upstairs, with all of the storage. And then downstairs is the slave backend with the three tuner cards. Soon after setting all of this up, I found that I was going to run out of disk space for recordings pretty quickly.
Therefore, I bought three 750GB hard disks to complement the one 750GB disk that I had already. And I decided to get a bit of RAID 5 set up. I didn’t trust the fake raid card in my server box, or even believe it was supported in Ubuntu. So I had a look into software RAID. It looked pretty good, so that’s what’s setting up now.
I was a bit shocked to see the packaging Scan.co.uk sent the hard disks in, as you can see. There is also a hard drive mounting kit for a optical drive bay in there as well. Luckily, nothing seems damaged, so let’s hope it stays that way!
And this is the process I am following to get all of this organised and set up…
Connect up all the new hard disks
Format the new disks and set the RAID flag
Create a new blank RAID array with the three disks
Transfer all the old data onto the array
Change the /var/nas mount point to the new array
Format the old disk
Add the old disk to the array and expand the array
Expand the file system
It’s taking time, but it’s coming along. I’m at step #7, and it looks like it’s going to take a while. It’s at 3.9% and has an estimated time of 869 minutes left. Should give me a chance to do something useful.
Noticed anything different about the blog? I hope not, as I’ve made a smooth transition to using my own VPS provided by Bitfolk. Yay! But that’s the topic of another blog post!
I’ve made a little app, with Python. This app opens up GPX trace files and allows you to view them on a map, and view basic stats. For those who don’t know, GPX files, are tracks recorded by a GPS device. Making tracks with a GPS device lets you review your journey later.
As you can see, and can possibly recognise, the trace is drawn on an openstreetmap map. This was made possible thanks to John Stower’s brilliant openstreetmap GTK widget with Python bindings. (I’ve packaged this GTK widget up for Ubuntu and it was accepted in. That was my first packaging, which I will talk about in a future blog entry!)
I’m going to work on Ubuntu and Debian Packages very shortly, so it’s easy to install. Are you a packager for another distribution? Would appreciate it if you’d package this up for me. It would be great if you let me know if you are going to do this.
Translations. This program is fully translatable on Launchpad at http://translations.launchpad.net/gpxviewer – Go ahead and check it out, if you know another lanuage and want to help out! Shouldn’t take too much effort, as there’re few strings to be translated at the moment!
Leave a comment to let me know what you think of the application.
Woke up this morning. Snow outside. Listened to local radio station for school closures. Practically every school read out, apart from mine. Head to school at 8. Get sent home. As getting back, the school finally is read out on the radio :p
At about 9AM, I decided to set up my Nokia N95 propped up pointing out of my window looking at the drive and road. I used the time lapse function of the camera application, to capture a picture every 30 seconds (later changed to 10 seconds). This ran from 9AM til it got dark, so you can see the snow melt away, and then slightly come back towards the evening.
Once I downloaded all the pictures, I made a quick batch script to re size the images to 640×480 and rename them into a nice sequential set of file names. I then fed all of these into a ffmpeg command I carefully constructed:
Now it looks as though I’ll probably be going into school tomorrow, even though I’m supposed to be going to a University Interview at Southampton. Probably not the best idea to drive there!
So I haven’t blogged for a while. I have some stuff I can blog about though, which I’ll get around to. First, I made a package for Ubuntu and it’s been approved! It’s a GTK widget that lets developers embed openstreetmap in applications – With Python Bindings!
Another thing to blog about is the application I’m creating with the packaged GTK widget, which lets users analyse GPX traces.
Fingers crossed for more snow! Bye!
Edit: Made the Echo website!! http://www.bournemouthecho.co.uk/news/4096055.FRESH_SNOW_AND_ICE_THIS_MORNING_ACROSS_DORSET/
In my last post, I was talking about how I had made a nice little radio automation app in python. Since then I’ve completely restructured it and it is now split into a frontend and backend, which communicate with XML-RPC (yay for the xmlrpclib module). But the website to go with this project is not that great. The other day I went back to look at the website so far, which I had originally written in PHP. I got annoyed with how disorganised it was and decided to rewrite it in django. Oh. And I just prefer python coding over PHP now
I’ve been trying to learn django on and off for ages now. I usually lose concentration after the first two parts of the tutorial. But this time I had a purpose – the website. I’ve found the best way, for me to learn a new language, is to take a tutorial telling me how to make another project, but apply it to my own project. So I installed the SVN version of django and I’ve zoomed through a lot of django learning now. It’s great. It’s all nicely arranged and modular, which is something I’m liking more and more as my programming skills have developed and perhaps lazyness, when re-using code
I’ve also been using subversion to keep the code organised. I would have used bazaar if there had been a webdav plugin that worked with the current version I have. I suppose I’ll have to wait for intrepid for that then. subversion is serving me well though. I just got to get the person that’s supposed to be helping me to actually help me. Yes, that’s right – I’m looking at you Stephen.
Within the past year, my school has started to become very involved in trying to start it’s own radio station. We’ve had a large amount of money put into it and it’s slowly growing. We have the software that all the professionals use, and all of the equipment too.
But now I’m moving on to developing an automation application for the time that there isn’t a show on air. This will be similar to Southampton University’s radio station automation system (http://surgeradio.co.uk).
I’m using a combination of python and gstreamer. The feedback so far from the teacher involved, with our radio station, is good. The only problem is the network technician that is a Windows Server user. I think I’m going to have a problem, when I ask for a linux server to host the automation server, streaming, file server, and website. I expect he’ll wonder what’s wrong with his little sharepoint setup, he has going. Hopefully I might be able to do some persuading to get past that, but it’s not going to be easy. I understand the problem that this would cause though. I’m the only one with the skills to maintain the linux server. When I leave next year, I doubt they will have a clue how to operate the server, as I don’t think they have no knowledge of Linux. Anyway, that’ll be fun to try and sort out. Any suggestions?
At the application side, it’s coming along well. I’ve made a website that will allow listeners to request songs to be played. These requests are popped into a MySQL database. From here, my python app checks for new requests after every song. If there is a request, it’ll play that. If not, it’ll choose the next song from a pre chosen list. Nifty, aye?
I was amazed at how quick it was to develop in python, as this is my first real programming project in python. It was so simple to get a basic set up done. I had it done within a night! Jono Bacon’s excellent guide on gstreamer in python helped me well. The app now also has a nice little GUI, made in glade, that’ll help the DJs turn the automation on and off.
For the hardware setup, I’m looking to get the server, that I mentioned, and a few high quality sound cards, that’ll provide balanced audio in and out. I don’t think we’d need much processing power for the encoding of the streaming, as I’ve done a few test runs with my old Pentium 4 clocked at 1.8GHz.
All I have to do is finish it all up now… And perhaps do some of my many pieces of homework!
After watching recentSystmepisodes, I decided that I would try and get into electronics. The most specific part that I decided I wanted to get into was the AVR programming. But before I get to that, I decided that it would be a good idea to learn how to solder first!
Off I went to a Maplin store. You walk into maplin and you are instantly greeted with millions of electronic things, of which I didn’t know what they were. Walking around there, for a while, I discovered some electronic kits. These “make your own” kits are manufactured by Velleman, and I can recommend them.
So after browsing through the many different kits, I ended up choosing a Clap activated switch. Whilst I was there, I grabbed a soldering iron stand, as I already had the soldering iron + solder.
Opening the kit presented me with millions (ok, 20) resistors, and a bunch of other electronic parts. Two days later, and the solder sucker having to be used occasionally, the kit was finished. One thing I forgot to purchase was a transformer to plug it in with. After visiting maplin I came home and found the transformer was faulty. It is one of those changeable voltage transformers. This one, however, would only work when set to 6 volts. After getting a replacement, finding that it was faulty too, buying a different one instead, I finally got the clap switch to work.
And am I surprised that it worked first time? Well… Yes!
Update: Since writing this blog entry many developments have happened with mobile internet under linux. These days you can just plug and go. NetworkManager will even help you find the right settings. However, I haven’t tested this particular mobile broadband pcmcia card with recent versions of Ubuntu, but assume that it works well. Leave a comment if you have any problems
First off, I realise that I haven’t posted a blog entry in a while now. I don’t know why I haven’t, as I’ve had plenty of time, it being the summer holidays and all. I always find my self wanting to do so much stuff in the summer holidays, and somehow turn up doing hardly anything. ‘Tis a shame.
After reading this mailing list post on ubuntu-uk, I was surprised these 3G datacards actually worked under ubuntu. Therefore, I instantly zoomed off to ebay and purchased one for £34 + postage. I made sure it said unlocked in the ebay listing, as I currently have a virgin mobile sim card and didn’t want to waste/switch to vodafone.
So the datacard turned up and I popped my phone SIM in it. Following the guide that was written in the mailing list, I configured it. This was using kppp. So I made everything was in there right and tried to connect. One problem though. Everytime I tried to connect kppp would lock up instantly. “Ah dear”, I though.
After much researching, I managed to set up the datacard using gnome-ppp, which is equally, if not more, easier to set up the datacard in. And here is a little guide I’ll write in full for you…