02 / Be enables my local exchange

I’ve been on their waiting list for over a year, and it’s too late for me as I’ve moved house now, but today Be e-mailed me to inform me that they had enabled my local Farnborough exchange for their service. This means Farnborough residents can now get up to 24Mbps downloads and 2.5mbps uploads using Be’s ADSL 2+ modems.

Be Availabillity E-mail

The 2.5mbps upload utilises Annex M of the ADSL 2+ standard and is only available to people who’s whose phone line is less than 2km in length from the exchange. For other users the upload speed is up to 1.3mbps.

I checked and it seems that the Aldershot, Camberley and Farnham exchanges are also now live on Be’s network. If we weren’t about to get a 100mbps fibre connection from NTL I might have considered bonding a few of these together at the office.

Residents of Rushmoor are now fairly privileged in the broadband stakes with multiple offerings available at over 20 Mbps (Virgin Media), and 50mbps on the horizon for 2008.

2008… the year of the Electric Car?

Let’s face it, cars aren’t going to go away. As a means of private transport they are extremely popular for their convenience, comfort and the personal freedom they offer their owners, so anyone who suggests that we should all give them up and use public transport instead is mad. However, there is no denying that they do pose a problem. And that is that, collectively, cars account for 12% of all CO2 emissions in the EU and thus they are one of our biggest sources of carbon pollution.

So how can we keep our beloved cars, without contributing to global warming? For me the answer lies with Electric Vehicles that are recharged from a renewable energy source. You may think that this vision is still 10 years or so away, but you’d be wrong.

Electric cars are here now, albeit for fringe users, but within the few years the mix of economics and technology might just be right for the average motorist to join in too. In this post I’ll be examining what is current available, plus what’ll be around in the near future and how the cost of running an electric vehicle compares to it’s gas guzzling cousins.

Cost Comparison

Car Capacity Range EPM

eMPG Cost per Mile
Reva G Wiz 9.6 KWh 48 miles 0.2 KWh/m 218.5 0.99p
Mitsubishi i-ev 20 KWh 100 miles 0.2 KWh/m 218.5 0.99p
Phoenix Motors SUV 35 KWh 100 miles 0.35 KWh/m 124.9 1.73p
Tesla Roadster 53 KWh 250 miles 0.212 KWh/m 206 1.05p
Lightning Car ? ? ? ? ?

  • A UK imperial gallon of petrol contains about 43.7 kWh of energy
  • A litre of petrol contains 9.6 KWh of energy @ 100% conversion efficiency
  • Equivalent Miles per Gallon (eMPG) = 43.7 (kwh/gallon) / energy per mile
  • Energy per mile (EPM) in kwh/mile = Capacity (kwh) / Range (miles)
  • Cost per mile = EPM * price per kilowatt hour
  • Price per Kilowatt hour = 4.95 pence (off peak, green energy)

Reva G Wiz
Reva G Wiz
Mitsubishi i-EV
Mitsubishi i-EV
Phoenix Motors SUV
Phoenix Motors SUV
Tesla Roadster
Tesla Roadster
Lightning Sports Car
Lightning Sports Car

Real media to Xvid (divx) and cropping with Ubuntu

If you liked my last post on how to save real player streams and convert them to mpeg 4 avi files, then you might find this post useful.

Today I needed to save a real player stream of last night’s 10 o’clock news from the BBC and then convert it into an xvid file. I also wanted to crop it down to just show the particular news item we were interested in (a feature about one of our sites). This is how I did it:

  1. First follow the steps on how to install mencoder and then dump the ram stream as per my previous post.
  2. Next convert the dump file to xvid with the following command:

    mencoder stream.dump -o bbc-10oclocknews.avi -ovc xvid -xvidencopts bitrate=128 -oac mp3lame

  3. Now use Avidemux to crop the video file. If you haven’t already got this program you can install with

    sudo apt-get install avidemux

  4. Open the video file with Avidemux, and then ensure the video and audio are in sync by selecting Audio > Build VBR timemap from the menu.
  5. Use the selection Markers to chop out bits you don’t want (or select the bit you do want), and then save the resulting video with File > Save > Save Video
      And that’s it! Here is the resulting file:

Google launches “My Location” – bring on the blue dot

As many blogs have been reporting today, Google has launched a new feature for their Google Maps for Mobile service called “My Location”.

My Location is simple; it shows a little blue dot on the map to represent your current location. However, the really clever part is that GPS is not required for this to work.

Google are able to calculate your approximate location by reading which cell tower (that’s mobile phone mast to UK readers!) you are connected to, and then looking up the co-ordinates of this tower in a central database.

I tested it out at home and it plotted me on the map to within 1700 metres of my actual position. If you do have GPS then it works even better. Enabling GPS on my N95 improved the accuracy of the blue dot to within 60 metres.

Geo-locating Cell Towers

The process of geo-locating the phone masts / cell towers is fairly simple. Each mast will have a unique identifier (such as a MAC address), so all you need is a GPS/GSM enabled device that records the signal strength and co-ordinates as it passes each mast. With a few samples you can then triangulate the approximate position of the mast.

Here are a few of the projects I found that are attempting to geo-tag wireless networks:

  • Intel have been running a research project for a while called placelab, whose aim was to build a database of locations for WiFi access points and cell phone towers.
  • A community based project called WiGLE is concentrating purely on 802.11b networks and has currently over 12 million access points in its database!
  • GSMLoc is an open source project that aims to locate GSM towers all over the world.

At this point it’s not clear where Google got their database, but it seems to be fairly comprehensive!

Virgin Media 20 Meg Speed Test

I have to say that I’m pretty happy with my Virgin Media broadband connection. It’s been very stable since it was installed about 5 months ago, and the download speed is fantastic for large files (see below).

There is however one problem, and that is latency.

64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=130 ttl=53 time=19.8 ms
64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=131 ttl=53 time=32.1 ms
64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=132 ttl=53 time=17.9 ms
64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=133 ttl=53 time=18.3 ms
64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=134 ttl=53 time=34.3 ms
64 bytes from linx1.thn.fubra.net (195.66.225.33): icmp_seq=135 ttl=53 time=24.9 ms

--- linx1.thn.fubra.net ping statistics ---
135 packets transmitted, 134 received, 0% packet loss, time 134014ms
rtt min/avg/max/mdev = 16.495/24.077/51.969/6.580 ms

Ping times fluctuate wildy from 16ms up to about 50ms. When I had their 10MBps service, I definitely remember getting sub 10 millisecond pings, but with the 20Mbps service they are taking twice as long. I guess the central pipes are just a lot more congested nowadays.

Converting RealPlayer .rm files to MPEG (mp4) .avi with Ubuntu

You will need mplayer and mencoder, as well as the win32 codecs in order to convert .rm files to their mpeg equivalent. So if you haven’t already got them installed you can get them with:


sudo apt-get install mplayer mencoder
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar jxfv essential-20071007.tar.bz2
sudo mkdir -p /usr/lib/win32
sudo mv -i essential-20071007/* /usr/lib/win32/

Next you need to download the realplayer feed you want to convert. First of all download the realvideo file you want and then view it to see the realtime streaming protocol (RTSP) url inside:


wget http://www.bbc.co.uk/england/realmedia/politicsshow/south/bb/politicsshow_16x9_bb.ram
cat politicsshow_16x9_bb.ram
// displays something like rtsp://rm-acl.bbc.co.uk/england/politicsshow/south/bb/politicsshow_16x9_bb.rm

Now you can use mplayer to dump the stream to your local disk:


mplayer -dumpstream rtsp://rm-acl.bbc.co.uk/england/politicsshow/south/bb/politicsshow_16x9_bb.rm

This will take as long as it would take to view the stream normally. Once it’s finished you can then use mencoder to convert the stream to your required file format. To have H264 (mpeg 4) video, and mp3 audio you would use:


mencoder stream.dump -o bbc-politics.avi -ovc x264 -oac mp3lame

You can get a list of all supported formats with mencoder -ovc help.

Multi-process CLI scripts with PHP

I’ve been wanting to write a multi-process command line script in PHP for a while now, and tonight I finally got round to it. Proc_open() is really useful if you want to run a batch of commands simultaneously, such as querying the A records for multiple domain names, or running a bunch of whois commands.

Anyway, in the following example I’ll show you how to lookup the A records of a number of Google’s domain names in parallel:

You’ll notice there are two foreach loops. In the first we simply “launch” our commands, without waiting for any response from them. In the second, we iterate though and grab the output of each command in sequence until an end of file character is received.

Upgrading WordPress with Subversion

Besides being a useful tool for software developers to keep track of their source code versions, Subversion also provides a quick and easy way for users to install/upgrade software such as blogs, wiki’s and forums that are constantly being updated with new features and security patches.

However if, like me, you initially installed WordPress manually by downloading the zip file and extracting the files, you will first need to do a little bit of work to link your software in to the subversion repository.

Assuming your wordpress installation is in a folder called blog, you can get it working with the following steps:


# backup the original blog folder
cp -Rp blog blogBACKUP
# create a new folder
mkdir blogNEW
# checkout the latest version of wordpress from their subversion repository
svn co http://svn.automattic.com/wordpress/tags/2.3.1/ blogNEW/
# copy in any custom changes in wp-content and also the wp-config.php file
cp -Rp blog/wp-con* blogNEW/
# copy in the .htaccess file if you have one
cp -Rp blog/.htaccess blogNEW/
# delete the original blog
rm -rf blog
# move the new blog to your blog locatio
mv blogNEW/ blog
# finally run the http://yourdomain/blog/wp-admin/upgrade.php script in your web browser

Once you’re linked into a Subversion repository, future updates can be applied by simply running:


svn switch http://svn.automattic.com/wordpress/tags/2.3.2/

Where the url given is the subversion repository location of the new version you wish to upgrade to.

NB: After every update, you should go to http://yourdomain/blog/wp-admin/upgrade.php in your web browser as their may be some database tables that need upgrading.

123-reg nameserver problems

There has been a problem with 123 reg’s nameservers for most of today such that they aren’t responding to DNS queries.

This is pretty severe as it means anyone trying to access a site pointed at those nameservers will not be able to resolve the domain name to an IP address, and will be given a Server not found error. It will also affect any e-mails to those domains.

On their status page, they say:

17/11/2007, 09:15 – We are currently aware of a problem regarding 123-reg nameservers which in turn is affecting the visibility of websites and services such as email. At present, we have engineers looking into this as a matter of urgency. Please be assured we are working to rectify this issue as a priority and hope to resume normal service as soon as possible. Thank you for your patience in the mean time. We apologise for any inconvenience caused.

If you are looking for a new registrar, you could try our Livetodot domain registration service.

T Mobile lock in = no iPhone for me….. yet

I’m pretty jealous… Brendan picked up his new iPhone yesterday and has been flashing around the office all day.

iPhone

I have been telling myself since the iPhone launched that I would wait until the 3G version (hopefully) comes out next year, but after seeing Brendan effortlessly read his e-mails, speedily tap out text messages, listen to his iTunes library and read his visual voicemails on a beautifully huge touch-sensitive screen…. I just couldn’t wait.

So I phoned T-Mobile:

“I want to cancel my account to get an iPhone with O2… how long is left on my contract?”

“You’ve still got 8 months I’m afraid sir….”

“Really, that long? How much to buy myself out of the contract?”

“It will be 322 pounds sir.”

“Oh, can I downgrade to a lower tarrif?”

“Not until month 11 sir”.

So T-mobile have decided for me. If I could have bought out my contract for say, £100 then I might have done it but £300 (plus £269 for the phone itself) is just too much. Looks like I’ll be waiting for the 3G iPhone 2 after all.