PGTS PGTS Pty. Ltd.   ACN: 007 008 568

point Site Navigation

point Other Blog Threads



  Valid HTML 4.01 Transitional

   Stop The Internet Filter!

   No Clean Feed

   The Internet Filter Is An Ex-parrot!






PGTS Humble Blog

Thread: Tips/Tricks For Programming etc

Author Image Gerry Patterson. The world's most humble blogger
Edited and endorsed by PGTS, Home of the world's most humble blogger

Installing Ubuntu On HP 650 Notebook


Chronogical Blog Entries:



Date: Sun, 17 Mar 2013 18:44:09 +1100

Just before Christmas I purchase a windows 8 laptop computer. However not long after I started using it, the Operating System attempted a gratuitous system upgrade and crashed half-way through the process ... Disabling the wireless driver.

This was, to put it mildly, annoying! Not only was the Windows 8 interface silly, nugatory and (with no touch screen) difficult to interact with, it had killed my wireless connection and corrupted itself by initiating a system upgrade without first asking permission ... This cavalier attitude to system upgrades and the presumptive approach it took to searching and linking my Microsoft accounts (Xbox Live etc), made me sufficiently annoyed to reach for an Ubuntu 12.10 installation disk!

I kept a brief log of my encounter with Windows 8 here .

Alas, installing Ubuntu on an HP 650 notebook turned out to be anything if straight forward.

The HP 650 had been setup with UEFI, and the operating system had been locked to the laptop. Eventually I found that I could get into the BIOS setup to change this. I didn't take notes at the time ... However I seem to recall that pressing ESC during the boot sequence gave me an inkling of the way to get to a top level menu for altering the BIOS. Unfortunately most of the help online was specific for Windows 7,

I had to install the 64 bit version of Linux (32 bit will not work with UEFI). Unfortunately I did not take detailed notes during this phase of the installation either ... However I eventually managed to boot and install Ubuntu from a 64 bit installation DVD, cut from an ISO which I had downloaded on an Ubuntu workstation.

But after the install, the wireless driver was still broken!

A little research revealed that, at the time, there were lots of folks experiencing difficulties with a (new?) wireless chip, from STA Broadcom, installed in many HP 650 notebooks. Unfortunately most of the solutions involved installing Windows 7 or doing something in Windows 7 ... I gained the impression from some HP sites that I could have (legally?) reversed the installation of Windows 8 back to Windows 7 ... But I had more or less burnt all my Microsoft bridges by installing Ubuntu.

I went searching for drivers for Ubuntu ... I tried installing some likely candidates from the APT repository, but without success. Next I tried compiling and inserting a proprietary driver using code from the manufacturer. This failed also ... Although this may have been due to carelessness on my part ... Compiling and installing your own drivers is quite a complex task, and it takes a fair amount of planning and attention to detail.

At this stage I decided to give up ... For the next couple of months, I had to use the laptop with a wired connection. Eventually I decided to have another crack at fixing it ...

I had read online that someone had used the compat-wireless drivers successfully. I tried this command to search for the appropriate package:

	apt-cache search compat-wireless | grep `uname -r`

This gave me the name of a package which I then installed and, at last, I got a driver that worked!

Well almost ...

After successfully connecting to the Wireless router, I removed the static address for eth0 and re-booted the laptop and was unable to re-connect (??)

A little experimentation revealed that one way to get a wireless route was to startup the laptop with eth0 "up" using a static IP address ... If I did this without an ethernet cable connected, the networking would fail-over to using the wireless connection.

Also the wireless "light" (embedded in the F12 key) at first lit up with an "ok" tell-tale (light blue) ... But on subsequent attempts it often showed an "error" tell-tale (orange) ... Even when it was (apparently) ok.

For the time being I managed to get wireless working ... However I need a background script (launched by rc.local) that "adjusts" the interfaces after wlan0 is "up" (via automatic connection to the Wireless router) ... This means that I can get to local LAN addresses (for NFS mounts etc). Otherwise traffic to local addresses would be routed through eth0 ... Which would fail if there was no ethernet cable connected to the laptop. In the situation where I was actually using a wired connection, the additional route is just an unecessary complication ...

The script I used was as follows:

#!/bin/bash
WGATEWAY=10.0.0.1
LGATEWAY=192.168.1.1
for x in `seq 10` ; do
	# Wait up to 1 minute for connection via wlan0
	sleep 6
	ping -c1 $WGATEWAY >/dev/null
	if [ $? -eq 0 ] ; then
		# We have a wireless route, check ethernet connection ...
		ping -c1 -I eth0 $LGATEWAY >/dev/null
		if [ $? -eq 0 ] ; then
			ifconfig wlan0 down
		else
			ifconfig eth0 down
		fi
		exit
	fi
done

This script is called from a command "nohup /full/name/script &" inserted in /etc/rc.local script ... Replace with full name of the script and tailor the WGATEWAY LGATEWAY addresses for your particular configuration ... Note: The above might only work for recent versions of GNU Unix, I don't think the -I option is available in all versions of ping.

It's not exactly rocket-science but it works ...

Obviously the back-ported wireless driver for Uvuntu 12.10 has a few (ahem) "undocumented features" ... I am hoping that by the time 13.04 arrives, there will be a more stable version of the wireless drivers ... In which case I will try a fresh install

And yes, this blog entry was composed on an HP 650 notebook running Ubuntu 12.10 ... Using a wireless connection.


Other Blog Posts In This Thread:

Copyright     2013, Gerry Patterson. All Rights Reserved.