Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Home Flub SIP Phone

As you may have read I recently acquired a BT Home Hub (or ‘flub’ on account of its security credentials) for the pretty sum of £8 delivered. What does this mean? Well you can look at it one of two ways I suppose, the first way is it’s a crap router that is terribly insecure by default. The second way you could look at it is something that with a little bit of work, can become very useful and a very cheap alternative to many things. What do I mean by this?

  • Well, it has an FXS and a Pseudo-FXO port, meaning it’s a SIP ATA.
  • It comes with a DECT handset and handles SIP stuff, meaning it’s a cordless SIP phone.
  • It can be forced into client mode, meaning it’s a wireless->wired bridge.
  • It can serve as a repeater or if you like, a second wifi AP (Stick it on a vlan with wep and use for devices that only support WEP, many older embedded devices, for instance).
  • …the list goes on.

Anyway, I’m babbling, the point is for under a tenner this is a very useful device, there must be a downfall, right? Well yes, by default it is locked to the BT network for just about everything but with some work you can sort this, coming back to the security aspect of it.

Here I will cover getting it working with a sip server other than the one BT provide, forcing it to use ethernet as the WAN port instead of the ADSL modem. Before we start I want to make it VERY clear that putting the flub on a DMZ as some instructions suggest is an insane idea, by default this would expose telnet, and the httpd which reveals quite a bit of info even before login. Forward the correct ports (ie: SIP, RTP and if required STUN) and be done with it, put it on a DMZ for testing if you must. It is also wise to disable things you don’t need (Like, in this instance, why would we need wifi?)

The first thing we must do is reset and downgrade to 6.2.2.6 (the version numbers can be a little misleading, mine came with 6.2.2.E (IIRC) which is somehow later than 6.2.2.6, the reason for this is in later firmware BT got rid of the telnetd. To do this grab the BT Recovery Utility1 and extract it to a flash drive (For some reason it seems to fail if not run from a flash drive, I have no clue why) it is a windows application but I shall test with WINE at a later time. Unplug everything apart from power and connect ethernet 1 (ethernet 2 will cause it to fail) to your host computer (with a static ip address set) and run the recovery utility, hit next a few times and wait, when done wait until the lights remain solid and reset (Hold the wireless association button on the rear of the flub for > 20 seconds until ALL the lights on the front are solid or flashing), give it 5 minutes for the lights to reset to take place and the lights to stabilise, done.

Now we can get to actually doing something, the first step is to get in and get ourselves a nice root account, telnet in (the flub ip by default is 192.168.1.254, but you knew that when you checked ipconfig, right?) when prompted for auth both the user and pass are “admin”, why this account is called admin I’m unsure, it should probably be called “mildly unrestricted account” so let’s get root. Now by default you cannot add users because, well, it’s restricted but thanks to the terribly insecure scripting system on the flub, we can get root via:

script add name=hazroot command="user add name=root password=xxxxx role=root descr=root"
script run name=hazroot pars=""

There we go, if that ran correctly, we have root, exit the telnet session and telnet in again using the root user you just created, now let’s lock it to 6.2.2.6 and avoid BT’s autoupdating, which I believe only affects users on BT and we will be connecting to another router anyway, but it’s best to make sure:

cwmp config state=disabled
cwmp config periodicInform=disabled
config save filename=user

Ok, that’s sorted we need to set the ethernet port as the WAN port otherwise the flub is going to want to be connected via a BT ADSL line (BOOO!) this is simple enough remember the 192.168.1.1 address should be your routers address, if not, change the following lines to represent your routers ip address(making sure they’re on the same subnet):

ip rtadd dst=0.0.0.0 gateway=192.168.1.1 intf=LocalNetwork
dns client dnsadd addr=192.168.1.1
dns server config WANDownSpoofing=disabled
dns server route add dns=192.168.1.1 intf=LocalNetwork
voice config intf=LocalNetwork
system config defaultconnection=LocalNetwork

Woot! Now that’s done we can get to adding our SIP details, you will obviously need access to a SIP server, and probably a DID number to make it useful, both2 and3 offer this for free.

Ok, let’s get it sorted, we need to add a voice profile, I’m going to assume you have registered with localphone but you should be able to work out the settings for other providers as there is really nothing specific to the home hub

voice profile add

SIP_URI is your auth number, usually 7 digits, you can find this on your localphone voip account settings page
username is your username, in localphone’s case the same as your SIP_URI
password speaks for itself
display name is the name used for your caller ID, this is up to you
voice port directs calls to a specific port, ie fxs will cause a phone connected to the “phone” port on the flub to ring, I use common here, meaning ring on all handsets
abbr is just your sip uri, but you can leave it blank without any ill effects

Now we have the voice profile set up we must add the sip servers so it knows where it’s trying to register.

voice sip config primregaddr=localphone.com
voice sip config primproxyaddr=proxy.localphone.com
voice sip config notifier_addr=localphone.com

Now disbale dhcp/dns server and firewall, save the config, reboot and plug into your router(Make sure the 192.168.1.254 address is free, if not you will have to free it up or change the flubs ip):

dns server config state=disabled
dhcp server config state=disabled
firewall config state=disabled
config saveall
system reboot

Now with some luck and good judgement you should have the internet light on, browse to http://192.168.1.254 and go to Advanced, now enable telephony (I haven’t found an easy way to enable this via the command line without enabling individual services, but if I do find it I will update this post) and hopefully you should have the Phone light on the flub active aswell, grab a phone and give the flub a call.

Cordless SIP phone for £8, that’ll do!

  1. BT Recover Utility []
  2. Localphone []
  3. sipgate []

The flub! It is mine!

This morning the nice postman brought me a BT Home Flub, let the hacking begin, expect posts!

Where the fuck did it all go wrong?

And more importantly; why did I let it?
The past couple of weeks have been a bit of a psychological roller coaster, there is a lot wrong with my life and the majority of it is self imposed, the ups come in the form of discovery and realisation and more importantly, acceptance that something is terribly wrong, the downs come with the monotony that is trying to find the motivation to pull myself out of the shit and fix it.

So, what’s the problem? Well the abstract of it is over the past few years I’ve turned from a healthy, fairly confident, happy person with many passions to, well, let’s be honest, an unhealthy, slightly awkward, disillusioned, lazy student with seemingly all the aspirations and goals in the world with none of the motivation, passion or drive to accomplish them.

To illustrate this point further, my main passions/goals in life are:

  • Music
  • Bikes/cars
  • Cooking
  • Martial arts (mainly Shotokan)
  • Computers/tech/general geekery.
  • Becoming a paramedic

I haven’t picked up my bass in months, I don’t currently have a job to finance a bike and although I have been looking, while being completely honest I could be trying a lot harder, I haven’t cooked in a while and when I have it has been through necessity rather than really wanting to. The last shotokan class I attended was in 2007. I seem to have slipped into a hole where my “geekery” extends into having ideas and doing fuck all to implement them. The final blow being if I carry on the way I am, trudging through college like a zombie because I’ve had little to no sleep the night before the chances of me ever getting myself into a position where being a paramedic is possible is at best unlikely.

The really idiotic thing about this is I recognise it’s happening, I just can’t work out why, which brings me to the reason for this post. I realise very few people are going to be interested in the ramblings of a pissed off student, however documenting the progression (well, hopefully) of me pulling out of the shit is one way for me to vent and get on with fixing it as opposed to feeling shit and wallowing about it, and if nothing else will probably provide a few ranty posts.

LINQ to XML: I Love You!

LINQ to XML Rocks, what else needs to be said really? No more tedious pissing around with DOM parsers :D I just wish there was a proper (standard; non hacky) way to stream the data to avoid mahoosive memory footprints when querying database dumps. This is also my first ‘proper’ look into C# :)

static void Main(string[] args)
{
    //Load the Jamendo database xml file
    XElement xml = XElement.Load("jamendo.xml");
    //Query for all entries of the genre x and return the album name and url
    var query = from a in xml.Descendants("album")
                where a.Element("id3genre") != null && (string)a.Element("id3genre") == "9"
                select new { url = (string)a.Element("url"), name = (string)a.Element("name") };
 
    foreach (var album in query)
        Console.WriteLine("{0}: {1}", album.name, album.url);
 
    Console.WriteLine("Do you dig the metal?! {0} results", query.Count());
    Console.ReadKey();
}

Mobile devices.

Mobile devices are crap.

I love gadgets, I really do but I’m in the process of deciding upon a new phone for when I find employment to fit around college, and it’s made me realize, current devices are crap.

Ok, maybe crap is a little unfair, but there is nothing yet good enough to tempt me away from my HTC Excalibur, which while a little behind on the times is absolutely rock solid, which for a windows mobile device you’d think is rare. I think I’ve had to forcefully restart it once in the year and a half of ownership.

Which devices have I considered?

  • Nokia E71
  • SE Xperia X1
  • T-Mobile G1

Let’s tackle the G1 first, as this was the device I was looking forward to (Well maybe not THIS device, but Android devices) and the biggest disappointment along the way. My problem is NOT with Android, which while it’s a little immature is a fantastic platform, my issue is with the device itself, there’s really nothing special about it and a lot of annoyances:

  • HTC (the OEM for the G1) are up to their usual tricks with stupid MiniUSB ports, I understand the logic behind this, that is everything can be done via one port but it’s simply an annoyance, there is no standard 3.5mm headphone jack, meaning to use my shiny Sennheisers I have to purchase an adaptor, which either adds more mass or more cabling (as with my Excalibur).
  • I’m not a shallow guy; in fact I prefer function over form, but it is hideous, amirite?
  • That angled chin, again I understand the logic behind it, the microphone being angled towards the mouth but it adds to the hideousness and makes it awkward to keep in the pocket.
  • The keyboard, it’s shit, ’nuff said really, the keys are way way way too flat, there’s next to no travel, they might as well have saved some mass and cost and slapped a nasty virtual keyboard on there

I’m not sure whether it’s that I got my hopes up too high for HTC delivering on this one or whether it’s just a crap device, either way it lets the software down, in a big, big way. I expected HTC to break away from the norm slightly and deliver something special, and while the half decent processor, nice chunk (192mb) of ram is nice, it just seems like R&D at HTC had a very boring year.

Now the Xperia X1. Such a fantastic looking device with some interesting concepts, and best of all, it doesn’t make me look like some blackberry carrying businesspersonthing. The ‘panels’ concept is interesting, even if it is a bit of a gimmick. The idea behind it is that you can have multiple ‘desktops’ (homescreens) that you can quickly switch, depending on the type of use currently in hand, be it business/personal/whatever, this is a nice concept in theory but why do I need to waste memory and cpu cycles when it would take me exactly 10 seconds to switch via the settings menu? The device specs are fantastic, accelerated gpu, 384mb ram, etc. For me, this device is almost perfect, my problems with it are: The stupid ‘optical joystick’ again, an unneeded gimmick, what is it with you and optical gimmicks HTC? (HTC is the OEM for the X1 also) I mean, didn’t you learn from the ‘JOGGR’ on the Excalibur that was almost universally disabled because it was about as useful as a feather duster in the sahara when it worked and had a mind of its own doing all kinds of funky shit when it didn’t (most of the time, then)? The second and most significant is SE’s unwillingness to comment whether they will be offering a Windows Mobile 7 firmware upgrade when it becomes available.

Windows Mobile gets a LOT of stick, most of it undeserved which I think stems from the “Windows” stigma and a slew of shitty devices with poor driver support (not WM’s fault) and shitty implementations(again, not the fault of WM). Windows mobile is fairly generic, and it’s up to vendors to provide decent drivers and implement features properly, if they don’t do this, it’s a piece of shit, simple as that. I absolutely LOVE my HTC Excalibur and it has been nothing but stable with the stock HTC Windows Mobile 6 upgrade (though I do frequently try cooked roms) which is why I am so reluctant to break away from it.

With that said, Windows Mobile, at least in it’s current form is starting to get a little dated and is in desperate need of an overhaul, which is basically what Windows Mobile 7 promises, scheduled for release in the second half of 2009. So essentially by not commenting Sony Ericsson are saying that you could be buying into a (very expensive, if not subsidized by a network contract) device that is obsolete before having even been in the market a year.

Now, onto the Nokia E71, it looks to be a good device, but the stupid shiny finger print attracting surfaces? Not so much. It looks a little too ‘blackberry’ for my liking (I know, I know, I own an Excalibur) and having owned an early N95 I am yet to get over the pain, the early N95 firmwares were dog slow, inefficient and ran out of memory routinely, buggy and the battery was nothing short of useless. So I suppose I’m dismissing it based on bad experiences with Nokia and S60.

I think I’ll hold on for a while and see what the next Android devices deliver, and/or how Windows Mobile 7 performs if SE decide to offer an upgrade.

The Glambulance

Taking the first strides towards being a paramedic, I often think about how much the uniform sucks, I have a proposal:

While the green may be boring, it aids visibility which is important, so I shall continue with that theme. I propose excessive use of leather, sequins, big hair along with better lights on the (gl)ambulance, a disco ball or 2 would work a treat.

Finally, all paramedics should be mediocre musicians and Glam Metal montages en route to a job should be mandatory!

PO-TAY-TOES

Boil ‘em, mash ‘em, stick em up yer bum?

Well you see, I was hanging curtains in the kitchen (naked; you see, we men of God are very poor and have to choose between robes and curtains, I alternate) and I had a sudden loss of balance, falling back onto a potato, conveniently placed on the table, which was then wedged (excuse the pun) up my backside.

Riiiight — http://www.thesun.co.uk/sol/homepage/news/article1876886.ece

Next Page »