Tag Archives: n900

Fixing N900 GPS locking

The Problem

So as I mentioned in my earlier post I had lots of troubles getting GPS locking lately on my N900 which I regularly use for tracking when running. After switching and trying all apps that I was able to find – GPS Recorder, GPS desktop widget, Marble, eCoach and OVI Maps I’ve come to the conclusion that the problems is not in the applications, but rather the GPS device. Initially my thoughts were that it was completely broken as hardware, as I’ve used it quite often and it was always working as expected until recently when it completely failed on me.

The Fix

In the end after lots of searching I’ve found a fix that proved me wrong that it is HW issue, but rather a software one. The only thing that I’ve done was to switch the server used by the A-GPS from the original supl.nokia.com to supl.google.com – works like a charm, locks in a matter of seconds – even inside my apartment 🙂 Just go to Settings -> Location on your device and change the Location server

Well – finally I’m back on track with eCoach …

Tagged , , ,

Fixing Marble KML files

So today I’ve woke up and went for my morning run. I’ve decided to use Marble for tracking on my N900 this time, as eCoach has failed me the couple of times and was not able to produce proper tracks. Everything went smoothly and I’ve got a nice track, which I saved after I’ve finished. Marble supports only KML files, so when I got home, I knew I must convert it to GPX prior to uploading it to mapmytracks.com (one of the best sites I’ve seen for analyzing your tracking data).

The conversion

Using guidelines from the Marble/Tracking page I’ve used the following command:

$ gpsbabel -i kml -f running-2011-10-11_071712.kml -o gpx -f running-2011-10-11_071712.gpx

Please bare in mind that I’m running this on a Fedora 14 install which misses the gpsbabel GUI. I was able to find packages for F15/F16 so if you are using one of those you should have it in the Fedora Repositories.

Having the file converted I’ve tried to upload it to mapmytracks.com, but this is where the things got ugly. The following error was thrown at me:

Warning: Division by zero in /var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php on line 103
Warning: Division by zero in /var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php on line 103
Warning: Division by zero in /var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php on line 103


The Problem

After short investigation I’ve found that my other (eCoach) gpx tracks were having the attribute for each trackpoint () and the converted file was missing them. The google search resulted in nothing of a help that would allow me to inject the timestamps inside this trackpoints, so the logical continuation was to do it myself 🙂

The Fix

For the purpose of this task, a simple perl script was created. You’ll need Date::Parse perl module (perl-TimeDate package on Fedora 14):

#!/usr/bin/perl -w

use Date::Parse;
use POSIX qw/strftime/;

# read the input file
$num_args = $#ARGV + 1;
if ($num_args != 1) {
  print "\nUsage: $0 <input_file.gpx>\n";
  exit;
}

# if you are consolidating points in gpsbabel, change this accordingly
# by default marble writes points every 1 second
my $timeStep = 1;

my $inFile = $ARGV[0];
open FILE, "< $inFile" or die "Can't open $inFile : $!";

# calculate the timezone
my $tz = strftime("%z", localtime(time()));
$tz =~ s/(\d{2})(\d{2})/$1:$2/;
my $unixTime = 0;

while(<FILE>){
  print $_;
  if(/<time>(.*)Z<\/time>/){
    # get the starting time
    $unixTime = str2time($1);
  }
  if(/<ele>/){
    # print ISO8601 formated time
    print "  <time>" . strftime("%Y-%m-%dT%H:%M:%S", localtime($unixTime)) . $tz . "</time>\n";
    $unixTime += $timeStep;
  }
}
close FILE

The only argument that this script takes is the input gpx file, generated with gpsbabel and the output is thrown on stdout. What that script does is it takes the initial time when the gpx file was generated and injects <time></time> values from it, increasing it after every trackpoint with one second. Of course this is not perfect as the timestamps are shifted in time and are not the real values, but at least that allows me to insert the file and analyze it on MapMyTracks. Maybe I’ll post update on that script that will take also as input the KML file, where the time when the files was saved is used, and reverse it back to the first trackpoint. That should give more accurate gpx files.

It seems that I’ll be using this half-baked solution for uploading my tracks, as it works and generates pretty detailed track (one trackpoint per second), unlike eCoach that does this at best every 2 seconds (and does not work on my device :-). Here is the final result on MapMyTracks.

 

EDIT: I’ve found what’s wrong with eCoach and how to fix it

Tagged , , , , , , ,

N900, Erminig and Google Calendar – the battle for the battery

The latest N900 update (PR1.2) is already history – some are happy (like me) others are completely devastated. I, like many others, decided to make full reset of the device, as was abusing it allot. This meant that the new firmware together with the latest eMMC contents was reflashed. After that I’ve started fresh to reconfigure my device, and following the KISS approach, I wanted to restore only the apps that I really use. Having that in mind there was one thing that really bugged me – MfE. It was used only to sync my Google Calendars through nyevasync and in order to be always in sync I had to enable autoconnect WiFi – that way the calendar was able to sync on the given interval of time. But staying always online drains the battery allot. Maybe this is the biggest power drain source together with the 3G connectivity. Clearly a solution that connects-syncs-disconnects would be greatly appreciated. Below you’ll find the way I did it.

The first thing I’ve needed was an alternative to MfE  – I don’t like the sync-only-one calendar with google and the fact that I have a Exchange Mail account that just sits in my Modest configuration. As always the maemo community helped and thanks, thanks, thanks to lorelei from maemo.org – I was able to use Erminig for that purpose. The application in the current stage is quite feature complete IMHO. It offers syncing in both directions for local calendars to/from Google calendars and supports *multiple* calendars. The other great thing about Erminig is that you can sync from command line 🙂 which opens the path to quite simple script implementing the connect-sync-disconnect philosophy. The script itself is quite simple. It respects the situations in which the WiFi was already active – it drops the connection only when it was initiated from the script itself:

/opt/mybin/synccal

#!/bin/sh
# Autor: Todor Tsankov (2010)
#
# 2010-05-28 - initial release

RETRIES=3
CONNECTED=false
DROPCONN=false

# check for existing wifi connectivity
if [ "$(/sbin/route | awk '/au/ {print $1}')" == "default" ]; then
	CONNECTED=true
else
  for i in $(seq 1 $RETRIES); do
    # try to connect to any known wifi
    run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"[ANY]" uint32:0
    sleep 20
    if [ "$(/sbin/route | awk '/au/ {print $1}')" == "default" ]; then
      CONNECTED=true
      DROPCONN=true
      break
    fi
  done
fi

if [ "$CONNECTED" == "true" ]; then
  # sync erminig if having connectivity
  /usr/bin/erminig -a

  # sync MfE
  # run-standalone.sh dbus-send --print-reply --type=method_call --session --dest=com.nokia.asdbus /com/nokia/asdbus com.nokia.asdbus.fullSync

  sleep 5

  # drop the wifi connection if it was initiated by this script (saves battery)
  if [ "$DROPCONN" == "true" ]; then
    run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
  fi
fi

All that is left now is to save that script somewhere and invoke it in certain interval of time – how you’ll do it – it’s up to you. You can invoke it manually through X-terminal and tools like “Desktop Command Widget” or automate it with tools like Alarmed and fcron.

MfE comment: As you can see the MfE can be forced to sync from command line also, so if you prefer it, but still would like to minimize your wifi usage and optimize battery life – just comment erminig sync line and uncomment the MfE one.

Warning: the script is it’s infancy and although it makes some state checks it may misbehave.

Tagged , ,

Maemo5 Catorise побългаряване :-)

След като вече имаме сравнително пълен превод на платформата която ползва N900 – Maemo5, реших да се занимая с няколко неща около локализацията които силно ме дразнеха.

На първо място това беше привидно неподреденото меню което генерираше Catorise. Самото приложение е страхотно и това което най-много ми харесва е факта че всички инсталирани приложения автоматично се сортират, спрямо категорията в която ги е поставил техния автор (т.е. спрямо категорията им в „Приложения“). За разлика от Catorise, MyMenu изглежда с всяка версия обновява собствен списък с приложенията, които се категоризират по някакъв начин – нещо което не ми изглежда толкова здравословно за поддържане 🙂

Хаоса в генерираното меню се дължеше на факта, че категориите/приложенията в него се сортират по имената на файловете който го формират, а не по техния превод. Та след няколко съобщения за бъгове, недълга комуникация с автора на приложението и няколко кръпки, във версия 0.8.0 вече генерирането на менюто с категориите не изглежда толкова хаотично 🙂 и в момента изглежда така (поне на моята Nokia)

Допълнение:

С излизането на последното обновление за N900 – PR1.2, поради факта че е добавена възможност да се подреждат ръчно иконите в менюто, генерираното от Catorise меню не се подрежда правилно спрямо превода на категориите. Надявам се скоро да ми остане време и да успея да помогна с отстраняването на този проблем.

Tagged , , ,

Bulgarian localization for Maemo5 Fremantle: Part2

Здравейте,

най-накрая ми остана малко свободно време за да напиша какво се случва около проекта който започнах, свързан с локализацията на интефейса на Nokia N900 на български.

Първо и може би най-важно – успях с помощта на firstfan, да прехвърля проекта в един по-общ проект свързан с превода на Maemo, който се казва n900-extra-translations. Така че вече не се чувствам сам :-), а освен това и вече няма да ми се налага да се занимавам с изграждането на пакети. Което не означава, че не се налага да се занимавам с отстраняване на бъгове свързани с тези пакети. В този ред на мисли вече няма да публикувам нови пакети на сайта на проекта който първоначално стартирах в garage.maemo.org, но ще продължа да поддържам актуално git хранилището с преводите които правя във връзка с проекта.

Новите пакети могат да бъдат намерени в extras-devel (още едно предимство) под името N900-l18n-bg_BG.

Алтернативен вариант е просто да свалите някой от публикуваните .deb файлове, препоръчително е последната актуална версия, и да я инсталирате наръка през X Terminal.

В момента работя над превода на пощенския клиент (aka Modest) и въобще приложенията които ползвам най-често.

В следващите дни когато имам отново време, ще се опитам накратко да опиша какво трябва да се има превид когато се прави превод (поне моята гледна точка 🙂 и как може лесно да се включите в превеждането на останата част на интерфейса.

За финал няколко снимки с локализираната версия на Maemo.

Tagged , , ,

Bulgarian localization for Maemo5 Fremantle

Със стартирането на тази тема искам да обявя, че започнах проект за превода (неофициален) на интерфейса на Maemo5 на български, както и да дам малко информация докъде успях да придвижа за момента проекта (в момента е близо до националното дърво:-). Не знам дали някой друг в момента също не се тормози със същата задача, затова прецених, че е по-добре да обявя какво смятам да правя още в началото, така че ако има и други мераклии, да обединим усилия 

Преди да стартирам превода се консултирах с хора които имат опит в превода на приложения, така че ще направя всичко възможно превода да бъде максимално точен и коректен. Което не означава че няма да има грешки – отворен съм към конструктивна критика.

СТАТУС
За момента са преведени следните приложения:

  • адресна книга
  • телефонно приложение ( phone )
  • приложение за разговори ( conversations )
  • браузър

Всичко останало използва езика по подразбиране (en_GB).

ИНФОРМАЦИЯ ЗА ПРОЕКТА
Страница:
https://garage.maemo.org/projects/bulgarian-l10n

Изпращане на грешки (трябва да имате регистрация):
https://garage.maemo.org/tracker/?group_id=1264

Пакети:
https://garage.maemo.org/frs/?group_id=1264

Още веднъж ще наблегна че за момента превода е в МНОГО НЕЗАВЪРШЕНО състояние. Така че инсталирате пакета на своя отговорност. Нарочно не слагам описание как може да се инсталира локализацията, защото ако не знаете – най-вероятно не трябва да го правите.
На по-късен етап когато имаме пълен превод, ще се опитам да кача нещата поне в extras-devel.

Май това е засега. Когато имам някакъв напредък – ще публикувам промените тук.

Tagged , , ,