Thursday, 21 October 2010

Ubuntu, Virgin Mobile Internet Pre-paid (in Sydney), and the Huaweie160e

I recently bought a Virgin Mobile Broadband (Australia) PrePaid USB modem - a Huawei e160e. I activated it over the phone, and when I plugged it in to my Dell Inspiron 1525 running Ubuntu 9.10, I could see that it was connected to the network (this modem flashes a blue light every 3 seconds when connected to the mobile network). But, try as I might, I couldn't get it connected. Every time I tried, it would just disconnect.

Looking in the system logs, I'd see:
Jan  6 12:42:57 paul-laptop pppd[2846]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:57 paul-laptop pppd[2846]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:57 paul-laptop pppd[2846]: Using interface ppp0
Jan  6 12:42:57 paul-laptop pppd[2846]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:43:06 paul-laptop pppd[2846]: Modem hangup
Jan  6 12:43:06 paul-laptop pppd[2846]: Connection terminated.
Jan  6 12:43:07 paul-laptop pppd[2846]: Exit.

I tried out using usb_modeswitch, but I never really figured out how that is supposed to be used - and it looked to me like the system knew it was a 3G modem anyway.

Using another machine connected to the internet, I googled around and found an answer that worked.

A couple of notes from my experience:

  • This modem was not automatically detected - I had to manually start the 'Network Connections' to add the connection.

  • When selecting Australia and Virgin in the Network Connections wizard, it incorrectly set the APN to 'VirginInternet' - maybe this is for post-paid accounts, but I have a pre-pay, and the APN I use is 'VirginBroadband' - This is probably because for Virgin, there is only one plan to select (default) - how do we get more plans defined (i.e. post-paid and pre-paid)?

  • In the PPP settings, I needed to disable CHAP - doing this in Network Connections was enough, I didn't have to edit /etc/ppp/options

  • The username and password don't seem to matter

lsusb shows the device - interesting that it doesn't label it e160e, but E220 / E270 ???:
paul@paul-laptop:~$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Now that I have it working, this is the system log from insertion of the USB device to connecting to the network:
Jan 21 07:37:54 paul-laptop kernel: [ 1281.336164] usb 2-2: new high speed USB device using ehci_hcd and address 2
Jan 21 07:37:54 paul-laptop kernel: [ 1281.479581] usb 2-2: configuration #1 chosen from 1 choice
Jan 21 07:37:55 paul-laptop kernel: [ 1281.581686] Initializing USB Mass Storage driver...
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583023] scsi5 : SCSI emulation for USB Mass Storage devices
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583231] usb 2-2: USB disconnect, address 2
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583324] usbcore: registered new interface driver usb-storage
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583331] USB Mass Storage support registered.
Jan 21 07:38:01 paul-laptop kernel: [ 1288.144163] usb 2-2: new high speed USB device using ehci_hcd and address 3
Jan 21 07:38:01 paul-laptop kernel: [ 1288.287791] usb 2-2: configuration #1 chosen from 1 choice
Jan 21 07:38:01 paul-laptop kernel: [ 1288.305526] scsi8 : SCSI emulation for USB Mass Storage devices
Jan 21 07:38:01 paul-laptop kernel: [ 1288.320440] scsi9 : SCSI emulation for USB Mass Storage devices
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392549] usbcore: registered new interface driver usbserial
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392579] USB Serial support registered for generic
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392646] usbcore: registered new interface driver usbserial_generic
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392650] usbserial: USB Serial Driver core
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406201] USB Serial support registered for GSM modem (1-port)
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406282] option 2-2:1.0: GSM modem (1-port) converter detected
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406451] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406471] option 2-2:1.1: GSM modem (1-port) converter detected
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406561] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406600] usbcore: registered new interface driver option
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406604] option: v0.7.2:USB Driver for GSM modems
Jan 21 07:38:06 paul-laptop kernel: [ 1293.315709] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jan 21 07:38:06 paul-laptop kernel: [ 1293.325975] scsi 9:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338298] sr1: scsi-1 drive
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338641] sr 8:0:0:0: Attached scsi generic sg2 type 5
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338970] sd 9:0:0:0: Attached scsi generic sg3 type 0
Jan 21 07:38:06 paul-laptop kernel: [ 1293.353699] sd 9:0:0:0: [sdb] Attached SCSI removable disk
Jan 21 07:38:17 paul-laptop pppd[2933]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan 21 07:38:17 paul-laptop pppd[2933]: pppd 2.4.5 started by root, uid 0
Jan 21 07:38:17 paul-laptop pppd[2933]: Using interface ppp0
Jan 21 07:38:17 paul-laptop pppd[2933]: Connect: ppp0 <--> /dev/ttyUSB0
Jan 21 07:38:17 paul-laptop pppd[2933]: PAP authentication succeeded
Jan 21 07:38:17 paul-laptop kernel: [ 1304.425235] PPP BSD Compression module registered
Jan 21 07:38:17 paul-laptop kernel: [ 1304.431699] PPP Deflate Compression module registered
Jan 21 07:38:24 paul-laptop pppd[2933]: Could not determine remote IP address: defaulting to 10.64.64.64
...

When the system wasn't working (using CHAP and the wrong APN), you can clearly see the failure:
Jan  6 12:42:27 paul-laptop kernel: [  332.937183] usb 2-4: new high speed USB device using ehci_hcd and address 3
Jan  6 12:42:27 paul-laptop kernel: [  333.080647] usb 2-4: configuration #1 chosen from 1 choice
Jan  6 12:42:27 paul-laptop kernel: [  333.176235] Initializing USB Mass Storage driver...
Jan  6 12:42:27 paul-laptop kernel: [  333.179119] scsi5 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:27 paul-laptop kernel: [  333.179385] usbcore: registered new interface driver usb-storage
Jan  6 12:42:27 paul-laptop kernel: [  333.179392] USB Mass Storage support registered.
Jan  6 12:42:27 paul-laptop kernel: [  333.180499] usb 2-4: USB disconnect, address 3
Jan  6 12:42:34 paul-laptop kernel: [  339.752070] usb 2-4: new high speed USB device using ehci_hcd and address 4
Jan  6 12:42:34 paul-laptop kernel: [  339.905181] usb 2-4: configuration #1 chosen from 1 choice
Jan  6 12:42:34 paul-laptop kernel: [  339.921561] scsi8 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:34 paul-laptop kernel: [  339.922840] scsi9 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:34 paul-laptop kernel: [  339.948581] usbcore: registered new interface driver usbserial
Jan  6 12:42:34 paul-laptop kernel: [  339.948610] USB Serial support registered for generic
Jan  6 12:42:34 paul-laptop kernel: [  339.948706] usbcore: registered new interface driver usbserial_generic
Jan  6 12:42:34 paul-laptop kernel: [  339.948710] usbserial: USB Serial Driver core
Jan  6 12:42:34 paul-laptop kernel: [  339.970568] USB Serial support registered for GSM modem (1-port)
Jan  6 12:42:34 paul-laptop kernel: [  339.970692] option 2-4:1.0: GSM modem (1-port) converter detected
Jan  6 12:42:34 paul-laptop kernel: [  339.970862] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB0
Jan  6 12:42:34 paul-laptop kernel: [  339.970881] option 2-4:1.1: GSM modem (1-port) converter detected
Jan  6 12:42:34 paul-laptop kernel: [  339.970976] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB1
Jan  6 12:42:34 paul-laptop kernel: [  339.971016] usbcore: registered new interface driver option
Jan  6 12:42:34 paul-laptop kernel: [  339.971020] option: v0.7.2:USB Driver for GSM modems
Jan  6 12:42:38 paul-laptop pppd[2789]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:38 paul-laptop pppd[2789]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:38 paul-laptop pppd[2789]: Using interface ppp0
Jan  6 12:42:38 paul-laptop pppd[2789]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:38 paul-laptop pppd[2789]: CHAP authentication succeeded
Jan  6 12:42:38 paul-laptop pppd[2789]: CHAP authentication succeeded
Jan  6 12:42:38 paul-laptop kernel: [  343.964939] PPP BSD Compression module registered
Jan  6 12:42:38 paul-laptop kernel: [  344.026662] PPP Deflate Compression module registered
Jan  6 12:42:39 paul-laptop kernel: [  344.925236] scsi 9:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2
Jan  6 12:42:39 paul-laptop kernel: [  344.925960] sd 9:0:0:0: Attached scsi generic sg2 type 0
Jan  6 12:42:39 paul-laptop kernel: [  344.930619] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jan  6 12:42:39 paul-laptop kernel: [  344.942337] sd 9:0:0:0: [sdb] Attached SCSI removable disk
Jan  6 12:42:39 paul-laptop kernel: [  344.957198] sr1: scsi-1 drive
Jan  6 12:42:39 paul-laptop kernel: [  344.957525] sr 8:0:0:0: Attached scsi generic sg3 type 5
Jan  6 12:42:47 paul-laptop pppd[2789]: Modem hangup
Jan  6 12:42:47 paul-laptop pppd[2789]: Connection terminated.
Jan  6 12:42:48 paul-laptop pppd[2789]: Exit.
Jan  6 12:42:57 paul-laptop pppd[2846]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:57 paul-laptop pppd[2846]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:57 paul-laptop pppd[2846]: Using interface ppp0
Jan  6 12:42:57 paul-laptop pppd[2846]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:43:06 paul-laptop pppd[2846]: Modem hangup
Jan  6 12:43:06 paul-laptop pppd[2846]: Connection terminated.
Jan  6 12:43:07 paul-laptop pppd[2846]: Exit.

When I tried out usb_modeswitch, I didn't really know what I was doing. I guessed that the parameters (-v and -p) would be those identified in lsusb.  But as for how to know what mode it was in or how to switch it, I don't know.
paul@paul-laptop:~$ usb_modeswitch -v 12d1 -p 1003 -H -i 1

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Looking for default devices ...
Found default devices (1)
Accessing device 000 on bus 002 ...
Using endpoints 0x01 (out) and 0x82 (in)
Not a storage device, skipping SCSI inquiry

Device description data (identification)
-------------------------
Error: could not get description string "manufacturer"
Manufacturer:
Error: could not get description string "product"
Product:
Serial No.: not provided
-------------------------
Sending Huawei control message ...
Error: sending Huawei control message failed (error -1). Aborting.

paul@paul-laptop:~$

UPDATE:

I've been wondering how I get another 'plan' into the Network Connection wizard. If my assumption about the APN is correct (that 'VirginInternet' applies to post paid, and 'VirginBroadband' applies to pre paid) then I'd want to add a plan called 'Prepaid' with the APN 'VirginBroadband' and if possible without CHAP.

Searching around, I found mobile-broadband-provider-info which, if you browse the source you'll find there is a serviceproviders.xml file which contains all of the definitions.

Using
find / -name serviceproviders.xml

I see the file exists at
/usr/share/mobile-broadband-provider-info/serviceproviders.xml

Editing this file, I can add the following under the Virgin provider, in the Australia region (just search for Virgin):
<apn value="VirginBroadband">
<!-- username and password can be anything, but password cannot be empty -->
<username>guest</username>
<password>guest</password>
<name>Prepaid</name>
</apn>

Now, I can open Network Connections and add a connection, selecting my new pre paid plan, and all I have to do is remember to disable CHAP as an option.

I love how open this all is and how easily I could find all this out. It took only a couple of minutes, while on the train traveling home from work. Awesome.

Looking at the README file in the source lead me to the information about ServiceProviders which includes how to contribute.

Now I just need to email this info to the code maintainers so that others have an easier time connecting to Virgin. And, I still have to investigate if there is any way to disable CHAP via the config.

Saturday, 28 August 2010

Week in review - 2010-34

Right now, I'm trying out EasyPeasy on my laptop - an Ubuntu Netbook based edition optimized for low power consumption and pre-installed with propriety codecs and software. I thought I'd try it out hoping to get more battery life, and also to take the netbook interface for a drive. I figure its got some attractive qualities - it differs in the way you access the system menus and opens applications full screen.

Sunday, 22 August 2010

Week in Review - 2010-33

Know of any companies in Sydney that engage in REAL agile projects - properly? Let me know, I'm interested!

I had a javascript drop-down menu that youtube video interferred with - when the menu dropped down, the youtube object covered it! I found the answer here - http://geekswithblogs.net/steveclements/archive/2007/03/03/107839.aspx - where the solution is simple:
Add nested element to object tag:

  • <param name="wmode" value="transparent"/>


And attribute to embed tag:

  • wmode="transparent"



Spending too much time travelling to and from work makes me appreciate the idea of telecommuting. I've noticed that Canonical (Ubuntu) advertises home based jobs, but all companies I know are strongly against it - and although they don't advertise the fact, it is an unspoken policy. Right now, I probably don't have the best home for accommodating telecommunting, but I did come across the OfficePod the other day - a brilliant idea, your office in your back yard!

The first thing that springs to mind is that telecommuting wouldn't fit into an agile environment - and I definitely want to work on agile projects as opposed to the alternative. But, I am dismayed by the low number of positions on the market that are truly agile - most of them are using the buzz words, but IMHO failing to embrace the spirit and implement properly:

  • meetings where you can't sit down (failing to appreciate the real goals of standups)

  • builds every 2 weeks (iterations - but without prioritizing, user stories and customer representatives - just 'time to do a build!')

  • test team completely separate (throw it over the wall to them and wait for the defects to come back - have a read of this)

  • development team using junit but writing the wrong tests (brittle, don't add value, and eventually just ignored


So, if I'm not going to work on a project where close personal collaboration is going to happen, why not telecommute? Or at least travel to a very close serviced office - and let technology take care of the collaboration (video conference like they do in the movies etc). Perhaps that would alleviate some of the strain on the transport infrastructure!

Interesting web sites:

Bugs encountered:

Monday, 9 August 2010

Week in Review – 2010-31

I've noticed a bunch of websites that just don't pay any attention to detail. Little things:

  • banking sites that don't remember your settings (i.e. for exporting statements) and you have to set them every time you export, for every account

  • log forms you fill it to register, and when you fail validation (like getting the CAPTCHA wrong), some parts of your form are now blank and you have to fill them in again (or you get to the bottom where they ask you to accept the terms and conditions, and when you view them it navigates away from the form you are on)

  • paying for things online is still very difficult! It took me almost an hour to pay for an extension I bought the other day - very confusing paypal process, which I haven't fully researched to know what is going on


Maybe these are symptoms of trying to do too much - and never doing anything very well? The banking site in question never seems to change, so perhaps they just aren't in a position where they can make small incremental improvements? Still on the big bang approach? The Minimum Feature Set is an interesting concept.

I came across a blog post about Performance Punishing via twitter this week. I've seen this at every place I've worked! If you highlight issues, identify work needed, present problems, you are always expected to work on it yourself - you found it, you fix it! One thing I like about Agile is the way it fosters teamwork, and team ownership of all aspects of the project. This spreads the load, results in less 'heroism' and obviously creates a better environment.

The Ubuntu Stackexchange Question and Answer site is now available to the public! Check it out for some useful Ubuntu information.

Bugs encountered:

  • Joomla 1.5 password reset token issue caused by some themes - http://docs.joomla.org/Confirm_password_in_1.5.16

  • I've found several Joomla extensions rely on their own javascript - but for some reason my theme isn't including them. I've just manually updated the html template in the theme to link to the javascript for now.


Bing has finally updated its index! See http://www.bing.com/search?q=exmount.com and http://www.bing.com/search?q=pmw-ex3+shoulder+mount - it must be at least a month behind Google and Yahoo, but it gets there.

Monday, 2 August 2010

Week in Review - 2010-30

Looking for some icons? Check out the fantastic work available @ webtoolkit4.me - there are some really good icon sets.

I'm always trying to find better ways of doing things and find incredible resistance to even the simplest of improvements - things that I would consider no-brainers end up subjected to business cases and long winded "evaluations of all the options". Well, the Pragmatic Programmers have released a book that might be exactly what I need:
Driving Technical Change

"Finding cool languages, tools, or development techniques is easy—new ones are popping up every day. Convincing co-workers to adopt them is the hard part. The problem is political, and in political fights, logic doesn’t win for logic’s sake. Hard evidence of a superior solution is not enough. But that reality can be tough for programmers to overcome."

Myself and a co-worker have a keen interest in developing our agile skills, and would also like to infect the rest of the team with our enthusiasm. So, we've held our first of what we hope to be regular lunch-time (couldn't possibly use company time for skills improvement) brown bag sessions - the first being "A practical application of TDD". It mostly went well, but as always people got distracted from the primary goal (TDD) by other secondary topics such as requirements. I've tried exactly this type of thing before, but never had an audience that is particularly interested. Lets see how well it works this time.

The next session we have planned is to watch awesome Kent Beck in his TDD screencasts. Perhaps we should have started with this one, instead of  trying to introduce a practical application myself. I found a review of the screen casts here: http://odoe.net/blog/?p=87 - Big thanks to Kent Beck for JUnit, Extreme ProgrammingTest Driven Development and more.

I also have to give a shout out to Area51! This is awesome - a place where you can propose, commit, and beta test a version of StackOverflow aimed at a niche market - and not necessarily programming related. You can propose a topic, and when enough people have committed to ensure it will thrive, it will be available for public beta - where we can all participate. Current topics include cooking, photography, maths etc. StackOverflow made Q&A much better than the norm, and having a place where the Q&A can branch out cover other topics is fantastic. I like the way these guys think - even the way they enable new sites/topics is different.

Monday, 26 July 2010

Week in Review - 2010-29

I've installed WorldCommunityGrid on my media center, which is on 24*7 - may as well use that spare CPU time for good! I've been watching my ranking slowly get better, starting over 300,000 and now after 21 days of run time I'm ranked (by points) in the mid 200,000s. Along comes a friend of mine and in a very short time he's already broken through under 200,000! He has a quad core CPU (mine is a dual core), and I'm assuming thats the reason.

I find it strange that developer PCs never seem to get updated unless someone new joins the team - and they only get a new computer if one doesn't exist already. I've never worked anywhere where they've had a policy to update developer machines regularly. I think I'd have a policy of updating them every 12 to 18 months if it was up to me. The older machines can filter down to less power users, or perhaps the developer PCs could be rented. I would love a clean machine with a clean OS every 18 months, and I can have all of my required software set up in less than half an hour so a policy like this would be a huge productivity gain. We could have the latest hardware, so we wouldn't wait so long for builds and IDE's to do their thing:


  • Less time waiting for builds

  • Less time waiting for boots, reboots, applications to load

  • Less time waiting for IDEs to autocomplete, parse, validate, suggest



And a word to IT Managers - don't treat EVERYONE in the organisation as having the same requirements - give power users power machines. I could also go on to question WHY I'm forced to use Windows when every platform I ever deploy to is UNIX. But I'll save that for later.

I hit several bugs this week:



I've been involved in launching a new website at http://www.exmount.com/ - built using Joomla! So I've been interested in doing some SEO - If I search Google and Yahoo for "pmw-ex3 shoulder mount" it appears within the first 2 pages. But Bing still hasn't updated its index - it still has the "parked domain" page from when the domain was registered. Its been a couple of weeks now, it'll be interesting to see when Bing does finally update.

I found some great reading on:

I really like OMG! Ubuntu! - I think it is a very well put together site, and shows off just how much you can do with a Blogger.com blog.

New Releases:

Monday, 19 July 2010

Week in Review - 2010-28

I finally got a new battery for my laptop - it only took 3 weeks rather than the estimated 6, so finally I'm back online - on the train. It's barely doing the job though, a new battery barely gets me to and from work - I obviously need to work closer to home! I'm running Ubuntu, Netbeans, Grails, and sometimes a 3G internet connection - so I guess it is working hard for what is sometimes more than a 2 hour round trip!

It will be interesting to see how the new battery lasts. I'm also thinking about getting a new laptop at the end of the year - my current laptop is over 2 years old, so technology wise it's out of date. The DELL Adamo looks interesting, with a SSD disk - I'd love to see how much difference that makes, otherwise I'd probably get an Inspiron 13z - I'm mainly interested in the smaller lighter models since I'm so mobile. Its nice to see laptops coming without DVD drives now - who needs them?

I found an interesting whitepaper on Agile Testing. It describes how different the testing role is in an Agile environment. Worth reading, but as always you never get the full picture from one source, so also check out StickyMinds, InfoQ and Pragmatic Programmers.

We've been having interesting debates at work about how to move forward towards being more Agile. I'm on a Scrum project at the moment and I am a lot happier now that the project management is sorted out, but we need to get better at our development practices. It seems so hard though, convincing others to buy into things that seem so reasonable - so much harder than it should be. And if the others aren't motivated how do you make progress by yourself? I've tried just doing it with the hope that it will motivate the others, but they just don't get excited about it like I do. I've got things to learn here, so if you have any advice or strategies please feel free to comment.

Friday, 9 July 2010

Week in Review - 2010-27

I've recently made updates to my grails plugins to ensure they work on Grails 1.3. I hadn't touched them for a while, so it took a bit of effort. I haven't had the opportunity to use Grails much lately, so I had to catch up on changes. One issue I have is that its impossible to know if anyone is actually using these plugins, and therefore are they worth maintaining?

I recently stumbled across AgileRecord.com - The Magazine for Agile Developers and Agile Testers. This is a downloadable PDF magazine, I think it only requires registration. Very interesting read, I recommend checking it out.

Another awesome read is "Scrum and XP from the Trenches" - http://www.infoq.com/minibooks/scrum-xp-from-the-trenches - This describes how one team implemented agile and is a fantastic source of information.

I've been playing with Joomla lately, and I'm liking it so far. There is a bit of a learning curve, because it has a different paradigm than Wordpress - while Wordpress is very focussed on blogging, Joomla is more generic and takes a bit of getting used to. Hopefully it will prove to be flexible enough to meet my needs.

I was creating some images with GIMP, and I had an issue where the text I was adding was very chunky - it looked terrible. I googled around and found the answer here http://www.gimphelp.org/tutorials/basic_text_tool.shtml - switching the image mode to RGB fixed everything.

Recent Releases

Sunday, 2 May 2010

Introducing JtSysMon

I spend a lot of time on the train travelling to work. Working from home has not really taken off in this part of the world - so, what better to do with that time than practice my craft? Its not comfortable, its hard to concentrate, but progress can be made. I have successfully used this tool to observe real performance problems, and confirm they've been resolved.

JtSysMon is a very simple monitoring tool which will poll resources and time the response. The response time is logged to a database, and from there, you can see which resources are either slow or failing/erroring.

I wrote this because I needed a way to make sure that various resources were available and responsive during development, so that we could respond quickly (proactively) to problems and have them fixed before developers or testers noticed or wasted time fault finding.

Existing solutions (Nagios, Zenoss etc) seemed too complex for such a simple requirement, with too much of a learning curve and setup required for essentially what is polling HTTP and SQL (please correct me if I am wrong).

Install

Checkout from https://github.com/prule/javathinking-sysmon. Use maven to build it and extract the binary archive so that you have a directory structure like:

- jtsysmon
|- bin
|- conf
|- lib

By default, an embedded instance of the DERBY database will be used to store the configuration and poll results. If you want, you can edit conf/database.properties to point to another database. If you do, you will have to add the database driver jar file to the lib dir.

Configure

JtSysMon currently comes with 2 monitor types - SqlMonitor and HttpMonitor.

To configure a monitor, specify the class, a name, and then properties of the class as required. Reflection is used to set the properties of the class:
sh run.sh add name=sql1 class=com.javathinking.jtsysmon.core.monitor.SqlMonitor driverClass=org.hibernate.dialect.DerbyDialect connectionString=jdbc:derby://localhost:1527/jtsysmon "sql=select count(*) from APP.MONITORCONFIG"

sh run.sh add name=http1 class=com.javathinking.jtsysmon.core.monitor.HttpMonitor url=http://localhost/ checkFor=Hello
To list the monitors, use:
sh run.sh -list

Listing monitors

1048576 sql1
class = class com.javathinking.jtsysmon.core.monitor.SqlMonitor
connectionString = jdbc:derby://localhost:1527/jtsysmon
driverClass = org.hibernate.dialect.DerbyDialect
sql = select count(*) from APP.MONITORCONFIG
To delete a monitor, use delete, with the ID of the monitor (shown in the listing above):
sh run.sh -delete 1048576
To start monitoring, use:
sh run.sh -start
Use CTRL-C to stop.

To view alarms (where the time taken to perform poll exceeds a specified value) or problems (where the poll failed or errored) use:
sh run.sh -alarms -threshold 5 -period 20

Listing events over last 20 minutes

ALARMS (duration > 5)

19:08:18 paul-laptop1 sql1 28ms SUCCESS

PROBLEMS (non-successful events)

19:08:21 paul-laptop1 http1 90ms  ERROR
Summary

So there you have it - a bare bones way to check connectivity, response times, and availability of resources in your environment. This is meant only as a development tool, NOT for monitoring production resources.

Futures

If there is any interest from the community in using this tool, you could easily imagine:

  • multiple agents logging to a central database
  • more monitors
    • snmp
    • ssh
    • scripts
  • a web client
    • to display alarms and graphs of response times
    • to configure the monitors
  • notifiers to alert users of problems

For the latest information, see the source code (and README.TXT) at:

Week in Review - 2010-17

Ubuntu 10.04 is here! I've been running Ubuntu exclusively (my wife has the only Windows machine in the house) since (I think) around 6.XX and it just keeps getting better. Last year I converted my parents to Ubuntu 9.10 and every now and then they boot into windows because they don't know how to do something, but thats just because I'm in a different country - otherwise I'd be able to help them a lot more, and show them around. I've got remote control working well now (Remmina has an option to drop the colours to 256 which means it performs fine across the Tasman) so that means I can show them how to do things easily.

I'm looking forward to the new social network aspect of Ubuntu 10, with tight integration into chat and social networks - hopefully this will keep me in touch with my family much more. By the way, I really like Gwibber, and look forward to seeing that evolve.

If you like the sound of Linux and/or Ubuntu, I encourage you to try it out. It can make an old PC feel young, and trying it out is pretty easy. I like the way Ubuntu can be installed on a USB stick so that you can boot from it AND you can save to it - better than booting a live CD - which is also cool, but lets face it, CDs and DVDs are obsolete. You can buy a 1T drive for $100 so you wouldn't even use them for backups would you?

I'm also set up on one.ubuntu.com which has been steadily improving over the last couple of months.

If you are looking for games on Linux, have a look at http://www.playdeb.net/. This is a great directory of games for Linux. Also see:

If you want to learn more about Ubuntu, check out:

Don't forget, there is a NetBook edition of Ubuntu, which may make your PC feel even younger - with a simplified interface its probably a good option for older PCs or non-power users. When all you need to do is surf the web, organise your photos, edit home videos and process documents, maybe the NetBook edition makes all that a little easier.

I've heard comments about gyms not being able to use commercial music without paying royalties. This sounds insane to me, but maybe it will help promote creative commons music. RhythmBox is a music player that comes with Ubuntu, and is integrated with Jamendo, Magnatune and Ubuntu One music store:

  • Jamendo: On Jamendo artists allow anyone to download and share their music. It's free, legal and unlimited.

  • Magnatune: We select the most amazing independent musicians and offer you unlimited downloading and listening for only $15/month.

  • UbuntuOne music store: Ubuntu users have access to purchase popular music from all of their favorite artists that make up an expanding catalog of millions of songs available in the Ubuntu One Music Store.


This makes finding music and buying music fantastically easy, and after my experiences with BigPond music and with iTunes being so closed, I say bring it! Any artists putting music out there that would be good for gym tracks should be getting in touch with these gyms and making themselves known!

Monday, 19 April 2010

Week in Review - 2010-15



There is some great new technology coming:



And the return of a classic:

I'm back playing with virtual machines, trying to investigate a few products that might result in productivity gains. So, I'm using VirtualBox, and here's a couple of must knows:





One thing I'm looking for is a 'network management tool' that lets me configure a set of urls, database connections and sql, and server addresses, to be pinged and notify me if they aren't working. The solutions I know of (Nagios, Zenoss) seem like total overkill. For example, I've found it very confusing and way too hard just to ping a url. I mean, I don't have days to read documentation and play with setting it up. I have a url - just let me enter that!

Next, I need to set up dashboards - by environment (DEV, TEST, UAT, PROD) and project. This way, the users can just see what they are interested in. I'm very tempted to start building this - I've got a simple and effective design in mind, but time is short, and I don't want to build things other people don't want. Arrgh, I wish I had more time!!

Actually, prioritizing projects is a big problem for me. I've got so many ideas that I'd love to realise, I usually end up doing parts of each and never getting anything finished. I'm going to have to let go of most of my pet projects, and focus on one.

I am so keen to get Ubuntu 10 - I am running the Beta on my laptop now, and its all good - it looks fantastic. I've signed up with Ubuntu One and I'll be trying out some of its features. One comment so far, the web interface for editing Notes is a bit too basic. It doesn't seem to auto save, and there is no undo in the editor! Maybe its something to do with the Tomboy notes integration, but I'm sure they could use a better editor and implement auto save.

Sunday, 4 April 2010

Getting familiar with Android

I've just started playing with the Android platform, getting going by writing a very simple timer application - the kind thats useful when you are exercising, for example when you want to hold the plank for 60 seconds. Why Android? Well, its all so familiar - Eclipse development environment, Java language,  and zero entry cost. I don't have an Android phone itself yet, so I'm just running on the emulator that comes with the SDK.

It only took an hour or so to put together the application, after working through the hello world tutorial.

Tuesday, 23 March 2010

Week in Review - 2010-12

I've been using Remote Desktop Viewer to administer and set up my parents computer (running Ubuntu 9.10) in another country. Although functional - it's exactly what I want - I've had lots of trouble with usability, most likely attributed to the bandwidth between the 2 locations. The main issue is responsiveness – the mouse movement is terrible, almost unusable, taking ages to accurately position the mouse where you want.

I couldn't find much in the way of settings to play with when using the Remote Desktop Viewer that comes installed by default with Ubuntu. But when I installed Remmina Remote Desktop Client, I noticed that there were options for Colour Depth and Quality. Changing the colours to 256 and using poorest quality, I can now control the remote desktop much better. Now it is usable and much less frustrating!




I've been working with Netbeans Platform 6.8, making a desktop GUI for an application I've been working on. I got off to a slow start, but after a wee bit of encouragement from Geertjan I picked up speed and started making progress.

For this application, I first wrote most of the services, had them working via tests, and then to make it useful to me, I put a command line interface on it. Now I had an application that I could use and get value from, I started working on the GUI. Its a whole different ballgame - working with Swing and an rich client platform. Its going to take much longer than writing the core application – just because of the challenges with UI design!

I'm really only writing this application to practice my craft, so its been a good experience. Writing the minimum services and getting them working with tests, adding a CLI, and then a GUI is an extremely good way to develop I've found. From now on it will be small incremental enhancements, directed by user feedback.




I've had 3 bad experiences with retail/consumer support recently that just reiterates to me that its never worth calling that number, sending that email, or even trying to help most companies:

  • Apparently DELL all-in-one printers aren't supported under Linux (http://ubuntuforums.org/showthread.php?t=798188 http://forum.freespire.org/showthread.php?t=15035), and when I commented about this on Twitter, a DELL representative asked me to contact support. So I sent the make and model, explained that there didn't seem to be any Linux drivers for it, to which I got the response: “Now the warranty has expired, you need to extend the warranty to get the printer fixed.”

  • After buying an MP3 album from BigPond music, the download software couldn't contact the servers and marked the first 4 tracks as having been downloaded even though they weren't (zero size files). Another day I managed to download the rest of the album successfully, but the first 4 tracks are lost to me. A month after I sent an email to support I've had no response.

  • After replacing my DELL printer with a Brother printer (very well supported under Linux - http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html) I sent an email to Brother support detailing a quirk with their website that confused me and no doubt will confuse others. They came back to me with a link to the correct page (which as stated in my email I'd already found) and apparently no interest in making the site more user friendly.


So it always makes me wince when 'management' buy into some technology or product and force it on us poor developers just because it came with an excellent support contract. That costs a fortune. That we'll never use. Which even if we did use it wouldn't help. And wouldn't be needed if we went with a decent open source system.

Monday, 25 January 2010

My first linux contribution is a disaster

So I recently submitted a patch to the NetworkManager component: https://bugzilla.gnome.org/show_bug.cgi?id=607731  - but it turns out to be a duplicate because this problem was addressed in https://bugzilla.gnome.org/show_bug.cgi?id=600779 - by default Bugzilla doesn't seem to include 'resolved' defects in the search results. You have to go to advanced search and select all statuses.

So, if my patch wasn't needed, and this issue has been resolved, then why doesn't the source code in trunk have this change? Bug 600779 mentions that service providers is deprecated, but by what? Ubuntu 9.10 still uses it, because when I edited /usr/share/mobile-broadband-provider-info/serviceproviders.xml it worked fine for me.

If service providers is deprecated, then why isn't there something on the homepage? Bugzilla doesn't seem to report which source files were changed in a bug - something I quite like in JIRA. See comment #1:

VirginInternet would still be used for tethering a phone, but I've added
VirginBroadband. Thanks!


But what got changed? That would give me a clue.

Checking the version I'm running:
paul@paul-laptop:~$ dpkg -s mobile-broadband-provider-info
Package: mobile-broadband-provider-info
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 180
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: all
Version: 20091009-0ubuntu1
Breaks: libmbca0
Description: database of mobile broadband service providers
Contains service provider specific settings of mobile broadband providers in
different countries.
Homepage: http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders
Original-Maintainer: Antti Kaijanmäki (Wellark) <antti@kaijanmaki.net>

So if Ubuntu are still using it then why wouldn't there be patches and maintenance releases?

Now, searching for Ubuntu specific information turns up NetworkManager provider information which doesn't have the Virgin APN I need. So how do I fix this? Well, it says:
If you discover you need provider information from here or elsewhere, please file a bug against the mobile-broadband-provider-info package so we can improve the experience for all users to a level where all providers Just Work out of the box. https://bugs.launchpad.net/ubuntu/+source/mobile-broadband-provider-info

As today (16/01/09) bug #317860 at Launchpad cover a lot of Service Providers missing. (https://bugs.edge.launchpad.net/ubuntu/+source/mobile-broadband-provider-info/+bug/317860)

I'm was stunned to find out that this type of generic information was window manager specific (GNOME) now it looks like it is distribution specific (Ubuntu). If anyone can tell me the reasoning behind this, I'd love to know. Because right now, it looks crazy to me. Especially from a point of view that I just want to contribute something. It's kind of weird that it's even Operating System specific really, it really just should be a web service available to anyone and everyone, and the Operating Systems just update from it. Anyway... continuing the saga...

This bug report makes interesting reading. Apparently everything was fixed last year: https://bugs.launchpad.net/ubuntu/+source/mobile-broadband-provider-info/+bug/280490

It also says that the Virgin website documents the APN being VirginBroadband. But that page doesn't exist any more. I can only find one reference to APN on their site, and thats the wrong one.

So, I've updated the Ubuntu wiki to add the Virgin APN to the list of providers. I wasn't sure whether to update the Mobile Broadband Cards section with the Huawei e160e, since they've already got the 160 and 160g. But I can't find any source code - I got as far as finding this: http://packages.ubuntu.com/source/lucid/mobile-broadband-provider-info - but the trail ends there.

Anyway, I've spent way too long on this. What started out as a simple patch has only shown me how little I know about the Linux environment, packages, and how the source is maintained. Maybe over time I'll get more familiar with it all.

Saturday, 23 January 2010

Week in Review - 2010-03

Its been a good week. I got my Virgin Mobile Broadband Prepaid 3G modem working, and learnt a lot in the process, and actually contributed to the GNOME project: https://bugzilla.gnome.org/show_bug.cgi?id=607731

As part of this, I installed Pidgin so I could join the IRC channel and talk to developers, but I haven't yet figured out how to view the history for a channel - so I can see what happened while I was offline...

It does surprise me though, that the database for mobile broadband providers is specific to the window manager (GNOME) instead of being a system level thing. I'm sure there are good reasons, and it probably doesn't matter, but what do the KDE (and others) users do? Define it all over again?

Worse than that though is that Virgin don't seem to make the APN easily available. I found it by searching the web, and finding it in forums, but why isn't it in the FAQ on a Virgin site?

I didn't anticipate how much I'd enjoy having access to the internet while training it back and forth from work (1hr train ride) but I'm loving it. I'm pretty sure the documentation that came with the modem says to keep it at least 15cm away from the body, so its attached via the provided usb cable, and sits in my bag on the floor a good distance away.

I've taken to using VLC Media Player as my favourite media player - it lets me use a minimal interface (video only, no controls displayed) to minimise real estate and has an 'always on top' option. This means I can put the video in a corner of the screen and program away - it works well.

I've also been playing with Wordpress:

  • customising the  Thesis theme,

  • using a static page for the home page,

  • learning that I can turn commenting off for individual pages/posts

  • specifying excerpts so the teasers are better


Also, I've read up a bit on Joomla. I haven't installed it yet, but I've been meaning to look into CMS alternatives to Wordpress for a while. It was frustrating understanding exactly what it could do until a friend pointed me to this resource : http://www.cmsmatrix.org/matrix/cms-matrix/joomla

Thursday, 21 January 2010

Ubuntu, Virgin Mobile Internet Pre-paid (in Sydney), and the Huaweie160e

I recently bought a Virgin Mobile Broadband (Australia) PrePaid USB modem - a Huawei e160e. I activated it over the phone, and when I plugged it in to my Dell Inspiron 1525 running Ubuntu 9.10, I could see that it was connected to the network (this modem flashes a blue light every 3 seconds when connected to the mobile network). But, try as I might, I couldn't get it connected. Every time I tried, it would just disconnect.

Looking in the system logs, I'd see:
Jan  6 12:42:57 paul-laptop pppd[2846]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:57 paul-laptop pppd[2846]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:57 paul-laptop pppd[2846]: Using interface ppp0
Jan  6 12:42:57 paul-laptop pppd[2846]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:43:06 paul-laptop pppd[2846]: Modem hangup
Jan  6 12:43:06 paul-laptop pppd[2846]: Connection terminated.
Jan  6 12:43:07 paul-laptop pppd[2846]: Exit.

I tried out using usb_modeswitch, but I never really figured out how that is supposed to be used - and it looked to me like the system knew it was a 3G modem anyway.

Using another machine connected to the internet, I googled around and found an answer that worked.

A couple of notes from my experience:

  • This modem was not automatically detected - I had to manually start the 'Network Connections' to add the connection.

  • When selecting Australia and Virgin in the Network Connections wizard, it incorrectly set the APN to 'VirginInternet' - maybe this is for post-paid accounts, but I have a pre-pay, and the APN I use is 'VirginBroadband' - This is probably because for Virgin, there is only one plan to select (default) - how do we get more plans defined (i.e. post-paid and pre-paid)?

  • In the PPP settings, I needed to disable CHAP - doing this in Network Connections was enough, I didn't have to edit /etc/ppp/options

  • The username and password don't seem to matter

lsusb shows the device - interesting that it doesn't label it e160e, but E220 / E270 ???:
paul@paul-laptop:~$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Now that I have it working, this is the system log from insertion of the USB device to connecting to the network:
Jan 21 07:37:54 paul-laptop kernel: [ 1281.336164] usb 2-2: new high speed USB device using ehci_hcd and address 2
Jan 21 07:37:54 paul-laptop kernel: [ 1281.479581] usb 2-2: configuration #1 chosen from 1 choice
Jan 21 07:37:55 paul-laptop kernel: [ 1281.581686] Initializing USB Mass Storage driver...
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583023] scsi5 : SCSI emulation for USB Mass Storage devices
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583231] usb 2-2: USB disconnect, address 2
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583324] usbcore: registered new interface driver usb-storage
Jan 21 07:37:55 paul-laptop kernel: [ 1281.583331] USB Mass Storage support registered.
Jan 21 07:38:01 paul-laptop kernel: [ 1288.144163] usb 2-2: new high speed USB device using ehci_hcd and address 3
Jan 21 07:38:01 paul-laptop kernel: [ 1288.287791] usb 2-2: configuration #1 chosen from 1 choice
Jan 21 07:38:01 paul-laptop kernel: [ 1288.305526] scsi8 : SCSI emulation for USB Mass Storage devices
Jan 21 07:38:01 paul-laptop kernel: [ 1288.320440] scsi9 : SCSI emulation for USB Mass Storage devices
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392549] usbcore: registered new interface driver usbserial
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392579] USB Serial support registered for generic
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392646] usbcore: registered new interface driver usbserial_generic
Jan 21 07:38:01 paul-laptop kernel: [ 1288.392650] usbserial: USB Serial Driver core
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406201] USB Serial support registered for GSM modem (1-port)
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406282] option 2-2:1.0: GSM modem (1-port) converter detected
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406451] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406471] option 2-2:1.1: GSM modem (1-port) converter detected
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406561] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406600] usbcore: registered new interface driver option
Jan 21 07:38:01 paul-laptop kernel: [ 1288.406604] option: v0.7.2:USB Driver for GSM modems
Jan 21 07:38:06 paul-laptop kernel: [ 1293.315709] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jan 21 07:38:06 paul-laptop kernel: [ 1293.325975] scsi 9:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338298] sr1: scsi-1 drive
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338641] sr 8:0:0:0: Attached scsi generic sg2 type 5
Jan 21 07:38:06 paul-laptop kernel: [ 1293.338970] sd 9:0:0:0: Attached scsi generic sg3 type 0
Jan 21 07:38:06 paul-laptop kernel: [ 1293.353699] sd 9:0:0:0: [sdb] Attached SCSI removable disk
Jan 21 07:38:17 paul-laptop pppd[2933]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan 21 07:38:17 paul-laptop pppd[2933]: pppd 2.4.5 started by root, uid 0
Jan 21 07:38:17 paul-laptop pppd[2933]: Using interface ppp0
Jan 21 07:38:17 paul-laptop pppd[2933]: Connect: ppp0 <--> /dev/ttyUSB0
Jan 21 07:38:17 paul-laptop pppd[2933]: PAP authentication succeeded
Jan 21 07:38:17 paul-laptop kernel: [ 1304.425235] PPP BSD Compression module registered
Jan 21 07:38:17 paul-laptop kernel: [ 1304.431699] PPP Deflate Compression module registered
Jan 21 07:38:24 paul-laptop pppd[2933]: Could not determine remote IP address: defaulting to 10.64.64.64
...

When the system wasn't working (using CHAP and the wrong APN), you can clearly see the failure:
Jan  6 12:42:27 paul-laptop kernel: [  332.937183] usb 2-4: new high speed USB device using ehci_hcd and address 3
Jan  6 12:42:27 paul-laptop kernel: [  333.080647] usb 2-4: configuration #1 chosen from 1 choice
Jan  6 12:42:27 paul-laptop kernel: [  333.176235] Initializing USB Mass Storage driver...
Jan  6 12:42:27 paul-laptop kernel: [  333.179119] scsi5 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:27 paul-laptop kernel: [  333.179385] usbcore: registered new interface driver usb-storage
Jan  6 12:42:27 paul-laptop kernel: [  333.179392] USB Mass Storage support registered.
Jan  6 12:42:27 paul-laptop kernel: [  333.180499] usb 2-4: USB disconnect, address 3
Jan  6 12:42:34 paul-laptop kernel: [  339.752070] usb 2-4: new high speed USB device using ehci_hcd and address 4
Jan  6 12:42:34 paul-laptop kernel: [  339.905181] usb 2-4: configuration #1 chosen from 1 choice
Jan  6 12:42:34 paul-laptop kernel: [  339.921561] scsi8 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:34 paul-laptop kernel: [  339.922840] scsi9 : SCSI emulation for USB Mass Storage devices
Jan  6 12:42:34 paul-laptop kernel: [  339.948581] usbcore: registered new interface driver usbserial
Jan  6 12:42:34 paul-laptop kernel: [  339.948610] USB Serial support registered for generic
Jan  6 12:42:34 paul-laptop kernel: [  339.948706] usbcore: registered new interface driver usbserial_generic
Jan  6 12:42:34 paul-laptop kernel: [  339.948710] usbserial: USB Serial Driver core
Jan  6 12:42:34 paul-laptop kernel: [  339.970568] USB Serial support registered for GSM modem (1-port)
Jan  6 12:42:34 paul-laptop kernel: [  339.970692] option 2-4:1.0: GSM modem (1-port) converter detected
Jan  6 12:42:34 paul-laptop kernel: [  339.970862] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB0
Jan  6 12:42:34 paul-laptop kernel: [  339.970881] option 2-4:1.1: GSM modem (1-port) converter detected
Jan  6 12:42:34 paul-laptop kernel: [  339.970976] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB1
Jan  6 12:42:34 paul-laptop kernel: [  339.971016] usbcore: registered new interface driver option
Jan  6 12:42:34 paul-laptop kernel: [  339.971020] option: v0.7.2:USB Driver for GSM modems
Jan  6 12:42:38 paul-laptop pppd[2789]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:38 paul-laptop pppd[2789]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:38 paul-laptop pppd[2789]: Using interface ppp0
Jan  6 12:42:38 paul-laptop pppd[2789]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:38 paul-laptop pppd[2789]: CHAP authentication succeeded
Jan  6 12:42:38 paul-laptop pppd[2789]: CHAP authentication succeeded
Jan  6 12:42:38 paul-laptop kernel: [  343.964939] PPP BSD Compression module registered
Jan  6 12:42:38 paul-laptop kernel: [  344.026662] PPP Deflate Compression module registered
Jan  6 12:42:39 paul-laptop kernel: [  344.925236] scsi 9:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2
Jan  6 12:42:39 paul-laptop kernel: [  344.925960] sd 9:0:0:0: Attached scsi generic sg2 type 0
Jan  6 12:42:39 paul-laptop kernel: [  344.930619] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jan  6 12:42:39 paul-laptop kernel: [  344.942337] sd 9:0:0:0: [sdb] Attached SCSI removable disk
Jan  6 12:42:39 paul-laptop kernel: [  344.957198] sr1: scsi-1 drive
Jan  6 12:42:39 paul-laptop kernel: [  344.957525] sr 8:0:0:0: Attached scsi generic sg3 type 5
Jan  6 12:42:47 paul-laptop pppd[2789]: Modem hangup
Jan  6 12:42:47 paul-laptop pppd[2789]: Connection terminated.
Jan  6 12:42:48 paul-laptop pppd[2789]: Exit.
Jan  6 12:42:57 paul-laptop pppd[2846]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Jan  6 12:42:57 paul-laptop pppd[2846]: pppd 2.4.5 started by root, uid 0
Jan  6 12:42:57 paul-laptop pppd[2846]: Using interface ppp0
Jan  6 12:42:57 paul-laptop pppd[2846]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded
Jan  6 12:43:06 paul-laptop pppd[2846]: Modem hangup
Jan  6 12:43:06 paul-laptop pppd[2846]: Connection terminated.
Jan  6 12:43:07 paul-laptop pppd[2846]: Exit.

When I tried out usb_modeswitch, I didn't really know what I was doing. I guessed that the parameters (-v and -p) would be those identified in lsusb.  But as for how to know what mode it was in or how to switch it, I don't know.
paul@paul-laptop:~$ usb_modeswitch -v 12d1 -p 1003 -H -i 1

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Looking for default devices ...
Found default devices (1)
Accessing device 000 on bus 002 ...
Using endpoints 0x01 (out) and 0x82 (in)
Not a storage device, skipping SCSI inquiry

Device description data (identification)
-------------------------
Error: could not get description string "manufacturer"
Manufacturer:
Error: could not get description string "product"
Product:
Serial No.: not provided
-------------------------
Sending Huawei control message ...
Error: sending Huawei control message failed (error -1). Aborting.

paul@paul-laptop:~$

UPDATE:

I've been wondering how I get another 'plan' into the Network Connection wizard. If my assumption about the APN is correct (that 'VirginInternet' applies to post paid, and 'VirginBroadband' applies to pre paid) then I'd want to add a plan called 'Prepaid' with the APN 'VirginBroadband' and if possible without CHAP.

Searching around, I found mobile-broadband-provider-info which, if you browse the source you'll find there is a serviceproviders.xml file which contains all of the definitions.

Using
find / -name serviceproviders.xml

I see the file exists at
/usr/share/mobile-broadband-provider-info/serviceproviders.xml

Editing this file, I can add the following under the Virgin provider, in the Australia region (just search for Virgin):
<apn value="VirginBroadband">
<!-- username and password can be anything, but password cannot be empty -->
<username>guest</username>
<password>guest</password>
<name>Prepaid</name>
</apn>

Now, I can open Network Connections and add a connection, selecting my new pre paid plan, and all I have to do is remember to disable CHAP as an option.

I love how open this all is and how easily I could find all this out. It took only a couple of minutes, while on the train traveling home from work. Awesome.

Looking at the README file in the source lead me to the information about ServiceProviders which includes how to contribute.

Now I just need to email this info to the code maintainers so that others have an easier time connecting to Virgin. And, I still have to investigate if there is any way to disable CHAP via the config.