Monday 1 February 2010

Linux Friendly Mobile

Changed handset

This would be 4th mobile phone I have owned. A Nokia 5130.

First was an LG model, now discontinued. The next was a Samsung SGH X 168, about which I wrote here. When that got stolen, I got an SGH X 210, again from Samsung.

Initially, mobile handsets for me, were just phones I would carry around in the pocket. Creating backup of contact lists or SMS'es were not an issue. But with the X160, it did become an issue. When it was stolen, I simply did not have adequate time to research on another handset, I simply walked into the nearest Samsung shop, and asked for SGH X 160. I was told that it was discontinued, and hence went in for the next available set, the X 210. I was hoping for improvements in G|Wammu or gnokii support over time. It never happened.

With passage of time, my contact list was growing, and manually copying the contact list was apain. And installing a copy of windows for having to use the mobile manufacturer's software for a few minutes several months apart was right royal pain in the you know where.

There was no way I am going away from the operating system on my desktop. There was no way I am going to buy a phone which is fully supported on the OS I use. This eliminated several manufacturers.

Research started from the documentation on gnokii, wammu and gammu, the applications which connect to mobile phones on a GNU/Linux system. I use a Debian Sid installation, updated every 3 weeks, my OS was fairly recent and stable. So, nobody could complain that I use an old version of anything. With that back ground, in mind, I started searching for the mobile model.

Step one was to fix my budget - I did not want a low end phone. I would have settled for just a phone, which does nothing else except make and receive calls, but I also travel close to 20 hours a week commuting among various offices and places. And trains are boring nowadays. And reading books was out of qeustion - you cannot even flip a page with somebody poking you in the ribs. I needed a phone with a media player.

Step 2 was A quick search on online shopping sites, which shows that a figure of 4 to 6 K can fetch reasonably good phone with excellent media capabalities. At this price range, all phones had FM radia, bluetooth and camera capablities. Nothing else matter - just a good media player, and capability to make and receive calls (notice the subtle shift in order of preference? hahaha.).

Next step was going through application documentation, and their websites. IT was quite disheartening. Gnokii had virtually no support for anything except Nokia. A cursory look at Wammu site shows that of the 45 manufacturers listed, only LG, Motorola, Nokia, Samsung, Siemens and Sony Ericsson had more than 50 phones listed. And of the phones listed, every manufacturer except Nokia had more unsupported phones than supported phones in the listings. Even among the supported phones, the support was very limited. This meant that the hand set manufacturers do not care for the users' choices and requirements.

The search left a very bitter taste in one's mouth. Both LG and Samsung handsets were very good in terms of build quality and durability. Both the handsets have weathered quite a few "flights" through air - courtesy my two kids. All the previous 3 handsets were little more than scratches when I discarded / lost them.

Additionally, I have invested quite a sum mostly from my small earnings during early days of my career into CDs, and I wanted to listed to the music on the go. So ability to copy files from the PC to the phone was of paramount importance. Standalone media players were very cumbersome - with need to carry along additional chargers and head sets.

Thus, finally, the search narrowed to Nokia 5130. What clinched the deal was the "full support" listing on Wammu site, plus the use of a normal stero jack for the head sets, and use of standard USB jacks for connectivity and bluetooth. This meant that I did not have to run around searching for a "nokia headset" with the appropriate connector to listen to music. I did not have to run around searching for a USB cable if I was forced to use a USB cable. Above all, I did not have to switch operating systems to back up my phone.

Within 15 minutes of reaching home, my phone was loaded with backup of my contact list from the old phone. (The X210 is supported by wammu/gammu in a very limited way).

Finally tried to visit Nokia's music store. That site, however, will not work with any browser except M$ IE. Too bad for them (Nokia). I get my music from elsewhere - no - NOT from the "sharing" sites.

Tuesday 5 January 2010

Flashing BIOS on a Linux Only System

Flashing BIOS for Linux only system

Linux only system and BIOS flashing

Ever faced a need to flash your PC's BIOS?

I was facing this issue ever I got this MSI Neo K8M board 5 years back. The kernel CPU frequency scaling would never work; and the problem was traced to a BIOS bug.

Flashing BIOS was a daunting task for me - first, there was no DOS available. Finding reliable floppies was next to impossible. I once purchased 4 different floppies from 4 different shops in 3 districts, but none would work the second time I inserted them.

And darn'ed Wipro UPS was not very reliable. Worse, it had no cold start feature. Any power cut in between the flash process, and I would be stranded.

I had no choice except to put up with up the inability to use cpufreq and a noisy CPU fan. I slowly realised that there is a good reason why the BIOS option was called "Cool'n'quiet".

That was till I hijacked a thread on FireFox came up in the Goa Linux Users' Yahoo groups. (Ilug-goa at yahoo groups dot com).

Edgar D' Souza was mentioning a Core 2 duo Intel processor running at 800 MHz. And poor me, who was yet to see frequency scaling thought it was a typo.

Somewhere towards end of that thread, Dhaval Giani said:-

 > Update your BIOS then. Laziness is not a good enough excuse to use up
 > extra power!

That was reason enough to work hard. But you can hardly call issuing "apt-cache search bios" from the command line as "work".

That command produced 2 pages of text. The lazy man I am, I decided to do some more hard work. Out comes

apt-cache search bios |grep bios

That yields just 4 lines. 4 very useful lines.

paivakil@home:~$ apt-cache search bios |grep flash
amideco - Decompress flashfiles equipped with an AMI BIOS
awardeco - Decompress flashfiles equipped with an AWARD BIOS
flashrom - Identify, read, write, erase, and verify BIOS/ROM/flash chips
phnxdeco - Decompress flashfiles equipped with a PHOENIX BIOS

about 45 seconds later, "flashrom" is installed. In another 10 seconds, I have gone through the man pages. In next 50, I realise that I have not learnt anything from the man pages. So, I do "flashrom -h", which is far more helpful.

"flashrom - r oldbios.old" dumps a backup of the old bios into file, "oldbios.old". (Never mind about how the BIOS is going to read that file, which sits on an ext4 filesystem, on a SATA drive, in case things go awry.)

The update files were already downloaded from the official MSI site eons ago, so finding them was never a problem. I go ahead and do:-

flashrom -w A7032VMS.370

Couple of seconds later, I am told that the bios is written successfully.

I reboot, and am disappointed that every thing seems to be very familiar, and old options stay that way. That is till I notice that the bios set up utility version has changed.

So, I boot up, upgrade the BIOS another couple of time (I am upgrading from version 3.20 something to 3.50 first.

Each reboot goes smoothly, and finally, version 7.00 of the BIOS is also installed.

In less than 40 minutes, I have flashed the BIOS 4 times!!! In between, I have composed mails to the Goa Linux users' group too.

Things cannot get any easier, right??