Wednesday, January 11, 2006 2006 - Brisbane

Quick Facts
  • IT Dude
  • Injured back at the gym
  • Doctor's orders - no alcohol for the weekend
  • Flatmates were away for the weekend
  • Multiple kickass IT projects to complete

I began on Friday afternoon by unloading my car filled with goodies and converted the dining room into nerd central. Whilst setting up, the following had transgressed:

  • took my shirt off - 'IT guys are so hot!!' - Paris Hilton
  • started blogging the weekend
  • made sure that the music was pumping out of my laptop
  • put the rug down infront of the table to protect the carpet for my office chair
  • relocated my speakers to the table
geek setup pics..

Oh what's that in the background, oh that's the view from

COMPLETED - 1837 - 20060106

Bluetooth Remote Control

The time between between me reading about this setup and me buying a bluetooth adapter for my laptop was 10hrs, 1hr if you don't include the time I worked today.. This was a seriously 'fully sik bro'(tm) project that I looked forward to not getting to work.

Inside this large box is..

my new bluetooth adapter..

Everything underneath the adapter can go in the bin (windows drivers, warranty (fingers crossed), regulatory compliance notices, etc).

Next step was to check out the BluetoothSetup page on the Ubuntu wiki. Albeit, a generally OK wiki, I did hit a sticking point that I should not have had to, sudo hidd --search would not pick up my phone (which is HID-compliant). I will further research my shortcomings with this section of the page and edit it. Even though this section did not work, I did try hcitool scan which indeed confirm that I haven't purchased a dud.

After confirming the underlying protocol stack was working, I tried my hand at GBTcr. What a challenge that was. After spending hours debugging Makefiles and the configure script, try running the following command prior to following the instructions contained on the site:

sudo apt-get install libbluetooth1-dev libsdp2 libsdp2-dev g++ xmms-dev cvs gnome-bluetooth libgnomeui-dev libbtctl2-dev libgnomebt0-dev libxtst-dev

* Minor gripe: The problem with a fair portion of the documentation out there on installing from source is that the developer forgets the fact that they have already have installed a gazillion development packages prior to testing their installation instructions. Developers need to perform a clean install of their package onto a clean installed OS - this has been made alot easier with the VMWare player. The VMWare Player allows users to run a pre-created VMWare image, such as the Ubuntu image and is free of charge.

Part of the experience of getting GBTcr to run was understanding configure and Makefile errors alot better. In a very high level way of describing things, if the Makefile complains that it cannot find a file named config.status (/bin/sh: ./config.status: No such file or directory), it is a good chance that the configure script that was run prior to make did not fully complete and exited earlier without providing an accurate error message on the command line. The creation of the config.status file is usually the last step of the configure script. Debugging can be performed by looking at the last line that was output by the configure script inside the config.log file, in my case it was 'checking for GNOME'. Inside config.log, I had discovered that the configure script had bombed out because of the following error:

Package libgnomeui-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libgnomeui-2.0.pc' to the PKG_CONFIG_PATH environment variable
No package 'libgnomeui-2.0' found

Basically what this had meant was that the configure script could not find the libgnomeui-2.0.pc file on my system. The best way to obtain this file is to search for the file in the Ubuntu packages site to identify which package you need to install. The package required is usually a similarly-named dev package. On my last error that I received on trying to make GBTcr, I was lucky to put the right string into the Ubuntu packages search box. The make command had failed with "/usr/bin/ld: cannot find -lXtst". I had just searched for a package named Xtst and then installed the dev package.

Now it was time to run GBTcr, yay! I tried to follow the instructions posted with no luck connecting back to the PC. Basically my "Accessories" menu remained grey and I was not prompted on my phone to authenticate back to the PC to control it. My phone is a Sony Ericsson K750i (w/2 mpixel camera!) which differs from the phone Herman Vega had used to document GBTcr, a Sony Ericsson T610. To get to the Accessories menu on a K750i, go to the menu, Settings, across to the Connectivity tab, then down to Accessories.

The only way I managed to initially connect to the phone was to run GBTcr as root via sudo ./gbtcr. When I had run it as an unprivileged user, and sometimes when running as root, the connect had failed with the following error: Invalid or incomplete multibyte or wide character (84). I have no idea why the error would appear sometimes and not others whilst logged in as root, and no idea why it happens to an unprivileged user. I did find one document that had discussed the error occuring over Bluetooth networks, however it was written in Catalan and it has been a while since I have brushed up on my Catalan (and a while since Google/Altavista have brushed up on theirs as well). I may approach the Catalan Ubuntu users group (if there is one) to assist with translation.

Another funny quirk was that when the PC connected to the phone, the phone displayed the "Allow this device to access the Internet through your phone" prompt instead of the "Allow this device to use your mobile phone as a remote control" prompt that I received in the steps below for remote controlling my laptop.

I will contact Herman Vega with my findings and seek to work through the operation issues that I am having with him. I would really like to see this program running on Ubuntu. If I do have some success, I will put in some solid work on the doco for the project, then I will make this my first Ubuntu package I have created to get into the Universe repository. It is still early days..

All hope was not lost for the cause of supreme Bluetooth awesomeness. On my phone there is a Remote Control application in the Entertainment menu. It even has the Bluetooth icon next to its menu entry. Now this was a "fully sik bro"(tm) discovery. I did manage to use each of the three menu items of the Remote Control - Presenter, MediaPlayer and Desktop - pretty much what GBTcr offers is already on my phone. The Remote Control runs over the HID protocol and can be setup with these instructions (phone instructions are denoted with a ):
  • press the middle button above the directional pad
  • Bluetooth
  • Visibility
  • Show phone
  • Turn on
  • My devices
  • Add
  • select your computer and enter the pincode contained in /etc/bluetooth/pin
  • hcitool scan # to obtain the MAC address of the phone's Bluetooth adapter
  • sudo l2ping 00:12:EE:0A:0A:0A
  • return to the previous menu
  • Visibility
  • Hide phone
  • sudo hidd --server
  • sudo hidd --connect 00:12:EE:0A:0A:0A
  • "(your computer) requests to use your phone as remote control Allow?" Yes
  • "Allow connection" Always
Now this part is a little tricky, basically you have to be watching your phone screen when you attempt to connect to it to watch when the Bluetooth icon on the phone changes to display the two little blue arrows. My phone is my camera, so I cannot pictorialise this, well, I could by stealing the icon off someone else's page, but I only will if there is a demand.
  • go to Entertainment -> Remote Control and have menu ready to select which type of remote control to use
  • sudo hidd --connect 00:12:EE:0A:0A:0A
  • as soon as the Bluetooth icon changes to show the two little blue arrows on the end of the "B" - press Select on the phone and you should now be able to remote control your PC/laptop
The final result is I have two options for remote controlling my laptop using Bluetooth: GBTcr and my phone application. GBTcr needs to properly pair with my phone to allow me to access the menu. Using my phone needs me to find a solution to properly bind my phone keys to the right actions in the individual programs.

The Presenter menu in my phone worked a treat with OpenOffice2 Impress with the keymappings mostly covering all the options needed. The same went for the Desktop menu, which provided such options as ALT-TAB and a "current window <-> previous window" button. The problem was with the MediaPlayer menu.

After trying different media players such as xmms, beep-media-player, rhythmbox, totem and realplayer, I had no luck with finding a player that had matched what was being sent by the phone. Realplayer did come close, however the MP3 output is fairly terrible. I had also played with various plugins for xmms and beep-media-player, with no luck. System -> Preferences -> Keyboard Shortcuts provided no help either and it also did a good job of disabling my 'P' and 'A' keys. I read up about Banshee, but I do not want mono on my low-spec laptop as I already have one bloated virtual machine (java) installed. Basically, to get it working, I need a way to map the keycodes sent by the phone (captured by running xev) when I connect my phone to the laptop.

COMPLETED - 0135 - 20060107

WEP to WPA Migration

Ever since I had purchased my SMC2835W PCMCIA card, I have been a little disappointed that the Prism54g working group did not acheive WPA and now there is a complete new focus. I am glad that they have restarted the project that had seemed to be stagnant for the end half of last year. I came across the WPAHowTo on the Ubuntu wiki and it states that wpa_supplicant -h lists the chipsets that it supports, which includes prism54. As an aside, I am not interested in getting ndiswrapper to work on my laptop for WPA, because 1. it is not Open Source and 2. it uses too much Windows stuff for my liking.

After spending hours trying to setup WPA for my wireless card, I had re-discovered that prism54 still does not support WPA and, at this point, it appears that it won't in the future either. I don't think this is a "watch this space" subject. It is somewhat disappointing as it bucks the trend in linux hardware projects which are thriving at the moment.

During the attempted WPA setup, I had came across some issues to do with the running of wpa_supplicant. The following error occurred when I first attempted to run wpa_supplicant:

error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library

This error was caused by a missing library and I have subsequently updated the WPAHowTo on the Ubuntu wiki, along with other corrections including the fact that prism54 is not supported.

COMPLETED - 1500 - 20060107

Network Setup

My trusty ADSL modem was dug up to provide the switch configuration needed for the next set of projects. My laptop will provide the uplink to the Internet via the wireless PCMCIA card. All other devices can access the Internet by using the laptop as their default gateway. As I did not wish my server to speak with anything else but my laptop and vice versa, a single crossover cable will be connected to the laptop when the need arises.

The main objective was to get everything onto the same subnet. As all devices on the subnet had static addresses, I had decided to turn off the DHCP capabilities in the ADSL modem and turn it into a pure switch. I had to initially configure the laptop's interface to access the ADSL modem to access the configuration pages. After turning off the DHCP on the ADSL modem, I also turned it off on the laptop as two of the other machines had to provide DHCP to a device on the network.

COMPLETED - 2310 - 20060107

UbuntuOnSunRay Bug Hunt

I carried out a full installation of the SunRay Server Software 3.1 on Ubuntu Breezy Badger as per the UbuntuOnSunRay page on the Ubuntu wiki. The purpose is to confirm all bugs/issues and to notify/discuss the bugs/issues encountered in order to have them resolved.

Although I have lost count of how many times I have performed the steps needed to get a working UbuntuOnSunRay/CorporateUbuntu server, I still manage to get snagged on something. Well, even though I thought I was using my mickey-mouse, no-mistakes doco, room for improvement still exists.

During the new installation, no new bugs/discussions were started as the existing bugs were reproduced and the existing bug documentation was improved. Bugs and discussions will continue to be added during the next few weeks.

COMPLETED - 1410 - 20060108

UbuntuOnSunRay Failover

The last alternative configuration of the SunRay Server Software (SRSS) that needed testing under Ubuntu was the setup of a failover group of SunRay servers. The intention was to see what advantages failover provided and to see how the failover had worked between the servers.

The preparations for setting up the failover between the servers was an interesting part of the project. I had to perform the following on either one or both of the servers to prepare them to be part of the same failover group:
  • uninstall SRSS
  • change IP address
  • change /etc/hosts file entry
  • disable LDAP authentication
  • disable NFS mounts
  • disable Automounter
  • change DHCP server settings
  • reinstall SRSS
I had managed to not only perform the above, but I had also managed to setup a failover group running on Ubuntu. I will be documenting troubleshooting steps when I break the CorporateUbuntu wiki up into smaller wikis for the serious issues with NFS and LDAP. I will also be documenting in another wiki on how to successfully change the IP address of a SunRay server.

What does a failover group provide? Not a great deal. It does not provide shared session management, meaning if one of the servers goes down, you will still lose you current session and have to login again on the new server. The only evident function a failover group seemed to do is to replicate the LDAP configuration of SRSS and to ensure that members of the failover group were serving the same versions of firmware. My $0.02: Failover - not worth it..

COMPLETED - 1720 - 20060108


The proceedings of 2006 drew to a close at the completion of the SunRay Failover project. The need for some serious packing-up music arose and was met with the loud playing of Baha Men - Who Let The Dogs Out.. The one-hit-wonder gem was followed by more early 2000s cheeze: Bomfunk MCs - Uprocking Beats, Bomfunk MCs - Freestyler and Bloodhound Gang - Bad Touch. Lucky for me was down, so my profile remains untarnished by a badly taken tangent. The end result of the energising music can be viewed below along with a belated Christmas present I had received that afternoon, a book about the humble dodo:

COMPLETED - 1840 - 20060108


Post a Comment

<< Home