Thursday, February 26, 2009

3G modem på nye Lenovo maskiner

Nye Lenovo modeller så som T400 f.eks. kommer i svært mange utgaver med et GPRS/3G modem som heter " Ericsson Mobile Broadband Module F3507g" samt 3 måneders gratis Telenor Trådløst "Bredbånds" abonement.

Kortet har både GPS, GSM og WCDMA støtte. Det det ikke gjør er å støtte en del helt normale AT kommandoer. "ATZ" (reset) f.eks. gir "ERROR". Og umtsmon (veldig fint program som viser operatør, signal-styrke og tilgjengelige radio-bånd) funker dårlig med kortet hvis ikke det gis noen ekstra AT-kommandoer først - og selv når jeg gjør det får ikke umtsmon nettverksforbindelse opp. Jeg har ikke eksprimentert helt ferdig ennå, jeg skal poste hva som skal til for å komme online med Telenor trådløst bredbånd senere.

I mellomtiden poster jeg link denne AT kommando-referansen for kortet: http://www.natisbad.org/E4300/Dell_Wireless_5530_AT_cmd_ref.html samt denne hjelpsomme linken: http://www.nabble.com/X301-Ericsson-Modul-f3507g-AT-Command-reference-td20152955.html

Det ser ut til at riktig AT+CFUN kommando er nøkkelen for å komme på lufta. Feil AT+CFUN kommando får kortet til å gå ganske kraftig i frø slik at jeg må kald-boote maskinen.

Men aller viktigst er det å passe på å bruke cdc-acm modulen istedenfor option/usbserial som noen kjerner gjør for tiden (modprobe -rv option; modprobe -v cdc-acm).

Tuesday, February 10, 2009

Ordering images

My wife likes to take pictures. But she keeps putting off dumping her camera into her computer (and by extention backing them up to the family RAID). The other week I got stuck organizing a good number of months pictures from her 8GB CF. I investigated what I could do automatically. Quite a lot it turns out. The two most interesting commands here are:

  • exifautotran - auto transform (rotate) images according to the orientation sensor in the camera when the picture was taken
  • jheag -ft - time stamp the image file according to the EXIF meta-data in the image.
The rest is just a loop to organize the pictures into YYYY-MM directories. As I'm prone to, it's written in KSH, which is different enough from bash that you need to install ksh or pdksh to run it.

#!/usr/bin/ksh

echo "*** Rotating images"
exifautotran *.JPG *.jpg
echo "*** Fixing time stamps"
jhead -ft *.JPG *.jpg

declare -a DATE

for f in *.JPG *.jpg; do
LC_ALL=C DATE=( $(jhead $f | awk '/^Date/ { print $3 }' | tr ':' ' ') )
folder="${DATE[0]}-${DATE[1]}"
mkdir -p $folder
mv $f $folder
done

Monday, February 2, 2009

Mailbox order in Thunderbird

Today I bring a trivial but useful tip to my Redpill-Linpro colleagues. Since english is the new corporate language I'll write in english.

Over this weekend we changed email servers from OX to Zimbra (talk about night and day). We had to make new a new account in our thunderbirds for zimbra.redpill-linpro.com. Thunderbird puts this new account at the bottom of the account list.

Which is clumsy when that's the account I want the most to read email in.

Visit the god ole' prefs.js (if you know where to find it you're qualified to edit it in spite of the warnings on top of the file). Find this line:

user_pref("mail.accountmanager.accounts", "account2,account3,account4,account5,account6");

Look further down to figure out which email server is associated with which account and then permutate the list as you see fit:

user_pref("mail.accountmanager.accounts", "account6,account5,account2,account3,account4");

in my case.

Wish us good luck with our new email system.

Sunday, February 1, 2009

Bluetooth with kubuntu intrepid

It seems bluetooth on kubuntu intrepid is broken. I only use bluetooth for transferring pictures from my phone to my laptop and for this purpose the gnome tools work very nicely - even under KDE.

  1. Install bluez-gnome and gnome-bluetooth
  2. Run bluetooth-applet
  3. Run gnome-obex-server
  4. Right click the bluetooth icon that appears in your tray and select "Setup new device"
  5. All set :-)