Friday, March 21, 2008

Blue Ant z9



Wonder how I lived without one of these for so long. Guess, wanted to abstain from moving around town looking like one of those self styled and self proclaimed "secret agents". But, the sound quality, convenience and ultra light weight makes me join their league - I apologize. This is my first Bluetooth headset so can't make an objective comparison.

I have pretty much stopped picking up the mobile directly after this. I don't wear this on my ear all the time, just clip it on my shirt. When I receive a call, this speedily and miraculously gets worn on the ear. One doesn't insert this into one's ear canal, it justs rests outside -- very comfortable and easy to remove and put on quickly. Has dual microphones and voice isolation (in software) which is pretty good and provides clear sound to both the listener and the one whom you are talking to.

Most of all, very good for times when one has to take that important call while driving.

For using this in Ubuntu:
Put z9 in pairing mode (or reset mode)

$hcitool scan
Scanning ...
00:1C:D8:01:9A:21 BlueAnt Z9 v3.4

$sudo modprobe snd_bt_sco

$btsco -v 00:1C:D8:01:9A:21
btsco v0.42
Device is 1:0
Voice setting: 0x0060
RFCOMM channel 2 connected
Using interface hci0

For Skype:
Options > Sound Devices >
Sound In :BT Headset (hw:Headset,0)
Sound Out :BT Headset (hw:Headset, 0)
Ringing:BT Headset (hw:Headset, 0)

VLC Player:
Preferences > Audio > ALSA > Refresh: BT Headset: BT SCO PCM (hw:1.0)





retails for 99$. Got mine for 59$ on ebay
Blue Ant z9

Saturday, February 23, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 3

Next on the list are some GPS mapping softwares for linux. A popular one is GPSdrive. Installation was easy, Ubuntu has a debian package in its repositories. Sadly, does not have decent maps for India (see below) . Will, pass for now.



Now we try Navit. By default it too does not have maps for India. But, the documentation says that it works with the following -

- OpenStreetMaps : display, routing, but street name search isn't complete
(see http://wiki.navit-project.org/index.php/OpenStreetMaps )
- Grosser Reiseplaner and compliant maps : full support
(see http://wiki.navit-project.org/index.php/European_maps )
- Garmin maps : display, routing is being worked on
(see http://wiki.navit-project.org/index.php/Garmin_maps )

Install Navit
cvs -d:pserver:anonymous@navit.cvs.sourceforge.net:/cvsroot/navit login
cvs -z3 -d:pserver:anonymous@navit.cvs.sourceforge.net:/cvsroot/navit co -P navit
cd navit
./autogen.sh
./configure
make
make check
sudo make install

download planet.bin into /usr/local/share/navit/maps/ from: http://maps.navit-project.org/ct.org/ (1.3 GB file)
sudo gedit /usr/local/share/navit/navit.xml
map type="garmin" enabled="yes" data="$NAVIT_SHAREDIR/maps/planet.bin"



Optionally, If you don't want to download the maps for the whole planet you can try getting only the map tiles you are interested in:
wget -O map.osm http://www.openstreetmap.org/api/0.5/map?bbox=73.2688,17.3825,73.56, 88,17.6825
the format is:
you can get the co-ordinates from:
http://informationfreeway.org/



Finally, If you would rather prefer Garmin maps (but, mind it these are pretty hopeless for India):

svn co http://libgarmin.svn.sourceforge.net/svnroot/libgarmin/libgarmin/dev libgarmin
cd libgarmin
./autosh.sh
make
sudo make install
re configure and re make Navit.

download garmin map tiles from:http://garminmapsearch.com/
sudo gedit /usr/local/share/navit/navit.xml
map type="garmin" enabled="yes" data="/usr/local/share/navit/maps/73551480.img" debug="4"


Friday, February 22, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 2

Well, the first though that struck me, was ah ha! why not Google Earth. Got me self a subscription to Google Earth plus only to be disappointed - it cannot talk to gpsd. Canceled my subscription. But, don't loose heart. Download the gegpsd.py and gps.kml from here.

rfcomm connect 4
gpsd -n /dev/rfcomm4

gedit gegpsd.py
gps = serial.Serial('/dev/rfcomm4', 4800, timeout=1)
python gegpsd.py
./googleearth
In google earth open > gps.kml


What this does is this - it reads the NMEA formated string and generates the KML (Keyhole Markup Language) formated file called. /tmp/nmea.kml, which is then read by google earth at 1 second intervals.

As a side note, remember to make sure you don't have xgps running simultaneously with this script. I guess since both of them read from the same device at the same time, it causes the python script to fail as it tries to parse the partial NMEA strings at times (parts of the string may have been read from the buffer by xgps).

Okie dokey so far so good.

I have been talking about this NMEA string. If you like you can use the python script to make your own script to peek at the NMEA string that is sent by your device. Here is what it looks like

$GPGGA,081445.000,1829.8610,N,07354.3305,E,1,6,1.38,621.6,M,-64.8,M,,*75
$GPRMC,081445.000,A,1829.8610,N,07354.3305,E,0.21,78.40,230208,,,A*5C
$GPGGA,081446.000,1829.8606,N,07354.3310,E,1,6,1.38,621.6,M,-64.8,M,,*75
$GPRMC,081446.000,A,1829.8606,N,07354.3310,E,0.21,78.40,230208,,,A*5C
$GPGGA,081447.000,1829.8603,N,07354.3313,E,1,6,1.38,621.6,M,-64.8,M,,*72


excerpt from Wiki
"NMEA 0183 (or NMEA for short) is a combined electrical and data specification for communication between marine electronic devices such as echo sounder, sonars, Anemometer (winds speed and direction), gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the US-based National Marine Electronics Association."

cool isn't it?

REF -
http://en.wikipedia.org/wiki/NMEA_0183
http://www2.warwick.ac.uk/fac/sci/csc/people/computingstaff/jaroslaw_zachwieja/gegpsd/.

Thursday, February 21, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 1


Just received this interesting little GPS receiver from Freedom Input. It is capable of receiving from 51 channels simultaneously. Freedom input sells 2 keychain GPS's. The original Freedom Keychain GPS and the keychain GPS 2000. The first one uses the SIRF III chipset and the latter uses the latest MTK chipset. Sirf III, as, maybe the name suggests is on its third revision, whereas, this is MTK's debut into the GPS world (and I reckon quite a good one). The 2000 version is more compact than the original and has 4 separate indicator lights for the various activities. Some would still prefer the Sirf III chipset, as it has a proven track record. After much brooding I decided to go in for the latter i.e. GPS 2000. Mind it neither comes bundled with any software, but, are supposed to be compatible with popular mapping softwares available.

Now the hard part getting all this to work in Ubuntu. After a hard days night, here is what I got.
In gist this is what I did (apply common sense where stuck)

hcitool scan
sdptool browse
sudo gedit /etc/bluetooth/rfcomm.conf

rfcomm4 {
bind yes;
device <>;
channel 1;
comment “Serial Port”;
}

rfcomm connect 4
sudo apt-get install gpsd gpsd-clients
gpsd -n /dev/rfcomm4
xgps


Basically, we are creating a serial port /dev/rfcomm4 binding to the bluetooth device and then making the gpsd daemon talk to the port. The gpsd daemon then listens and services any requests for the standard GPS NMEA data. And voila..



The picture above shows the satellites that GPS device has latched onto. If it latches onto more than 3 satellites it is able to provide a 3D fix, which means, it can in addition to your position tell you your altitude. I think EPH tells you the horizontal accuracy and EPV tells you the vertical accuracy. Okay, now to get this to work with some freely available mapping software keep checking.

If still stuck check out these links
http://www.justuber.com/blog/2007/10/16/bluetooth-gps-on-ubuntu-gutsy/
http://ubuntuforums.org/showthread.php?p=1497680

Thursday, November 15, 2007

Trying out the Android SDK


After upgrading to Gutsy Gibbon and reclaiming and saying goodbye to Vista partition. Time for some fun. Giving Android a trial run. SDK download and setup instructions here

that was smooth and easy, no hiccups.

Friday, September 21, 2007

Light My Fire's Swedish Firesteel Mini


Light My Fire (LMF) released a new Mini version of their excellent Swedish Firesteel. I think Ryan Jordan may have had some hand in the design of these. Excerpt from Backpacking Light

"At the heart of this kit is the new Firesteel Mini firestarter. Ryan commissioned the design and manufacture of this product for the ultralight community - at less than half the weight of a Firesteel Scout, the Firesteel Mini should prove its worth to the ultralight community when every gram is debatable. The firestarting tool, the sparker, and the cord have all been lightened up in the Firesteel Mini." -- Backpacking Light

I already reviewed the Swedish Firesteel (Army Model) some time back. A life time supply of sparks. By the way, of all the flints "and fire rods" that I have tried, this (Light My Fire Firesteel) is by far the best and has come to be my favourite. Its just the "quality". Good large and hot sparks. Even the provided striker is excellent. I think it may actually last me a life time (if I don't lose it that is).

Problem: it is too big for my modified Penrith tin. Their scout model just doesn't cut it. This is just perfect when you want the comfort of a quality product in a really small size.

Thursday, September 20, 2007

"By Endurance We Conquer"


This was Sir Ernest Henry Shackleton's family motto. This bird has earned it. It made the longest recorded nonstop flight ever measured - 7,145 miles (11,500 kilometers). Simply wow. For comparison - Even F16s and a Boing 737 cannot manage half of that without refueling.

National Geographic via Newlaunches

Tuesday, August 07, 2007

Openmoko and gPhone rumour


I have been watching the Openmoko (FIC Neo1973) developments like a predator stalking its prey. But, pouncing on the "Phase I" release of the phone - I must admit requires much too much courage for me. I am waiting and saving for their Phase 2 release due in October. I was initially eying the Greenphone, but, after this, I gotta have an Openmoko.

But, guess what Google may be eying the Openmoko too for its rumored gPhone. Too much heat ...



Buy Openmoko here
Openmoko developments here
For Greenphone go here
A List of Linux based Mobile Phones

gPhone Rumors (Hopefully there will be more):
More gPhone rumours
Google Using OpenMoko For gPhone?

My next phone has to be Open and has to run Linux.

Sunday, June 17, 2007

Ubuntu 7.04 (Feisty Fawn) - Initial Impressions

Plenty to explore and talk about but, I think these were the first few things that caught my attention.

1. Disk usage analyzer: A Linux user's conditioned reflex when asked to look up disk usage - du and df. Well stumbled upon 2 new interesting ways to view disk usage (Applications -> Accessories -> Disk Usage Analyzer).



for the graphical usage map (right click on a folder name on the left pane).



2. How interesting can a battery applet get? It's just supposed to show you how much juice is left in your batteries. Well... click on the battery icon. You are greeted with a fair amount of info about your batteries. Then, right click and view the power history. It shows how much power your laptop has been sucking up in watts plotted against time since the system started.



The graph above told me some interesting things about my machine:
  • consumption between an idle CPU and 100% CPU utilization is about 20W!. The >35W on the graph is my CPU on ~100% (Used BOINC to run seti@home jobs to fill up the idle times).
  • And the display takes about 5W between off and full brightness.
3. And then there is Beryl........

Saturday, June 16, 2007

Dual booting Ubuntu (Feisty Fawn) and Windows Vista



Smooth and easy way (obviously apply common sense where ever necessary):
  • Make your Vista recovery disks and take backup of all important files before proceeding.
  • Install Vista first. Don't waste your time trying to partition your system using the utilities provided in Vista - Disk Manager and the Defrag utility. They just don't cut it. I was not able to shrink the Vista partition to my desired 30 Gigs. Wasted quite some time trying to delete/move system files so that a defrag could move them to the beginning of the partition. Instead try GParted (the next step)
  • Boot from the Ubuntu CD. Use GParted (System > Administration > GNOME Partition Editor). Yes, it recognizes NTFS and it did an excellent job resizing my Vista partition. After resizing restart the system and boot into Vista. Make sure to let Checkdisk run during boot. Verify your Vista installation is okay.
  • Boot from the Ubuntu CD again and this time you click on install. When asked for partitioning choose to manually partition your drive. Ubuntu rightly recognizes the service and the Vista partitions and makes suitable entries in the /boot/grub/menu.lst. (I just edited the label for the /dev/sda1 - the service partition). These are the entries in the menu.lst on my system

    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda2
    title Windows Vista/Longhorn (loader)
    root (hd0,1)
    savedefault
    makeactive
    chainloader +1

    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title Lenovo Recovery Partition (loader)
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1

  • Install Ubuntu following the instructions.
  • Reboot - You will automagically see the options to boot into the various partitions during startup. Only caveat the thinkvantage button no longer works during startup. And yes if you choose the Recovery partition to boot it does start the recovery program

Friday, June 15, 2007

A program that prints itself

Update 17th July 2007: Rummaging through my notes I found this - This is a corollary of the Recursion Theorem. This is the way a virus can get a description of itself and print it to a file and do other "wonderfull" stuff to itself like - mutate. Check out this interesting article that talks in detail about the Recursion Theorem - Link

I had been told that any Turing Machine can be made to print itself. Programs are Turing Machines, so they should be able to print themselves. I never actually tried to write such a program myself.

Getting into an argument with some colleagues, I got cornered into defending my statement with a (at the moment) running program or retract my statement. So, with trembling hands, a vague memory of description of such a machine during one of the lectures I attended once and copious amounts of faith in the professor, I gave it a shot. And by golly I got it right ...

Let me lay the ground first.

The program
#include<stdio.h>
main() { printf("Hello, world");}

Prints:
Hello, world
Should print:
#include<stdio.h>
main() { printf("Hello, world");}

To make a program print itself one can attempt:

The program
#include<stdio.h>
main() { printf("#include<stdio.h>\nmain() { printf(\"#include<stdio.h>\n main() { ...\") } ");}

Prints:
#include<stdio.h>
main() { printf("#include<stdio.h>
main() { ...") }

Should Print:
#include<stdio.h>
main() { printf("#include<stdio.h>\nmain() { printf(\"#include<stdio.h>\n main() { ...\") } ");}

So, one gets into a mirror reflecting a mirror kind of a situation.

A program to print its own description:
#include<stdio.h>
main(){ char *str="printf(\"#include<stdio.h>%cmain\(){char *str=%c%str%c; \",10,str,34,34); printf(\"%s\",str); printf(\"}\");"; printf("#include<stdio.h>%cmain\(){char *str=%c%str%c; ",10,34,str,34); printf("%s",str); printf("}"); }

Prints:
#include<stdio.h>
main(){char *str="printf("#include<stdio.h>%cmain(){char *str=%c%str%c; ",10,str,34,34); printf("%s",str); printf("}");tr"; printf("#include<stdio.h>%cmain(){char *str=%c%str%c; ",10,str,34,34); printf("%s",str); printf("}");}

The general idea is like this:

[PartXBegin] = main() { char *str=[PartY];
[PartY] = <Print [PartXBegin]> <Print str> <Print [PartXEnd]>
[PartXEnd] = }

Any program can print a description of itself (obviously,only if it can at least perform the basic turing operations).