cro's place

32bit Linux and Vodafone 3G Dongles

Posted in Mobile, Ubuntu by cro. Monday September 29, 2008.

In a follow-up to my post about 64bit Linux and Vodafone 3G Dongles, here’s how I got it working under 32bit linux:

  • Download and install beta3
  • edit your blacklist file and blacklist airprime
  • remove airprime (modprobe -r airprime)
  • Plug in your dongle
  • Run the Vodafone Mobile Connect software

I’m currently connected using my 3G dongle under Ubuntu 8.04 (32bit) – everything is working fine.

64bit Linux and Vodafone 3G USB Dongles

Posted in Mobile, Ubuntu by cro. Monday September 1, 2008.

After a little bit of work and a strange error, I managed to get one of Vodafone’s Huawei E172 USB 3G dongles working with 64-bit Ubuntu.

I used the 2.0beta3 AMD64 drivers (I’ll be trying the i386 ones on my laptop later), however the device, whilst detected, would never connect – it would always immediately hang up after CHAP authentication.

Digging around it became apparent that if an incorrect APN is used, the connection will either hangup immediately, or bad IP addresses will be delivered.

So, here’s the details needed:
APN: Internet (with a capital “I”)

Using this APN with the provided username, password and dial number, and the 20betas3 Vodafone Mobile Connect software I was up and running pretty much straight away.

Kudos to Vodafone for making the effort to release a Linux version of their connection software.

ATI 8.8 under 64-bit Linux

Posted in General, Ubuntu by cro. Wednesday August 27, 2008.

I’ve been conflicted of late with the newly released 8.8 drivers for ATI cards. I have both an X1950 Pro in my home machine (under Windows XP) and an HD4850 in my work machine, however the 8.8 drivers just refuse to work under 64-bit Linux, no matter how many times I compile them. The 8.7 drivers work fine though, so it’s not a total loss when it comes to getting things like Compiz and the Cairo dock working (and the cylinder deformation looks rather spectacular across two monitors).

However, the 8.8 drivers introduce crossfire support under Linux (OK, so I don’t really need this just yet, but a 3rd monitor could be useful), and also support overclocking of the graphics card. Some of the other bug fixes would be nice, but I can live without them until proper support is forthcoming.

Beyond Good and Evil 2 Coming

Posted in Games by cro. Wednesday July 9, 2008.

One of my favourite games of the past few years is a game called Beyond Good and Evil. It never got a lot of press, but did garner a dedicated fan base.

Now Ubisoft have revealed they are finally making a sequel, most likely for the Xbox 360, PS3 or both.

Now, if only someone would develop a sequel to Zanzarah

Real-time Racing

Posted in Games, General by cro. Friday June 13, 2008.

A story from the games industry popping up today has word of a patented technology that would allow tracking of vehicles in a race, which can then be inserted into a simulation, allowing gamers to participate in real-time with a real-world race.

During the BarrysWorld days, we sponsored a racing car for a while, and one of the conversations we had with the racing team at the time was the possiblity of taking a copy of the car’s real-time data feed and inserting this data into a racing simulation, allowing computer gamers to participate – albeit virtually – in a race as it happened, or to replay a race with perfect accuracy.

Events conspired to prevent this, however the idea was so blindingly obvious I’m surprised it’s taken this long for the idea to gain traction.

Presario F500, Wireless and Ubuntu 8.04 (Hardy Heron)

Posted in Ubuntu by cro. Monday March 31, 2008.

The recent release of the Ubuntu 8.04 Hardy Heron beta prompted me to investigate, and run the dist-upgrade. The Gutsy Gibbon beta release and subsequent upgrades was a relatively painless process, and Ubuntu gets better with every release.

Two things that did concern me, as they seem to impact every time I upgrade, were the proprietary NVIDIA drivers, and the Broadcom wireless. Luckily, the upgrade took care of the NVIDIA drivers fine (although I haven’t tested out World of Warcraft yet), but as expected the wireless totally failed to work.

A little investigation threw up instructions (also enumerated on other sites) on how to use fw-cutter to install new drivers.

In the interest of documentation, here’s the process I used to re-enable wireless on my Compaq Presario F500 laptop:

Starting in my /home/ directory, I created a Drivers/wireless directory – I always hang on to old drivers just in case.

sudo apt-get install build-essential
mkdir Drivers/wireless
cd Drivers/wireless/
wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-011.tar.bz2
tar xjf b43-fwcutter-011.tar.bz2
cd b43-fwcutter-011
make
cd ..
export FIRMWARE_INSTALL_DIR="/lib/firmware"
wget http://downloads.openwrt.org/sources/broadcom-wl-4.80.53.0.tar.bz2
tar xjf broadcom-wl-4.80.53.0.tar.bz2
cd broadcom-wl-4.80.53.0/kmod
../../b43-fwcutter-011/b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta.o

A quick reboot, all was well!

I’m still investigating all the new things in Hardy Heron – so far Firefox 3 is the only thing I’ve really used, and I’m not entirely convinced yet…

Update
Seems that the B43 driver isn’t the best yet, and a rollback to ndiswrapper was in order.

Social Network: Friends

Posted in Articles, Social Networking by cro. Friday January 4, 2008.

We all like friends, and having the ability to add and remove friends within a social network is critical. How you deal with managing friends from a design point of view is an interesting one.

There are many approaches, depending on the type of information you want to store about the relationships that are created, whether you want to know who initiated the friendship, when it was created, when it was accepted (or rejected even), the type of friendship and so on.

For my little mobile social network, I’m going to use a simplified form of friend relationship tracking, as all I’m interested in is whether or not a relationship exists between two people. To do this, I’m going to use a simple keyless table that holds two values: userID and friendID.

What I am interested in here is whether or not there is a relationship within the table between two user IDs. This tells me whether or not two users are potential friends, or whether a friend request has been made. To do this, I simply enter a row in the database containing a person’s userID, and the userID of the person they wish to befriend. This sets up a one-way relationship in the friends table, indicating that a friendship request has been made. The actual mechanic of processing the friend request I’m going to pass off to the messaging subsystem (which I’ll be covering in another post).

Now that we have a single row in the database, a simple query against a userID will tell me how many ‘friends’ this person has. Of course, this will include all unaccepted friendships, which is not necessarily something we want.

However, this approach works both ways: once a friendship is accepted, a second row is entered in the database with the friend’s userID listed first, and the requestor’s userID listed second. This allows us to write very simple queries to return a complete list of a particular userID’s accepted friends, or a list of a particular userID’s friend requests, since our ‘key’ is the first column in our two column table.

And rejecting a friend request is as simple as removing the original row from the table.

This schema can obviously be expanded to include timestamping should this be needed, or friend type, or anything else really – they key concept here is that what’s of interest is whether or not there is a relationship in the database, not the content of the returned rows (i.e. rowcount = 0, 1 or 2 – this is the information I want).

Customising the “Pictures folder” screensaver in Ubuntu Gutsy

Posted in General, Ubuntu by cro. Friday January 4, 2008.

One of the default screensavers included with Ubuntu 7.10 is one that will display whatever pictures you have saved in your ‘Pictures’ folder (/home/<username>/Pictures). The screensaver will randomly display a picture from this and any subfolders.

However, there’s no way of customsing which folder the screensaver reads if you want to use your Pictures folder to store pictures, but manage which of these images is used.

A workaround is as follows:

  • Create a new folder somewhere (it doesn’t have to be under the ‘Pictures’ folder)
  • Open a terminal window (select Terminal under Accessories)
  • enter the following:
    gksu gedit /usr/share/applications/screensavers/personal-slideshow.desktop

    (enter your password if prompted)

  • Scroll down to the line (near the end) that begins
    Exec=slideshow
  • Add the following after this command:
    --location=<your pictures path>

    (You will have to use standard escape sequences if you have spaces in the path.)

  • Here’s an example:
    Exec=slideshow --location=/home/myusername/Pictures/My\\ Screensaver

And that’s it. Save the file, and restart your screensaver. It will now only search for pictures in your chosen folder.


Copyright 1998-2009 Tom Gordon