Thursday, 3 December 2009

Goodbye comment spam!

I don't know whether to count myself privileged or unlucky, but spammers have now started comment spamming by blog!  I guess this is one of those annoying rights-of-passage.

I noticed a trend where they first post something simple like "I really enjoyed reading this post about <random word from blog>, thankyou".  Since allowing a few of thoses, I'm now getting 6 or so spams a day.

I first turned on comment verification for posts older than 14 days, but that just means I get the comment spam in my inbox.

So I've now turned on captcha's (or "word verification" as Google's blogger calls it) so let's hope that reduces the spam.

If you're interested, the setting is in "Settings > Comments" called "".  Choose "yes" and save.

Thursday, 26 November 2009

Hallo from Germany!

I'm in Nurnberg at the SPC/IPC/Drives fair this week! Great weather, great people, great service! Germany is the land of automation - from toilets to bars, there's some level of automation everywhere.

I also like the public toilets - €0.50 to get in (refundable on a purchase from the nearby shops) however the toilets are high-quality 5-star and CLEAN! (Of course with automatic taps, flushers, etc). And some pipe rainforest sounds as well... I'd happily pay 50c to use a clean public toilet in Australia.

Anyway, it's great to see all the manufacturers that I couldn't access in Australia, under one roof (or 10 roofs actually). I've been able to get access to some of the head developers for PLCs and IPCs and ask them detailed questions that Australian distributors have no clue about.

I even bumped into Manfred Werner (not realising it was him until we swapped business cards) because he happened to be standing at the CoDeSys front desk. I was able to ask him about the future of CoDeSys and the integration of a C compiler. Needless to say they're not considering it right now, but the Matlab code generation topic has been raised with them a lot recently, so they're thinking...

Well, the days are short, the weather is a refreshing "cool", and I'm looking forward to the Christmas Market (Christkindlesmarkt) on my only day off. So Guten Tag!

Wednesday, 26 August 2009

Extracting CAB files for Windows Mobile without ActiveSync

I received an old bluetooth GPS that I write about here. To install the software, I simply had a Windows (not mobile) executable. I don't have Windows and ActiveSync installed, so how do I go about getting the contents out of the executable and onto my Windows Mobile phone?

In most cases it's quite easy! Here are some tips:

Try 1: Is a plain CAB alternative offered?

This may seem obvious to some, but check if the software is offered in two forms - as a Windows executable, and a plain CAB file download. Browse around the website or CDs for files ending in .CAB

Try 2: Is it a self-extracting zip file?

This is the easiest form of executable! Zip files can be made "self extracting" by containing both executable code and the embedded zip structure. To find out (from Linux, Unix, BSD etc) just run an incantation of zip that understands dos-based PKZIP archives, such as info-zip. (You may have this version of zip already).

info-zip comes with zipinfo which lists information about zip files. In my case, the TomTom executable is called navupd521.exe
$ zipinfo navupd521.exe
Archive: navupd521.exe 4409856 bytes 5 files
-rw-a-- 2.0 ntf 4762417 b- defN 16-Jan-06 13:17 setup.apk
-rw-a-- 2.0 ntf 81 t- defN 23-Feb-05 23:28 cp.txt
-rwxa-- 2.0 ntf 2498560 b- defN 16-Nov-05 15:49 setup.exe
-rw-a-- 2.0 ntf 0 t- stor 24-Feb-05 11:05 TomTom Update.cid
-rw-a-- 2.0 ntf 22 t- stor 11-Jul-05 08:54 ttn.txt
5 files, 7261080 bytes uncompressed, 4377788 bytes compressed: 39.7%
If you see a list of files, then the executable is understood by zip. But alas! there's no CAB files in here. Unless they're in that setup.exe...
$ unzip navupd521.exe
Archive: navupd521.exe
inflating: setup.apk
inflating: cp.txt
inflating: setup.exe
extracting: TomTom Update.cid
extracting: ttn.txt
$ ls
cp.txt setup.apk TomTom Update.cid
navupd521.exe setup.exe ttn.txt
$ zipinfo setup.exe
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of setup.exe or, and cannot find setup.exe.ZIP, period.
And here's the end of the line! The setup.exe file is not a zip archive (even though they sometimes are called setup.exe).

Try 3: Temporary files

Use wine to start the install process, and look for temporary files.

In my case, when I run wine navupd521.exe:
  • While the TomTom installer is complaining that your computer does not support the device blahblah or somesuch rubbish, look for a directory in <>/windows/temp that wasn't there before. If necessary, create an index of all the files in your wine c drive before you run the installer. Then do it again with the installer running, then check for differences. There should be a temporary file or directory somewhere!
  • copy the entire directory (for TomTom that's "<.wine>/drive_c/windows/temp/WZSE0.TMP/") to somewhere safe
  • Exit the installer, and search for CAB files in the directory you just copied.
  • For TomTom you will find:
  • Choose the right CAB file matching your device by name or directory. I'm going with the pocketpc directory for my pocketpc!
Now all that's left is to copy the CAB files to your device using bluetooth, USB, or storage card; then select them in Windows Mobile to start the install.

(This example is for the TomTom Navigator 5 December 2005 update. After installing your original TomTom Navigator, run these CAB files to update to the new version)

And that's how you can get CAB files without Windows!

Tuesday, 25 August 2009

What do do with a bluetooth GPS

I received a bluetooth GPS, by TomTom, which came with TomTom Navigator 5.

It installs on my O2 Windows Mobile 5, it pairs, it works, but there are no maps for Australia. It is, after all, from 2005.

(I've made some notes on extracting and installing CAB files in Linux without ActiveSync, which you might be interested in).

I've searched for map downloads, but as far as I can tell, they're not available for Australia for this version of Navigator. Nor are TeleAtlas maps, which are supposedly compatible.

So the question is: What do I do with this bluetooth GPS? It works fine with my phone, and no doubt would work with my laptop. I don't want Google Maps, because it doesn't give voice guided directions, nor does it allow you to download maps. (You have to be within range of a 3G tower at all times).

I would have liked a voice-guided navigator for my mobile, but I can't find one. Nor do I want to hack or download the latest Tomtom Navigator, or equivalent.

Your suggestions please! The more unusual the better! Duct tape required! Perhaps a GPS-aware back to base alarm for my car? You think of something...

Ideas so far:

  • Download a compatible program and create data for OpenStreetMap. (OpenStreetMap is creating a royalty free and open GPS street map of the world, but they need GPS data). I could permanently mount my GPS and phone in the car, and upload the data from time to time.

    The only problem is Yahoo has provided some free data already which covers most of the city I live in...

  • Sell it (no box, CD's, used condition, I might get $20USD...)

  • (Waiting for idea #3)

Wednesday, 12 August 2009

Dell Inspiron 9100 infra red port

My old Dell laptop has a built-in infra red port on the front. In the 4 or more years that I've had it, I've had no need for the port.

Now that it is becoming my (MythTV) media centre, the infra red port becomes useful! Here are the steps I used to get it working. I had some small hassle with the built-in serial port driver taking over.

  1. First, make sure it's enabled in the BIOS, and take note of the serial port it's attached to.

    There are no other serial ports on this laptop, so anything that looks like a serial port is likely to be the infra red port.

  2. I used lirc to receive and configure the port.

    In Gentoo enable the lirc global USE flag (global means put it in make.conf because many programs can make use of it). Also add this line to make.conf:

    In other distros, you have to somehow build the sir driver.

    Also add the lirc USE flags hardware-carrier and transmitter. You can do this in /etc/make.conf, or better use /etc/portage/package.use, or better still, make package.use a directory, and add the file /etc/portage/package.use/lirc-20090806 with the contents:
    app-misc/lirc hardware-carrier transmitter

    (You can of course make any-named file in /etc/portage/package.use)

  3. (re)compile! This includes lirc, MythTV, mplayer and anything else that might be able to take advantage of your new lirc USE flag.

    In Gentoo, you could use the command:
    emerge --update --newuse --deep world
    to find and rebuild all packages that have changed USE flags.

  4. Now you need to load the lirc module. For com1, run this command:
    modprobe lirc_sir io=0x2f8 irq=3 threshold=5

    options lirc-sir io=0x2f8 irq=3 threshold=5
    Also add this line to remove any conflicts:
    install lirc_sir setserial /dev/ttyS0 uart none; modprobe --ignore-install lirc_sir

    Make sure you run update-modules; then unload and reload the lirc_sir module after any changes to lirc.conf

  5. Test your configuration with mode2. Run mode2 as root and then press buttons on a remote. You should see some output like
    pulse 591
    space 96900
    pulse 9042
    space 2277
    pulse 591
    space 96900
    pulse 9042
    space 2273
    pulse 594
    space 96901
    pulse 9042
    space 2274
    pulse 593

    If not, make sure you've unloaded any serial related module. Check dmesg after loading the lirc module to make sure your hardware is recognised:
    $ dmesg | grep lirc_sir
    lirc_sir: I/O port 0x03e8, IRQ 4.
    lirc_sir: Installed.

  6. You're almost there! Now you can download remote codes from the LIRC website, or make your own with irrecord. I made my own, since my remote wasn't there.

    Copy the remote code file to /etc/lircd.conf

    Leave the /etc/conf.d/lircd blank or all commented out if you have the same hardware

    Start lircd: /etc/init.d/lircd
And that should be that!

Many thanks to:

Wednesday, 5 August 2009

SynCE 0.14 updates

SynCE 0.14 ebuilds are now available in the overlay for all SynCE packages. (See the instructions here for details)

You should have no trouble compiling and installing (of course, let someone know if you do!)

Most of the SynCE problems seem to come from configuring and using (or trying to). So before you report any bugs, please try these steps. Note: this is a short summary! Please read the SynCE wiki for full instructions.
  1. First verify you have version 0.14 of everything, using eix, equery, genlop or whatever.
  2. Backup all your Contacts, Calendar, Tasks and Files. (I use Sprite Backup that came with my Treo Pro). This is important as Windows Mobile 6 will delete all data associated with a deleted partnership.
  3. Remove the multisync group (your command may vary)
    $ msynctool --delgroup synce-sync
  4. Remove the partnership
  5. Delete the ~/.opensync and ~/.synce directories (copy any local config files first)
    $ rm -rf ~/.opensync ~/.synce/*
  6. Create a new partnership (change the name and objects to synchronise)
    $ "TreoPro" "Calendar"
  7. Create a new opensync group, and add members (alter members to suit your needs)
    $ msynctool --addgroup synce-sync
    $ msynctool --addmember synce-sync evo2-sync
    $ msynctool --addmember synce-sync synce-opensync-plugin
    $ msynctool --showgroup synce-sync

    If these steps fail, check the output from --listplugins
    $ msynctool --listplugins
    Available plugins:
If you upgrade sys-apps/hal to >= 0.5.13 (which is now in ~x86) you will have to compile synce-hal again. This is because the hal scripts directory has changed, and synce-hal only detects this at install-time.

Errors similar to were fixed for me by following the steps above.

Let me know of your success / failure. SynCE 0.14 will be in portage in the fullness of time!

Tuesday, 28 July 2009

Artec DVB USB in Linux

So I unboxed my Artec TV tuner card, now I have to get it working!

You need firmware and kernel modules. You can download the firmware for it here:

Use wget or some way of getting it. Then move the file to /lib/firmware.

You also need the v4l-dvb kernel drivers (compatible with kernel 2.6.16 and up). In Gentoo, emerge media-tv/v4l-dvb-hg. Other distributions have instructions here.

Now insert the card. udev will handle loading the correct modules. My syslog output looks like this:
usb 1-3: Product: ART7070
usb 1-3: Manufacturer: Ultima
usb 1-3: SerialNumber: 001
usb 1-3: configuration #1 chosen from 1 choice
dvb-usb: found a 'Artec T14BR DVB-T' in cold state, will try to load a firmware
usb 1-3: firmware: requesting dvb-usb-dib0700-1.20.fw
dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw'
dib0700: firmware started successfully.
dvb-usb: found a 'Artec T14BR DVB-T' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Artec T14BR DVB-T)
DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)...
DiB0070: successfully identified
input: IR-receiver inside an USB DVB receiver as /class/input/input7
dvb-usb: schedule remote query interval to 50 msecs.
dvb-usb: Artec T14BR DVB-T successfully initialized and connected.
Look for a line similar to dib0700: firmware started successfully. If you see Cannot find firmware file then make sure you downloaded the firmware properly, and check your system's firmware directory. Also check the firmware file name, as it might want a slightly different firmware file.

That's it! From there I plugged in an antenna, loaded MythTV, and watched some HD TV!

SynCE 0.14 in Gentoo

I just tested app-pda/synce-gvfs-0.3 in Gentoo with gnome-base/gvfs-1.2.3. This is the first ebuild for the SynCE 0.14 release (announcement here), and it's available in the SynCE overlay.

synce-gvfs works without upgrading other SynCE components to 0.14. For me, it fixes a gvfs crash when trying to copy files off your device.

Comments welcome :) The rest of SynCE 0.14 will happen eventually :)

Artec USB DVB-T tuner card

I just purchased the Artec T14BR HD DVB-T TV tuner dongle for turning my old laptop into a MythTV box. It cost $46.90 including GST and postage from Deals Direct.

I now have a High Def set top box, with 80Gb hard drive for (essentially) $46.90. And if I want to make it a twin tuner HD STB, it's just another $46.90.

Here is the picture of the box:

And here are all the contents (note, no aerial, but I knew that):

And finally a close up of the interesting stuff:

The dongle has a window on either side, presumable for the IR reciever in the middle somewhere.

Support for Linux is supposedly good (stay tuned, haha!). lsusb identifies it as "Bus 001 Device 025: ID 05d8:810f Ultima Electronics Corp." The syslog output when I plug it in looks like this:
usb 1-3: new high speed USB device using ehci_hcd and address 25
usb 1-3: New USB device found, idVendor=05d8, idProduct=810f
usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: ART7070
usb 1-3: Manufacturer: Ultima
usb 1-3: SerialNumber: 001
usb 1-3: configuration #1 chosen from 1 choice
This isn't "the" laptop, so I don't have any drivers installed for it, hence that's all for now.

I'll let you know how it works in my next post.

Monday, 13 July 2009

Hey you! Follow my Blog! (please?)

A huge thanks to the many visitors to my blog each month. I've made a few changes to my blog to make it a bit more interactive.

Now you can "follow" this blog and see an image cloud of other followers. Just click on the "Follow" button to the right.

Also, I've added "reactions" below each post. They're easier than comments, and it offers a way to give me some quick feedback (like "cool", or "shut up!").

So please try it out, For Great Justice. (or not, it's up to you :)

Saturday, 11 July 2009

Broadcom BCM4306 wireless LAN without ndiswrapper

I've been updating an old laptop as you might have read.

Last night I tried to start the wireless LAN, but too many kernel upgrades had obsoleted my setup! When I first got the laptop around 2004, ndiswrapper was the only option. By now I thought there must be a better way! I settled on the b43legacy drivers. Many thanks to that great site for all the specific details.

As I write, I'm using the wireless LAN with b43legacy without problems!

But how? I'll show you the details for the specific WLAN controller in the Dell Inspiron 9100.

According to (wko)
If your card is a BCM4306 Rev 2, or only has 802.11b capability, it uses b43legacy. All other models use b43.
As you can see, I have revision 2, so I have to use the b43legacy driver. To identify your card, type `lspci -vnn | grep 14e4`. This is my response:

Subsystem: Broadcom Corporation Device [14e4:4d64]
02:00.0 Ethernet controller [0200]: Broadcom Corporation BCM4401 100Base-T [14e4:4401] (rev 01)
02:03.0 Network controller [0280]: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [14e4:4320] (rev 02)
The 14e4 is necessary to use any b43 driver.

At wko, b43legacy is specified for revision 2, and b43 for revision 3.
Supported chip types
* bcm4306 (Rev. 2 uses b43legacy, Rev. 3 uses b43)
Now to configure your kernel. (This may be done for you). Check these options are set:
  • Networking support > wireless
  • Generic IEEE 802.11 Networking Stack (mac80211)
  • Enable LED triggers (MAC80211_LEDS) (if you have LEDs)
Also enable:
  • Network device support > wireless LAN
and the following options:

Now make, install, and reboot! The module b43_legacy was loaded automatically for my by udev.

I use wpa_supplicant to connect. Your config files may vary. Somehow you need to specify that wpa_supplicant should be started like this:
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplement.conf

In gentoo, edit /etc/conf.d/net:

There's one final step. The BCM cards need firmware which is loaded by the proprietary windows drivers. You must download this in addition to a firware cutter called b43-fwcutter. In Gentoo, emerge b43-fwcutter. Then run these commands (thanks again to wko).
export FIRMWARE_INSTALL_DIR="/lib/firmware"
sudo b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta-
The output looks like this:
This file is recognised as:
ID : FW10
filename : wl_apsta.o
version : 295.14
MD5 : e08665c5c5b66beb9c3b2dd54aa80cb3
Extracting b43legacy/ucode2.fw
Extracting b43legacy/ucode4.fw
Extracting b43legacy/ucode5.fw
Extracting b43legacy/ucode11.fw
Extracting b43legacy/pcm4.fw
Extracting b43legacy/pcm5.fw
Extracting b43legacy/a0g0bsinitvals2.fw
Extracting b43legacy/b0g0bsinitvals5.fw
Extracting b43legacy/a0g0initvals5.fw
Extracting b43legacy/a0g1bsinitvals5.fw
Extracting b43legacy/a0g0initvals2.fw
Extracting b43legacy/a0g1initvals5.fw
Extracting b43legacy/b0g0bsinitvals2.fw
Extracting b43legacy/b0g0initvals5.fw
Extracting b43legacy/b0g0initvals2.fw
Extracting b43legacy/a0g0bsinitvals5.fw

You may need to specify a different firmware directory. /lib/firmware is correct for Gentoo.

Now you should be able to start your network script. In Gentoo /etc/init.d/net.wlan0 start. syslog shows:

b43legacy-phy0: Loading firmware version 0x127, patch level 14 (2005-04-18 02:36:27)
b43legacy-phy0 debug: Chip initialized
b43legacy-phy0 debug: 30-bit DMA initialized
Registered led device: b43legacy-phy0:tx
Registered led device: b43legacy-phy0:rx
b43legacy-phy0 debug: Wireless interface started
b43legacy-phy0 debug: Adding Interface type 2
b43legacy-phy0 debug: Radio initialized
b43legacy-phy0: Radio turned off by software
b43legacy-phy0: Radio turned on by software
/etc/init.d/net.wlan0[12885]: WARNING: net.wlan0 has started, but is inactive
wlan0: direct probe to AP --:--:--:--:--:-- try 1
wlan0 direct probe responded
wlan0: authenticate with AP --:--:--:--:--:--
wlan0: authenticated
wlan0: associate with AP --:--:--:--:--:--
wlan0: RX AssocResp from --:--:--:--:--:-- (capab=0x431 status=0 aid=2)
wlan0: associated
wpa_cli: interface wlan0 CONNECTED
dhcpcd[13080]: wlan0: dhcpcd 4.0.13 starting
dhcpcd[13080]: wlan0: broadcasting for a lease
dhcpcd[13080]: wlan0: offered x.x.x.148 from x.x.x.1
dhcpcd[13080]: wlan0: acknowledged x.x.x.148 from x.x.x.1
dhcpcd[13080]: wlan0: checking x.x.x.148 is available on attached networks
dhcpcd[13080]: wlan0: leased x.x.x.148 for 604800 seconds
I removed IP addresses, hostnames, and MAC addresses.

And that's it! Let me know how you go, especially if you have an Inspiron 9100. If not, be sure to check out the official site for more details:

Friday, 10 July 2009

Dell Inspiron 9100 Internals part 3: CPU cooling assembly

After removing the video card, the next step was to access the CPU fan. In the picture on the right you can see the Microprocessor Thermal-Cooling Assembly starting with the CPU fan at the bottom middle, running over the northbridge copper heat transfer pipe, and finally to the CPU heatsink. This Aluminium block has two copper pipes running to the left and right fans, for extra cooling.

Once I had got this far, I suspected the blockage was after the fan, but before the Aluminium block. I removed the video card (as you saw previously) and then the four screws on the block.

The block gave a bit of resistance, and then lifted. Experts would recommend you do this to a hot machine, and this is the reason why: There's the CPU nicely stuck to the block. oops! The CPU pulled right out of the closed ZIF socket! Note that you can't do this to a warm laptop, unless you're fast, as it takes time to get this far.

There's a great thread here about removing a stuck CPU. I think the dental floss is a bit over the top (and time consuming), so I used a heat gun. I placed the assembly upside-down so the CPU wouldn't fall off, and blew the heat gun (or hair dryer) on the two end fins. Stop when it's only just too hot to touch. Then only a tiny bit of pressure was required to lift the CPU. Don't apply pressure to the corner of the CPU with a screwdriver!

Here's the final shot showing no CPU or video card.
Make sure you cover the ZIF socket
with something to keep it dust free. And don't touch the CPU or heat sink heat transfer surface, as your skin-oils can deter the heat transfer.

Here's the cooling assembly. You can see the thick dust covering the channel. There was also dust all through the fins. (Again, sorry for the bad photos).

Now I cleaned the CPU surface and heat sink surface with alcohol and a lint-free cloth, and applied a covering of Arctic Silver. The next two photos show why it needed cleaning:

And now it's time to reinstall! Follow the pull-apart instructions backwards.

Take careful note of where the screws go as some screws were different sizes to the ones listed in the Dell guide. Also make sure you take care with re-inserting the parts. I cracked the display bezel and one hinge because I couldn't fit the centre hinge cover properly. Nevermind, they're only about US$25!

On the right you can see a gcc compile at 100% CPU usage. The CPU has only just started to heat up at 43 degrees C. It didn't pass 58 degrees after compiling my system for hours, and the fans were all at low / medium speed.

Finally, at idle, it's now 40 degrees C. (woot).

Oh, and by the way: I suspended before taking out the CPU, and I resumed days later without any software issues!

Dell Inspiron 9100 Internals part 2: Video card

Part 1 of pulling-apart my laptop is here.

In this part I'm showing pictures of the video card before and after removal.

Here is the exposed shot again:
At the top left you can see two sets of cooling fins with a copper pipe running diagonally to a daughter board. This board is my ATI Mobility Radeon 9700 M10 with 64Mb RAM (woohoo!). Other options are the Mobility 9700 with 128Mb RAM, and the Mobility 9800. (I wish I had the 9800...)

Below the heat sinks on the far left is a fan. One heat sink transfers heat from the video card (furtherest back) via the copper pipe you can see. The other heat sink transfers heat from the CPU via a copper pipe that runs under the video card. You can just see it running parallel to the back edge.

Follow the Dell instructions for removing the video card (and my disclaimer) in Post 1. It looks like this:
You can see the copper transfer pipe, and the cooling fins. Copper is excellent at transferring heat! You'll see why in Part 3.

The next photo shows what the system board looks like without the video card!
You can now clearly see the CPU heat transfer pipe, as well as a third copper pipe under the video card. The third pipe looks like its attached to the northbridge heat sink. This third pipe runs diagonally to the CPU cooler, and ends in a small aluminium heat transfer block under the black plastic cover you can see.

The video card slot is visible next the the fan. Kudos to Dell and other laptop manufacturers for making laptops almost as modular as desktops, however replacement video cards are hundreds of dollars! I can't find any cheap second hand parts. If you can, let me know!

Dell Inspiron 9100 Internals part 1: accessing the components

So I've had my Inspiron 9100 since 2003 or 2004 - when they were quite new. Back then the 3.0GHz P4 was a super machine, and even now it beats most light laptops with boot-up time and performance.

Lately it's been under a desk as a remote server, so I haven't seen much of it. I pulled it out recently and noticed the fans were spinning quite a lot, and the CPU temp was quite high - 60 - 70 degrees.

I pulled out the two side ventilators (fans) and cleaned a large amount of fine dust from the fans and heat sink fins. This has massively reduced the fan usage, and the CPU temperature is now down to 40 degrees at idle.

However there's one more fan - the CPU fan - that I couldn't easily reach. I could hear it all the time so I assume its suffering from the same problem: dust. I finally decided to pull it apart and clean it, and here is my progress. This is also an interesting look into how a Dell laptop wears over time - not too bad in my opinion.

First, CONTINUE AT YOUR OWN RISK! The pull-apart starts easy and low risk, but as soon as you pull apart the display assembly, video card and CPU you're in the high-risk area. If you break your laptop, you can keep the change from selling the parts on eBay!

Second, follow the instructions from Dell - they're the ultimate pull-apart guide and I only found them lacking at the very last stage (CPU fan removal).

Here's a grainy shot of the left hinge cover - there's plenty of dust there. (sorry about the bad quality - it's my phone camera). See the dust near the display attachment:

Now I've taken off the keyboard and surrounds. There's more dust:

Here is a shot of the laptop from the top as you would sit at it to work, but without the display, keyboard, touchpad, etc. The CPU fan is at the bottom centre.

Here is just half of the screws I removed (I count 30 so far). Next to them is the hinge covers:

This got me to some of the system board components. In the next post I'll show the removed video card, CPU and heatsinks.


Friday, 3 July 2009

The Twouble with Tcl

From time to time I do a bit of tcl. Mostly as maintenance for existing tcl programs. I haven't made up my mind entirely about it yet - I've seen some very powerful programs in tcl, and yet occasionally I'm still "surprised" by a feature.

I spent a couple of hours today trying to figure out why a tcl program of mine wasn't running, and so I've made some notes:

Real languages don't have reserved words

In tcl, you can redifine parts of the language in tcl itself. For example if you wanted to redefine if, just write a new function:
proc if {cond expres} {
puts "cond is $cond"
puts "expr is $expres"

set a 1
if {$a == 1} {
puts hello
Sounds neat. In fact proc itself is just a command that takes 3 arguements (name, arguements, and body). However, don't start using simple names in your tcl languages like this:
proc open {} {
set ::alarm_socket [open_socket $::options(-alarm_host)]

foreach host $::options(-hosts) {
verbose "open $host"
set ::sockets($host) [open_socket $host]
# set up an event handler for when data is readable on this socket:
fileevent $::sockets($host) readable [list process $host]
# initialise socket timeout with open time
set ::socket_t($host) [clock seconds]
Because open is what you might call a reserved word. (I should have known with open, but should I really have to remember all the reserved words?)

The error looked something like this:
$ ./test.tcl
invalid command name "::tcl::tm::UnknownHandler"
while executing
"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
("package unknown" script)
invoked from within
"package require msgcat 1.4"
("uplevel" body line 2)
invoked from within
"uplevel \#0 {
package require msgcat 1.4
if { $::tcl_platform(platform) eq {windows} } {
if { [catch { package require registry 1.1 }] } {
(file "/usr/lib/tcl8.5/clock.tcl" line 23)
invoked from within
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
(procedure "::tcl::clock::format" line 3)
invoked from within
"clock format [clock seconds]"
(procedure "alarm_timeouts" line 3)
invoked from within
... and so on. Yeuch! And it was encountered with this one line:
   puts "$::argv0: [clock format [clock seconds]]"
The problem? I redefined open, which was used internally by clock.

Real languages don't have types:

You can do lots of nice things in tcl without types, in a similar (but different) way to perl.
set a world
puts "Hello $a" ;# prints 'Hello world'
set a 1
incr $a
puts "$a + 2" ;# prints '2 + 2'
This looks normal to someone used to perl and tcl. Noticed how I don't need format specifiers or concat functions. You can also do this:

set a pu
set b ts
$a$b "Hello World"

Which prints:
Hello World

Real languages don't have comments

They have a comment command of course! And the comment command is a command that takes arguments (the comment itself) that aren't evaluated. Except that because of this, you can't have an unmatched brace in a comment:
# if ($sometest) {

The tcl solution?
if (0)
blocks or the like...


So if you haven't yet learnt tcl, I encourage you to find a tcl hackers tcl program, and delve into it to see just how it works.

If you try to learn tcl only by writing it and not by reading others' code, then you'll learn tcl with the habits you're used to, and you will possibly miss some of the powerful features.

After all, C programmers can program C in just about any language!

Monday, 1 June 2009

Evolution 2.26 - scrolling performance improves (finally!)

I recently upgraded to Gnome 2.26, and not noticing too many new features I just discovered this: Evolution 2.26.2 finally handles scrolling large mail folders effectively.

I have in excess of 1000 emails in some of my mail folders, and I have a Logitech MX400 Laser mouse which lets you disengage the "clutch" (the wheel that typically clicks in defined steps as you scroll it) so that you can do large freewheeling scrolls with one finger movement. This helps to navigate large documents, web pages, and folder lists.

Previously in Evolution, scrolling the wheel by a large amount meant that when the wheel stopped, Evolution would keep scrolling for some time as it tried to keep up with all the events.

Now, however, the folder stops scrolling as soon as my mouse wheel stops moving. Good stuff!

(For the record, Claws has had the nicer behaviour for some time, just in case you were thinking of telling me it was a new mouse driver!)

Thursday, 21 May 2009

Another Password Generator

So I wrote a password generator, why not?!

I had some free time recently, I was about to reset someone's password for a site I administer, and I thought it would be nice to have a small script generate semi easy to remember but semi secure passwords.

Firstly, I usually use either of these two one liners:
$ for ((n=0;n<10;n++)); if="/dev/urandom" count="1"> /dev/null | uuencode -m -| head -n 2 | tail -n 1 | cut -c-8; done

$ for ((n=0;n<10;n++)); if="/dev/urandom" count="1" bs="8">/dev/null | uuencode -m - | tail -n 2 | head -n 1 | cut -c -8; done

The results are similar. You get a bunch of passwords looking like this:

Which is handy for setting up lots of accounts, which I do occasionally. However, people hate them because 9FyV1zJq is harder to remember than their cat's name.

The script I just wrote (in Perl) uses word lists and random numbers to generate passwords like this:

Sure, these aren't as secure, but they're better than "tiggles".

Oh, and my wordlists come from

#!/usr/bin/perl -w

# A utility to create reasonable strength and semi-easy to remember passwords
# out of word lists and random characters.
# Copyright 2009 Iain Buchanan. Freely redistributable and modifiable.

use strict;

my @lists = ('/home/iain/personal/ispell-enwl-3.1.20/altamer.0',

my @wordlist;

foreach my $list (@lists) {
open (WL, "$list") or print "Couldn't open wordlist '$list': '$!', skipping.\n";

while () {

next if (length >= 5); # ignore long words
next if /^[A-Z]/; # ignore Nouns & abbvs.

push @wordlist, $_;
close (WL);

for (1..10) {
print $wordlist[int (rand ($#wordlist))];
print int (rand (999));
print $wordlist[int (rand ($#wordlist))];
print "\n";

Tuesday, 12 May 2009

The results are in: It's Apathy by a landslide!

Thanks to everyone who took part in my recent poll "What would you like me to post more about?" That is, all 6 of you, including myself. The results are as follows:

3(50%)IT related technical articles
3 (50%)
Linux howto's, tips & tricks
3 (50%)Renewable energy power station bio's
2 (33%)Reviews of my electronics (phone, set top box, espresso machine, etc)
2 (33%)Random thoughts & musings on anything
1 (16%)Personal & Family events
0 (0%)Dell Precision M6300 howto's for running Linux
0 (0%)I can't stand reading anything you write!

There were 6 unique voters, including myself. The poll ran for most of April, 2009. Voters could select multiple entries.


So what? Well, there were nowhere near enough votes for me to make any drastic changes. Most of my visits are for the ever-popular Vmware keyboard page. I can safely say that the results can be completely ignored!

If you don't agree, comment!

Tuesday, 14 April 2009

Stumbleupon stumbles on

Stumbleupon is the latest to make my whinge list. After registering eons ago, and never revisiting the site or hearing from them since, I just got this email:
StumbleUpon | Discover Your Web. Here are this
week's most popular bHistory, Music, Guitar/b
sites recommended by people like you on
Your 5 Favorites
Followed by an email full of links, with this in the footer:
StumbleUpon sends these emails based on the
preferences you set for your account. Your use of
our service is subject to the StumbleUpon Terms of
Service .
If you do not wish to receive weekly
recommendation e-mails, please login
and change the setting on your preferences page
Please note that it may take up to 14 days to
process your request.
Fourteen days? To process an automatic request? What are you doing Stumbleupon? Mailing the requests via Antarctica? Perhaps you're employing people to flip the bits manually to boost the economy...

Poll: What should I blog about?

Now that I get a few hits to this blog, I thought I'd let you decide what you would like to read.

I've created a poll you should see at the top of every page, until the end of April '09. Let me know what you would like to read. Comment if there should be more options. So far I have four votes!

Friday, 3 April 2009

Blocking port 25

I had a call from a friend complaining that they just purchased a wireless broadband stick (from Telstra using their Next-G network which is a HSDPA network using UMTS850MHz) and the could not send mail via their normal mail accounts.

A few minutes of checking found that Telstra and Bigpond block outgoing access to port 25 to anything other than their own mail servers.

The reasons are listed here [] as well as at other pages. This post will list why their reasons are flawed, and how to get around them.

Flawed Reasoning

Bigpond claims they manage the use of port 25 to "to prevent spammers sending unsolicited email using [their] network." OK, that sounds fair enough at first glance, but when you realise how easy this is to get around (use a different port, for example) then this reason becomes redundant.

Bigpond claims that other ISPs are taking similar steps and that their changes have been "proven to prevent some types of spam activity". However spammers, like advertisers, attempt to stay ahead of the latest trends, and as soon as one method of spamming is blocked, they will use another. Also Internode (as an example) blocks port 25 by default, but lets you turn this feature off.

Furthermore, spammers are setting up real mail servers around the world. In conjunction with a tailored trojan that uses a different port to send mail, Bigponds efforts are useless. In fact Spam levels are back to 95% of all email traffic!

Finally, you could pay the extra money for a fixed IP address from Telstra, and they won't block the port. In my opinion, this is shameless money grabbing. Please explain why a user on a fixed IP address is not susceptible to a spam sending trojan or virus?

Perhaps the spam is purposefully malicious, and Telstra would like to know whose account to suspend? Telstra (along with most ISPs) keep detailed logs of traffic and authentications, so they can easily tell which user from a dynamic IP address was accessing which sites at any point in recent history, therefore static IP addresses are no easier to crack down on.

More Problems than Solutions

Bigpond says that you can use their Bigpond mail server to send mail, and thus get around the port block. You can in fact do this, and still have your email appear to come from (and not

This solution is not ideal for two reasons:

1. Travelling
The frequent traveller, like my friend, is often on different networks. He must be able to use whichever network he is on and send / receive his normal email. To set up a different outgoing mail server, and perhaps a different profile (from whichever mail client he is using) for each network is both time consuming and pointless.

2. Your email looks like spam
When you send email where the FROM address is, but it goes through a different email server, the recipient's ( mail server may block or mark your email as spam.

This is because exactly that technique (using a FROM address and mail server that do not match) is used by spammers to send spam. The recipient mail server checks the DNS records of the sender (, and if they don't match the originating server (, then your email may be deleted, rejected, or set aside.

Getting around it

OK, so what do you do to get around it? By far the best way is to authenticate with your mail server, and use a secure port. By using a secure port (usually not port 25) Bigpond won't block your outgoing mail. In fact this should work for many networks that block port 25.

You have the added advantage that your mail is probably encrypted, or at least your password will be (don't rely on this to encrypt sensitive emails though, as you can bet it will be transmitted in plain text at some stage of the process).

Is my mail server compatible?
The best thing to do is try! Different mail clients do this in different ways:

Evolution 2.24.5
Edit > Preferences > Mail Accounts > Edit > Sending Email > Use Secure Connection

Thunderbird 3.0b3
Edit > Account Settings > Outgoing Server > Edit > Connection Security

Outlook [including Express]
You have to edit your account settings from one of the main menus. You may have to then choose View or Change existing email accounts. Then select the account and choose Change; then more settings (I think) and then you should see a secure option. Note the SPA option is not what you're looking for here, although you can use it if supported.

If you get timeouts or errors sending mail, then try slightly different options (if you have a choice).

Monday, 30 March 2009

Ba-a-a Ha-a-a Ha-a-a

LED's on sheep? Now this would have taken a long time to prepare...

This appeals to my nerdy nature! Thanks Bort for the link!

Friday, 27 March 2009

Linux is about choice (pt 2)

So you've seen my hasty "Linux is about choice" post already. In all fairness to Zimbra, it's a great product, and I'm sure many people rightly swear by it.

Part two of my rant deals with another situation that is slightly different -
"Why then, do applications (or their developers) decide to take away [or keep] that choice?"

While the Zimbra example is easy to argue (and has been suggested already) as a "bug", my second example could be purely opinion.

Think about the great program gnome-power-manager. For those of you who don't know Gnome / Linux, gnome-power-manager is an all-in-one laptop battery monitoring tool. It has the standard battery icon showing charge level; a power history graph showing power history, voltage history, charge profiles and more; as well as LCD backlight, sleep and hibernate controls. And in my opinion, it does a a great job!

(Should any of the developers involved read this, my intention is not to pick on or make fun of you, I hope to purely use the issue as an example, not the people involved!)

Ok, so I was configuring gnome-power-manager to handle everything it is designed to handle, with the exception of power off / hibernate. I use ACPI to hibernate my machine when the power button is pressed, and when the battery power drops to below 5%. (Why ACPI? Because it works regardless of weather I'm logged into Gnome or not; or even if X is not running at all).

Here are the related power button options:
"When the power button is pressed", the options are (Ask me, Hibernate, or Shutdown)
"When the suspend button is pressed", the options are (Do Nothing or Hibernate).

There is no option to "Do nothing" when the power button is pressed. In fact, why are the four options not available for either button? (Ask, Hibernate, Shutdown, Nothing).

In my opinion, this would be the ultimate options offering the most flexibility, without overloading the user with a bulk of detail in the control panel. And yet it looks like my opinion is not understood. It appears the primary reason is because including the "Do Nothing" option would mean gnome-power-manager is doing "half a job".

Could you not forsee that parts of your application may be highly desired, and other parts not so? Given the large "roll your own" background of so many Linux users, why would that mantra not continue as far as possible? Why does Evolution (and Claws and Thunderbird), Firefox, and so on have a plugin framework? Or an external editor option?

Precisely because different people use Linux in different ways. And this is why Linux is about choice!

OK, I promise I'll get back to a technical blog post next :) And if you're interested, the bug is here.

22 degrees C, and light snow!

A few weeks ago on a trip to New Zealand, I had some restrictive internet access, so my usual RSS feeds and news reports weren't working.

I set up iGoogle (which lets you customise your google home page) to keep me up to date.

One day I noticed the weather report: 22 degrees Celcius, and light snow! I would have liked to see the snow, especially given it was summer!

Here's the screenshot:

Linux is about choice (pt 1)

I argue that Linux is about choice. You may argue that is about something else. I think that's fine, so long as we don't argue against each other, but for each other. Why? Because Linux is about different things to different people, and that's great! That's why it is so attractive and diverse.

Why then, do applications (or their developers) decide to take away that choice? Is it because they really don't see how other people may like to use their programs? Fair enough. Is it because they want to impose their ideas on how and why their program should be used? Not fair. What if you provide polite detailed examples of different use cases, and yet the response is "no thanks, we don't / won't do it that way".

You've guessed by now this is a rant. What sparked it off? Two recent applications are giving me grief. This post will look at the first, and why:

Zimbra webmail client

Zimbra makes a great webmail, calendaring (and others) suite. However, I noticed that since I set up my Zimbra calendar (and so did 20+ other people here) that any appointments people send me are being automatically accepted. So what? Well, from time to time I get a (usually pointless) meeting request that I don't want to accept, and yet I find Zimbra has accepted it, even when I'm not logged on.

No problemo, just find the preference and turn off "automatically accept meeting requests".

The only options that look close are in "preferences > calendar":

Free / Busy:
[ ] Allow all users to see my free/busy information
[ ] Allow these users to see my free/busy information:
[text box]

[ ] Allow all users to invite me to meetings
[ ] Allow these users to invite me to meetings:
[text box]

So first of all, I chose "Allow these users to invite me to meetings:" and left it blank. This didn't work, in fact the behaviour was exactly the same as before.

So secondly I kept "Allow these users to invite me to meetings:" but entered my email address in the text box. Surely this would work?

Well it kind of worked. Now when people send me appointments, they only show as attachments which I can do nothing with (in Zimbra webmail). I can't even add them to my calendar. I suppose I should be happy that at least they don't get automatically accepted...

So my next solution was to try Evolution. I shared my Zimbra calendar and loaded it into Evolution. Great! There's all my appointments! However, when people send me meeting requests, I can't add them to my Zimbra calendar from Evolution. Even though Evolution asked me for the user name and password.

Then I gave up. I've deleted my Zimbra calendar and gone back to plain old Evolution.

Your thoughts, gentle reader? Am I expecting too much? Is this such an edge case that no Zimbra developer could possibly have forseen it? I think not.
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan