Runaway Inflation

The Bank of England released it’s quarterly inflation report today, and it paints a pretty gloomy picture. Inflation is set to exceed 3% for most of the rest of the year, obliging the Bank of England’s governor, Mervyn King, to write a series of explanatory letters to the Chancellor.

As part of their report, The Bank release a fan chart which projects the likely probabilities of a given inflation rate in future years. I thought it would be interesting to look back a few years and to see how accurate their projections were.

Thanks to the emergence of China as the world’s biggest manufacturer of goods, inflation was kept at bay during the late 90s and early 2000s, but at the beginning of 2005 it began to move upwards. The Bank’s central projection showed inflation rising above 2% during 2005 but falling back to below 2% in 2006.

Sure enough, it did do this. The Bank then projected a couple more blips above 2% before falling back to it’s 2% target in 2007…

Unfortunately, this time the Bank got it wrong, and rather than blip above 2%, inflation soared to 3%. The Bank thought this was only a temporary problem, and predicted that inflation would fall back to 2% by 2008.

Inflation did have a brief drop below 2% during 2007, but it now seems that’s its back well on its way toward 3% and beyond…

Water Conditioner Road Test

Background

Magnetic water conditioners are used to treat the effects of hard water. They work by creating a magnetic field that causes the calcium carbonate (limescale) that is naturally found in water to remain in solution, thus preventing it from furring up as scale inside water pipes.

Science

This method of water treatment is a controversial subject. Although they have long been used in industry, the science is not yet fully understood and so there is no authoritative word on how effective they are.

There is however, plenty of anecdotal evidence to suggest they work, and one UK based supplier, Water Improvements Limited, has even commissioned a laboratory trial by the Department of Chemical Engineering at the University of Bath to verify their effectiveness.

The trial was conducted over 30 days with two systems of copper pipes. One system was attached to a Waterimp water conditioner, the other was a control system with no conditioner. At the end of the trail there is a clear difference in the amount of deposition of scale on the two pipes.

Figure 1 shows the pipe system after 30 days with a waterimp attached.

Figure 2 shows the control pipe system after 30 days (no waterimp).

The trial found 3 main conclusions:

  • The device was shown to reduce the deposition of scale under the conditions tested. This was confirmed by analysis of both total dissolved solids (TDS) and conductivity in parallel trials using a simulated domestic hot water / radiator heating system.
  • The device prevented the deposition of approximately 10 mg of scale/day for 30cm length of 1 inch pipe under the conditions tested.
  • The device was shown not to effect the pH of water passing through piping where it has been installed.

Road Test

So, armed with this information and the wealth of positive testimonials that WaterImp have on their website, I decided to give their basic unit, the Elf, a road test. I live in a 3 bedroom property, so according to their site, this should be sufficient.

Southern England is mostly a hard water area and as a consequence our shower doors are constantly covered in a thin film of limescale:

I have now installed the Elf, coiled around my mains inlet pipe underneath my kitchen sink, and I plan to see over the coming months how well it does. Unfortunately for me, the mains riser in my house is located in a bit of an awkward position, with little access space. However, once I managed to get to the plug socket behind my washing machine, installing the unit itself was incredibly easy. Once it powered up, the LEDs flash happily in a variety of sequences to indicate the circuitry is functioning.

I will post the results of my road test later in the year. I’m aware that it doesn’t work for everyone, but hopefully I will be able to join the army of enthusiasts that swear by theirs, and banish limescale for good. Of course, the Elf comes with a generous 190 day guarantee so if it doesn’t work I can always send it back.

Asterisk – Outgoing calls rejected because extension not found

I had been having problems making external calls from my asterisk box. When I initially set it up, I used the asterisk-gui to setup a service provider for outgoing calls. This automatically appended the following context to extensions.conf

[numberplan-custom-1]
plancomment = Default DialPlan
include = default
include = parkedcalls
exten = _0XXXXX!,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
comment = _0XXXXX!,1,test,standard

However, since the default context for users is default, and the [default] context did not include this custom context, the calls weren’t being routed. This was giving the following error:

Call from '6000' to extension '08448160000' rejected because extension not found.

The simple way to fix it was to include the custom [numberplan-custom-1] context within the default context:

[default]
;
; By default we include the demo.  In a production system, you 
; probably don't want to have the demo there.
;
include => demo
include => numberplan-custom-1
exten => 1571,1,VoiceMailMain

Asterisk – Rejected incoming IAX connection

I was having trouble getting an inbound IAX connection to connect successfully to test my asterisk box. The asterisk console was showing the following error:

 Rejected connect attempt from 213.166.5.129, who was trying to reach '448448160404@'

After some hacking around it turns out that the username in the IAX address must match the [header] name in iax.conf, even though you specify the username separately.

E.g. if your iax address is something like IAX2/xxxx:[email protected] then your iax.conf defintion will need to be:

[xxxx]
type=user
context=inboundmagrathea
username=xxxx
secret=password

I also added the inboundmagrathea context to extensions.conf

[inboundmagrathea]
exten => 448448160404,1,Dial(SIP/6000)
exten => 448448160404,2,Hangup

Learning Asterisk

In preparation for the launch of a new Fubra VOIP service later this year, I decided that it would be wise if I knew a little more about asterisk (our chosen PBX software). Although I’m not building the underlying phone system (we have an asterisk expert working on that), nor the user control panel (our in-house developers will be doing that), I think it’s always helpful as a director of a technology company to have a fairly in-depth knowledge of your systems.

So over the next few weeks I will be installing an asterisk PBX at my house, and setting it up to make and receive calls via VOIP to the PSTN and beyond.

We’ve been using asterisk in our office to power our phone system since 2005, and so I’ve gotten pretty good at configuring Snom phones and other sip devices, but this is the first time I will have actually tried to setup an asterisk box from scratch.

Setting up asterisk-gui on Ubuntu

Tonight I had a go at installing Digium’s asterisk-gui. I followed some instructions from Asterisk Guru, but then had to apply a fix at the end because the static-http folder was in the wrong place.

Installation Instructions

Download the asterisk-gui source code from SVN:

mkdir -p ~/downloads/asterisk-gui
cd ~/downloads/asterisk-gui
svn checkout http://svn.digium.com/svn/asterisk-gui/trunk .

Compile the source code:

./configure
./make
./make install

Backup your asterisk config:

cp -r /etc/asterisk /etc/asterisk.backup

Install the sample settings if you wish (this adds things like a list of VOIP providers to use as a PSTN gateway).

./make samples

Edit /etc/asterisk/manager.conf to enable the web management interface and to add a user:

enabled = yes
webenabled = yes
[administrator]
secret = YoUrPaSwOrD
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Edit /etc/asterisk/http.conf to enable asterisk’s mini webserver. If you are accessing from your local machine use 127.0.0.1 otherwise you might want to bind to a public ip, but be aware this is less secure.

enabled=yes
enablestatic=yes
bindaddr=127.0.0.1

Run make checkconfig to verify your configuration settings:

./make checkconfig

I then had to do an additional step to link the static http scripts folder to inside /usr/share/asterisk as it seems asterisk was looking in here instead of /var/lib/asterisk/

sudo ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/

After that you should be able to login to the control panel at http://127.0.0.1:8088/asterisk/static/config/cfgbasic.html (replacing the IP address with whichever one you chose).

Missing asterisk config files in Ubuntu / Debian

If you install Asterisk on Ubuntu via apt-get, and then remove it and re-install again, you may find that you are missing the all the config files in /etc/asterisk.

This is a bug in the debian asterisk package that means that the config files are deleted when you remove the asterisk package even though they are part of the asterisk-config package.

To fix it simply run the following commands: (NB: This will nuke any asterisk installation you have)

sudo dpkg --purge asterisk
sudo dpkg --purge asterisk-config
sudo apt-get install asterisk-config
sudo apt-get install asterisk

Mobile Broadband Market Roundup – May 2008

It’s been 8 months since I posted my last summary of the mobile broadband market in the UK, and things have developed fairly rapidly since then. In November, O2 launched the iPhone with unlimited Internet access along with some competitive USB dongle packages. Orange have also now joined in the fun, which means that all 5 major UK networks have a reasonably priced mobile broadband offering, compared to only 3 of networks in September 2007.

The time I’m going to separate the tariffs into 2 sections. The first shows the prices when added to a standard voice tariff. The second shows the prices for a standalone mobile broadband account (e.g. through a data card or USB modem).

NB: For this study, I’m only interested in the cheapest “unlimited” packages offered by each provider, as there are too many tariffs if I list every one.

Mobile broadband + phone packages

Network Tarrif Speed Inclusive Data Price
O2 iPhone contract + data pack 200-300 kbps? Unlimited Free with contract
T-mobile Web’n’Walk Plus with Phone contract 1.8 mbps 3 GB / month Normal contact + £7.50/12.50 per month (phone only/phone+laptop)
Three X-Series up to 2.8 mbps 1 GB / month Normal contact + £5.00 per month
Vodafone Phone contract + data pack 7.2 mbps? 500 MB/month Free with contract

With the Vodafone and 02 iPhone tariffs above, I’m unsure whether these can be used as a modem for a laptop or computer. It is certainly technically possible to use an iPhone as a modem. If anyone knows any more on this please add a comment to this post.

Mobile broadband only packages

Network Tarrif Speed Inclusive Data Price (Device + Monthly)
O2 USB Modem – Mobile Broadband (18 months) 1.8 mbps 3GB / month Free + £20 per month (O2 customers only)
Orange USB Modem – Mobile Broadband (18 months) 1.8 mbps 3GB / month Free + £15 per month
T-mobile Web’n’Walk Plus USB Modem / Data card (24 months) 1.8 mbps 3 GB / month Free + £15 per month
Three USB Modem – Broadband Lite (18 months) 2.8 mbps 1GB / month Free + £10 per month (or £5 per month for existing customers)
Vodafone USB Modem – Mobile Broadband (24 months) 7.2 mbps 3GB / month Free + £15 per month

Summary

As you can see, £15 a month for 3GB transfer seems to be the most common price point, but you can get it as low as £5 a month from Three if you have an existing mobile contract with them. If you don’t need (or have) a phone line or Sky TV, then at these prices mobile broadband is probably now the cheapest way to get online.

Installing phpMyAdmin Advanced Features on Ubuntu

phpMyAdmin

To install the advanced features of phpMyAdmin you have to create a special control database that PMA uses to store bookmarks and relationships etc… PMA comes with a script called create_tables.sql that contains the relevant sql statements to set these tables up. Normally, when you install phpMyAdmin directly from source, this create_tables.sql script can be found in the scripts sub-folder.

Today I was feeling lazy so I decided to use apt-get to install PMA on my Ubuntu machine. However, when I went to enable advanced features, the scripts sub folder was pretty much empty (except for a setup.php script). It seems that with the debian package the advanced feature scripts have been moved to /usr/share/doc/phpmyadmin/examples – It took me ages to work this out, so hopefully this post might save someone some time!

Instructions
Firstly, unzip and run the create_tables.sql file:

cd /usr/share/doc/phpmyadmin/examples
sudo gunzip create_tables_mysql_4_1_2+.sql.gz 
mysql -u root -p < create_tables_mysql_4_1_2+.sql

Then setup a user/password for phpMyAdmin to use:

mysql -u root -p -e 'GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost' IDENTIFIED BY "password"'

Then edit the config file, and uncomment the advanced features options for your chosen server, and add the user / password you setup in the previous step. If you haven't edited this file before you may need to also uncomment the rest of the server definition.

sudo vim /etc/phpmyadmin/config.inc.php

Army use Xbox-like controller to fly Desert Hawk 3 UAV

In November last year, I saw an advert in which the British Army appeared to use an Xbox controller to fly a miniature UAV. A few people commented on my blog on whether they thought this was real or not, so I decided to find out for certain by sending a Freedom of Information Act request to the Army.

Today I received a reply from the Army Recruiting and Training Division. You can see my original post for the full response, but in summary it confirmed the following points:

  • The UAV shown in the advert is a Desert Hawk 3, which is currently deployed in Iraq
  • The plane uses an XBOX-like controller, but it is not exactly the same. Specifically, it does not have any Microsoft branding nor a wired headset port.
  • The advert was specifically designed to show people that (gaming?) skills developed prior to joining the Army can come in useful during current operations.

I’m actually pretty satisfied with their response. To be honest, after receiving a somewhat negative answer from the press office when I first enquired I was expecting more of a fight before they gave anything away.

Desert Hawk 3 Facts

Length: 36 in./91 cm.
Wingspan: 54 in./137 cm.
Wing area: 504 sq. in./1283 cm.
Empty weight: 6.5 lbs./3 kg.
Payload growth: Up to 2.0 lbs./ 1 kg. or 288 cu. in./ 732 cu. m. 
Endurance: 90+ min.
Portability: Backpack or small suitcase 
Operational range: Up to 15 km./9.3 mi. depending onfrequency and configuration