recent

Mobile Internet Blog II - Nokia N810

Well, a sort of blog - I'm changing this as I find things as well as appending to the bottom...

See also Vancouver Mobile Internet Blog
See also N810 FAQ

February 2008
Order N810 from tigerdirect.ca. Takes a few days, but arrives in one piece. Shipped from Canada, no COD duty/GST/brokerage fees. (also available from NCIX I'm told)


OK, I didn't use flash so the screen would show nicely..

Specifications

  • Display 800x480 pixel 4.13"
  • 400MHz ARM processor
  • 128M RAM, 256M Flash, 2GB internal SD, mini SD socket up to 8BG
  • 4 hours on w/WLAN+display, 10 hours music playback, 5 days idle
  • GPS, camera, stereo speakers, microphone
  • Slide-out querty keyboard
  • IEEE 802.11b/g, WEP, WPA/PSK
  • Bluetooth v2.0, headset, networking
  • USB
Note: this is not a cellphone. However, it can do VOIP using Skype or Gizmo if you have a WLAN connection, and it can use a Bluetooth headset. Or plugin headphones and the built-in microphone.

February 21
First things first. Open the box. The battery is packed separately. There's also an odd collection of hardware - a pleather case, a pair of earbuds, a 110V charger, a mounting kit, a USB cable, and a soft cloth. Open the case, fit the battery, put it on to charge.

February 23
Next, turn it on. The system walks me through setting up a network connection - pairing with my Nokia 6820 cellphone on Bluetooth, and using a WLAN with WAP authentication. As the 6820 had been already configured for Internet access via Roger's mobile EDGE service, this just worked. Amazing.

Applications

Out of the box, the N810 comes with the following applications:
  • Web browser. Based on Firefox 3. Javascript, Flash 9 plugin, no Java, no tabs, no security for saved passwords. No WML support (but who cares?).
  • Map with GPS. Comes with Canada-Alaska, USA East and USA West. Compared to my Garmin GPSMAP76, the display is bigger, brighter and in colour. But there is no control of the level of detail. There is not enough information on the page at one time, and if you zoom in enough to see the trees you can't see the proverbial wood. Maybe it's OK when it's mounted on a car dashboard, but not when it's used "normally".
  • Media player. Plays a few media types (AVI, MP3, WMV). Video a bit sluggish on my 320x240 Animusic sampler WMV, and didn't want to play an MPEG2.
  • Email. POP3/IMAP4 client, with ability to download headers only. If you use the Bluetooth cellphone connection in Canada, you have to be careful how much you download.
  • Rhapsody music player from RealNetworks. Service only available in the US.
  • RSS feed reader
  • Skype (installer)
  • Chat client. Google Talk/Jabber/SIP.
  • Internet phone. Google Talk
  • Contact manager. LDIF 3.0, CSV exports
  • Gizmo. The icon is an installer; Gizmo is not provided by Nokia.
  • File manager. A graphical tool. Finds SMB shares on the local WLAN, and also on Bluetooth devices such as my 6820 phone. I can copy images from the cellphone gallery. Cool.
  • Calculator. Says "limited resolution".
  • Clock. Neat 2-timezone feature with map.
  • Notes. Creates HTML4 with <font> tags (not CSS), or plain text.
  • PDF reader. User manual is included, in PDF, in multiple languages.
  • Sketch. Creates PNG bitmaps. Like Xpaint, but missing second palette (for fills) and various other features.
  • Image viewer. Includes various pictures of fruit.
  • Help tool
  • Control Panel. Includes device lock, certificate manager, text input settings
  • Application Manager. Graphical package manager - manage installed packages, and download new packages from repositories on the Web.
  • Handwriting learner
  • Games - Chess, mahjong, blocks, marbles
  • OSSO xterm - command line. Many shell commands are soft links to something called "busybox", which emulates the ash shell.
It looks like the tablet can only access public SMB shares - it will not put up a dialog to let you log in. However, I believe that Samba is available from Maemo. Also, there is an NFS-enabled kernel available if you need to mount NFS filesystems.

Command line

Commands run as a user "user", there is no suid bit on things like ping and chmod, and the root account is locked. This means you can't ping anything (ping requires root privilege), even though the binary is installed. There are a lot of Gnu/Linux tools, including:
  • cat, df, cp, dd, grep, ls, more, mount
  • tar, gzip, netstat, vi, sed, ps, lsof, lsusb, wc
  • awk, apt-get, chage, cmp, free, top, find, head, sort
  • Perl, zdump
Most of this is actually "busybox", a small-footprint universal tool. Noticably absent: less (* just install it with "apd-get install less")

Keyboard

The N810 ships with handwriting recognition and stylus input turned off. If you turn on stylus input, tapping in a text box or at a command line prompt brings up a virtual keyboard, providing the the physical keyboard is closed. Several critical keys are missing from both the physical and virtual keyboards, including ESC (used in vi) and TAB (for tab-completion). Fortunately, there is a soft toolbar loaded with ESC, TAB, Ctrl, PgUp and PgDn. I added Up, Down, Left and Right, used for command-line editing if the physical keyboard with its joystick ring is closed. Also KP_Enter to do (up, enter) without losing half the display to the touch keyboard.

Getting Root

The application manager lets you install packages without having root, but if you want to write shell or Perl scripts, or install programs which aren't in a package, you need to get root (because of the lack of suid, you can't even do "chmod +x" to make a script executable).
The root password is set to "rootme", but it's locked. The way to get root is to do "sudo gainroot", but it says you need R&D mode if you want to break your device (I bet dropping it works nearly as well as "# rm -rf /" ... ). So as per Hacking the Nokia N810, find the "getroot" application in one of the online repositories and install it. This edits /usr/sbin/gainroot so that it will work. Then do "sudo gainroot" and get a root prompt, then you can unlock the root password or change it to something stronger (the passwords are not shadowed, and look like regular crypt(), so are vulnerable to cracking from user level). You probably want to install openssh server and client, then you can ssh in to the tablet and set up SSH keys etc. You probably want to set "PermitRootLogin without-password" in /etc/ssh/sshd_config, else your root password is vulnerable to SSH dictionary attacks on the Internet.

Building Applications

Use Scratchbox from maemo.org. See later.

Third party Applications

There are a ton of these, in repositories listed at e.g. maemo.org/community. So far, I have tried
  • Rdesktop - access Windows desktops
  • Camera - take pictures of yourself
  • Doom - classic shoot-em-up
  • Alpine - text-based email. Alpine needed ncurses, which I got using "apt-get install"
  • Mplayer. Plays MPEG, faster than Nokia media player, no sound playing some WMV's.
  • Maemo Recorder - record audio to WAV etc.

Removable Memory

The N810 takes a mini-SD card. I got a 2Gb micro card with an adapter (the max is 8Gb). Note that the user manual is also for the N800, which takes two SD cards. These are bigger and won't fit. The card appears as /media/mmc1, or in the GUI as "Removable memory". If the USB cable is used to connect the N810 to a PC, the memory card is automatically unmounted from the tablet and is mounted on the PC instead. So files may be transferred in a two-step process, first from the tablet internal memory to the mini-SD card, then from the card to a PC.

I have seen some comments that with a certain amount of hacking, perhaps with cutting tools, a USB device may be connected to the tablet "normally", e.g. a digital camera or memory stick. * check out maemo repository; apparently you don't need to cut anything, you just need a female-female adapter.


March 2

Filesystem

Mapping the GUI to the shell:
FolderDirectory
Removable memory/media/mmc1
Internal memory card/media/mmc2
Documents/home/user/MyDocs/.documents
Games/home/user/MyDocs/.games
Images/home/user/MyDocs/.images
Audio Clips/home/user/MyDocs/.sounds
Video Clips/home/user/MyDocs/.videos

Security

There isn't much.
Physical: the tablet and keyboard can be locked using a numeric key. This is in the control panel as "device lock". Recommended to deter casual snooping if you leave the device unattended. The removable memory can be removed and read on a PC with a card slot or adapter. The docs say it must be formatted as VFAT, which makes it easy to read under Windows. It may also be read using the USB cable.

Software: no password is required to install packages, and the application manager has root access. Thus, an application like getroot may be written that lets the user get root. The root password is normally disabled; if it is enabled and an SSH server run, the tablet is vulnerable to password guessing over the Internet (they try more against root). So disabling root password access is recommended in sshd.conf. The passwd file is unshadowed, and uses crypt(), so is easily cracked from user level (if you configure a second user account for network access). The crypto program GPG is available from the shell, and several "password safe" applications are available. Best to assume your files are not really private, though.


Looks like R&D mode can be enabled using the Flasher tool. I haven't tried.

Write some of this down before I forget : -

Writing Applications

Unless otherwise stated, this applies to Maemo 4 on the Nokia N810 shipped in early 2008, running OS2008

The N810 uses an ARM processor. Most everything else I use now (except the 6820 cellphone) uses an Intel or AMD processor. These have different instruction sets so you can't just copy binaries across from a PC, not even statically-linked ones. Since there is no compiler on the N810, it is easier to set up a cross-compiling development environment on a (Linux) desktop than it is to install gcc, make etc. on the tablet (there's more room, for one thing).
Fortunately, Maemo and Nokia have done all the hard work. Follow the instructions in the Scratchbox Installation guide. Note that the N810 and Scratchbox are set up for Debian style (DEB) package installation using dpkg and apt-get. If you are used to RedHat/Fedora (RPM) using rpm and yum, it's a bit different. Probably easier, though. If you are installing scratchbox under Fedora, do "./maemo-scratchbox-install_4.0.sh -s /scratchbox -u USER" as root. (USER is the user name you are going to develop as). Then, as USER, do "./maemo-sdk-install_4.0.sh".
Note that this script sets up the ARMEL target (the one for the N810). You don't need to run sb-conf, sb-menu or install the Nokia EUSA binaries by hand. It's already done.

WARNING: When it says "Remember to stop scratchbox service before removing the scratchbox directory", it means it. You stop scratchbox by doing "/scratchbox/sbin/sbox_ctl stop". sbox_ctl remounts /dev under /scratchbox/users/USER. If you try to blow away /scratchbox while it is mounted you will kill your devices in /dev. If you should happen to do this, do not reboot. cd to /dev and run MAKEDEV to restore everything, e.g. "MAKEDEV hda", "MAKEDEV -m 4 ttyS"

When you have scratchbox running, you can login to it and should see a prompt "[sbox-CHINOOK_ARMEL: ~] >". If you see X86 instead, use sb-menu to select the ARMEL target. You now have an ARM development environment and should be able to build "hello world", and various packages that use (./configure; make; make install). You can run them under the emulator, or scp them to the tablet and try them there. You probably want to create USER on the N810 with a password, so you can ssh in nonprivileged (set up SSH keys so you can scp or rsync without typing a password). The tablet local user (called "user") has no password, hence is prevented from ssh login.

Xephyr (the fake X server) is not strictly necessary unless you want to test X applications from inside scratchbox, and even then is not really needed. On the host system, do "xhost +LOCAL:", and in scratchbox, do "export DISPLAY=:0.0". Then you can run simple X applications.
In Fedora 4 or 5, you can also use the installed application Xnest. It probably doesn't work as well as Xephyr, though. In Fedora, do "yum install xorg-x11-Xnest", or "rpm -hi /path/to/your/DVD/RPMS/xorg-x11-Xnest*rpm". I'm told you need to run X in 16-bit for some things to work in Xnest; in Xephyr you don't need to.
Xephyr is available for Fedora Core 6 and RHEL 5 and later. Do "yum install xorg-x11-server-Xephyr". In Debian, do "apt-get install xserver-xephyr".
On the host system, run "Xnest -geometry 800x480 :1.0 &". This will create a nested X window the same size as the N810's. Then, again on the host system, run "xterm -display :1.0 &". This will create an xterm inside the Xnest window. Then, in this xterm, type "xhost +LOCAL:". This will allow access to local connections. In scratchbox, do "export DISPLAY=:1.0". Then, run X applications such as xev or the "hello world" example from the Maemo 4.0 Tutorial.

Building Packages

As above, the N810 is a Debian based system, and wants to install .deb packages from Debian repositories. On a Fedora host system you'd normally build .rpm packages with rpmbuild. Fortunately, you don't have to create .deb packages on the host since scratchbox contains a full Debian environment. Creating a Debian binary package is actually quite easy.
  • Create a build directory with a subdirectory: "mkdir -p myapp-1.0/DEBIAN"
  • Create a file myapp-1.0/DEBIAN/control with appropriate content as per e.g. Package Building HOWTO
  • Create a binary package with "dpkg-deb -b myapp-1.0 myapp-1.0.deb"
You can now install this in scratchbox with "dpkg -i myapp-1.0.deb" or copy it to the N810 and install it there. Try "dpkg -h" and "dpkg-deb -h" for more on listing, checking and removing packages.
Note that on the N810 there is a special task that strips out all documentation from installed packages to save space, so don't wonder where it went.

Building a Repository

I am still having trouble with this. You can find my current attempt at N810/repository

You can use the (graphical) Hildon application manager to install packages on the N810, or you can use apt-get from the command line. The application manager maintains a list of repositories in /etc/apt/sources.list.d/hildon-application-manager.list. Following instructions in the Debian Repository HOWTO, you can add your own repository to /etc/apt/sources.list.d, and it can be a "trivial repository". Make a repository directory in scratchbox and create a package list, e.g.
mkdir -p my-repository/binary ; cp myapp.deb my-repository/binary ;
cd my-repository ; dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz

If you then publish this on your local network, or on the Web, you place it on e.g. http://my.example.com/my-repository and refer to it by a line in a repository list
deb http://my.example.com/my-repository binary/
This works with apt-get on the N810. It does not work with the Hildon application manager. For that, you need an "automatic repository". For that, you need commands like the following:
mkdir -p my-repository/dists/chinook/free/binary-armel
cp myapp.deb my-repository/dists/chinook/free/binary-armel
cd my-repository
dpkg-scanpackages dists/chinook/free/binary-armel /dev/null | gzip -9c > dists/chinook/free/binary-armel/Packages.gz
Place at http://my.example.com/my-repository/dists/chinook/free/binary-armel and refer to it by a line in a repository list
deb http://my.example.com/my-repository chinook free
Then you can create an install file, and publish it on the Web with MIME type application/x-install-instructions (add
application/x-install-instructions install to /etc/mime.types). E.g. "my.install"

 [install]
 repo_name  = My N810 Software
 repo_deb   = deb http://my.example.com/my-repository chinook free
 catalogues = my-repo
 package    = myapp

 [my-repo]
 name = My N810 Software
 uri = http://my.example.com/my-repository
 components = free
or
 [catalogues]
 catalogues = My N810 Software

 [My N810 Software]
 name = My N810 Software
 uri = http://my.example.com/my-repository
 dist = chinook
 components = free
this bit I have not got working properly

So far, I have built:

  • bc-1.06 - arbitrary precision calculator
  • diffutils-2.8.1 - diff etc.
  • gnuplot-4.0.0 - X11 plot program
  • less-382
  • lynx2-8-5 - text mode browser
  • rsync-2.6.4
  • tcpdump-3.9.4 - network traffic logger
  • wireless_tools_28 - iwconfig etc., show wireless info
  • bzman-0.5 - bzipped manpages for the man-deprived
(later) turns out some of these (less, tcpdump) are in the maemo.org chinook respository all along (see Maemo 4 Chinook SDK tools)
March 4
Bought a cheap Motorola Bluetooth ear dongle to try. Pairs up OK; disable from sound control. Took me a while to find how to re-enable it without disconnecting and repairing. Clicking the button on the earpiece does the trick. Sound volume is too low; there's a small adjustment on the headset itself with some rinky-dink up/down buttons. Turns out that media player on the tablet has its own (default iconized) volume slider, in addition to the main slider control. Guess it's "Main" and "PCM" in the mixer chip. With all 3 volume controls maxed out, it's too soft to hear in traffic. Do I take it back (the headset)? Having tossed the packaging as it wouldn't fit in my bike box. It kind of sucks that trying headphones in-store has been replaced by buying 5, returning 4, and having the store toss them in the garbage because the packaging's torn.

Tried Gizmo. The icon is a placeholder, but it downloads OK. Tried doing a SIP call to the EVO SIP gateway (sip:1000@evophone.caltech.edu). Works OK in EVO-TV (click the blue "more info" icon to get the meeting ID - 31). Voice only. Then try a SIP call from EVO to the N810. Phone rings, but Gizmo on the tablet jams up and I can't see how I'm supposed to answer the call.

Later, try a gizmo call to Gizmo on a Windows PC (the v4 Beta with video). Video works but is fairly horrible. Both devices on the same local network, but behind NAT from the Internet. I've got an old 802.11b wireless AP which can't help. Colour on the N810 is kind of brown, as are camera snapshots.

Put the entire Harry Potter and the Deathly Hallows audio book (1.2Gb of MP3s) on the SD stick using rsync. That's 17 audio CD's worth. If I had an 8GB stick, I'd be able to get about 130 CD's worth or an equivalent of a 4 foot shelf of vinyl LPs on. Actually inside the tablet on a thing the size of my pinky nail. Seems amazing to me, yet I see there are 100Gb MP3 players (w/disks), and 16Gb SDs on the horizon. The sound quality isn't too bad, considering. Stereo, even.

March 5
Turns out the Skype icon as shipped is also a placeholder which asks if you want to download Skype. And the installer says it need a more recent version of a couple of packages, i.e. you have to re-flash the system as apt-get says they are the most recent versions for this OS release. I've only had it 2 weeks, and it's out of date already.
I have to say this doesn't score well on ease-of-use for non-tech users. You tap the Skype icon hoping to place a call, and you're into doing backups, installing NVRAM flashing software, messing around with USB cables and hoping you don't "brick" it by accident.

later

Buy a female-female USB adaptor. $7 from an independant store in Richmond BC. Same place I had a USB extender for about $15 when the big-box stores want $50. Guess they have a 5% margin on computers and a 500% margin on accessories.

Re-Flashing

So if Skype won't install, maybe I should consider reflashing the system, to see how it's done if nothing else. Current OS version given in /etc/osso_software_version is RX-34+RX-44_2008SE_1.2007.42-18_PR_MR0. 3 newer versions listed on tabletsdev.maemo.org; latest is OS 2008 version 2.2007.51-3. (OS version is also in shell prompt, viz. Nokia-N810-51-3).
Download latest COMBINED_MR0_ARM.bin file from above page, plus MD5SUM file. Follow instructions as per Nokia A4678158, HOWTO_FlashLatestNokiaImageWithLinux. Note the correct command "./flasher-3.0 -F " given for the N810, c.f. older tablets using "flasher -r". As per the instructions, I had to connect it first then power it on, else the flasher won't find the device (in contrast to normal practice with cameras, memory sticks, printers etc., or indeed the N810 in slave mode where plugging them in is sufficient).

It always seems foolhardy to me to hook something up and do a destructive write immediately. I tried # ./flasher-3.0 --query-rd-mode and get

flasher v0.8.7 (Oct 17 2006)

USB device found found at bus 001, device address 008
Found device RX-44, hardware revision 0805
NOLO version 1.1.6
Version of 'sw-release': RX-44_2008SE_1.2007.42-19_PR_MR0
The device is in production mode
After flashing the new system, it immediately asked if I wanted to restore my backups from the SD card. So I did. It then asked if I wanted to restore my applications and ran the application manager. Since I had subscribed to a number of different repositories, it wanted to check them all and took rather a long time. I got impatient and killed it. This left me with only a couple of optional apps, and without the critical openssh-server. So I went back and manually installed it from maemo.org (my list of repositories had been restored, just not all the apps). Doing a clean install of openssh-server, it asked me for a root password. This is cleaner than messing around with "sudo gainroot". So I ssh in as root, restore my .ssh/authorized_keys file, root filter in /etc/ssh/sshd_config etc. Now I can run apt-get typing on my desktop, which is easier than fiddling around in the Hildon application manager wondering what category people have put Skype in, communications or internet.

As per the docs, everything on the system device, except MyDocs as backed up to SD, is gone. Except the device lock passcode. So that includes the SSH keys and authorized_keys from /etc/ssh/ and ~/.ssh, my non-privileged user account, changes to /etc/profile, and any other files that weren't part of a package.Another good reason to be using APT, apart from a desire to publish in case others find them useful.
Also, I believe the timezone setting was not saved, and the device didn't prompt me to reset it. After reboot, the time was wrong so I set it roughly to local time, then ran "ntpdate pool.ntp.org", and the time switched back 8 hours. To Europe/Helsinki I think. Probably the clock stayed correct all along but the timezone was overwritten by the flasher. Went into the clock settings and changed it.

Recommended Actions Sequence

After tinkering for a while, I recommend the following course of actions:
  • Purchase the device
  • Make a note of the WLAN MAC address, printed inside the battery compartment
  • Insert the battery
  • Create DNS and DHCP entries for the tablet on your network, if you can
  • Charge the device overnight
  • Power up the device, follow steps to set up time, language, wireless LAN etc.
  • Set a "screensaver" keyboard lock, under settings/control panel
  • Check the current OS version, under Settings/Control Panel/About product. (51-3 shows WLAN Mac Address == product ID, too).
  • Check for more recent versions at tabletsdev.maemo.org
  • If there is a more recent version, upgrade using the USB cable as per the Nokia instructions, before you have customised the device too much. Make sure to use the instructions for the correct device (N810, not N770)
  • Connect via WLAN, not cellphone (unless you have an all-you-can-eat data plan and considerable patience)
  • Using Firefox on the tablet, get openssh-server from maemo.org/downloads/OS2008/communications using the installer button.
  • Set a root password
  • Run osso-xterm (under Utilities). Do /sbin/ifconfig wlan0|grep inet to find your ip address, if it is dynamically assigned.
  • ssh in to the N810 as root
  • Install openssh-client
    apt-get install openssh-client
  • set up keyed ssh access
    • On your desktop, make a keypair
      YourPC: $ ssh-keygen -t dsa -f n810
    • On the tablet, allow access:
      Nokia-N810:~# mkdir -m 700 .ssh
      Nokia-N810:~# umask 77
      Nokia-N810:~# cat< .ssh/authorized_keys
      >
      [paste in n810.pub]
      > XXX
    • Test it out:
      YourPC: $ ssh -i n810 root@yourN810.your.net
    • On the tablet, allow keyed SSH access from "user"
      Nokia-N810:~# su - user
      ~ $ ssh-keygen -t dsa
      ~ $ exit
      Nokia-N810:~# echo -n 'from="127.0.0.1" ' >> .ssh/authorized_keys
      Nokia-N810:~# cat /home/user/.ssh/id_dsa.pub >> .ssh/authorized_keys
    • Test it out:
      Nokia-N810:~# su - user
      ~ $ ssh root@localhost
      Nokia-N810:~# exit
  • Block password access to root:
    Nokia-N810:~# echo "PermitRootLogin without-password" >> /etc/sshd/sshd_config

Trusted Repositories

Unless a repository is "trusted", apt-get asks if you're sure every time. To make a repository trusted, a few things have to be in place:
  • A Release file for the repository listing MD5 sums for each deb package
  • A Release.gpg file containing a Gnupg binary detached signature of the Release file
  • A public key for the signer installed in /etc/apt/trusted.gpg
  • An assumption that you verified this public key somehow when you installed it
If you get a public key off the Web, you can tell apt about it by doing
# apt-key add foobar.asc
You can also import it into your personal Gnupg with
$ gpg --import foobar.asc
and then check signatures with e.g.
$ gpg -v --list-keys F00BAAEE
Most people upload keys to the public keyservers, and you can then get them into Gnupg with
gpg --recv-keys F00BAAEE
and then export it to a file and thence to APT with
$ gpg --export --armor F00BAAEE > F00BAAEE.asc then # apt-key add F00BAAEE.asc

Rolling your own
To sign your own Release files, make a keypair and then generate a detached binary signature
$ gpg --gen-key
etc. then e.g.
$ gpg --sign -b repository/dists/chinook/Release
$ mv repository/dists/chinook/Release.sig repository/dists/chinook/Release.gpg

You need to export the public key and tell apt, as above. I cheated and used gnupg inside scratchbox (i.e. not my normal account) with links
$ ln -s /etc/apt/trusted.gpg ~/.gnupg/pubring.gpg
The gpg in APT is cut-down and does not understand keyservers etc., just how to verify signatures.


March 6
Tried the USB adaptor after downloading "usbcontrol 1.0". Was able to read a small memory stick, but not a 1GB SD in an adaptor, or a camera. Will try a powered hub, or maybe give up. It might be useful to be able to talk to my camera (older Kodak that needs gphoto2) though there's more chance of talking to a newer one in memory mode.

Tried to understand the GPS. There's a server gpsd (osso-gpsd package) originally from berlios.de which mediates between the hardware and applications, presenting GPS data on a local socket. It only seems to be running when the Nokia map is running. I tried building gpsd-2.29 (matches the libraries in the N810) from source in scratchbox, and was able to get cgps running on the tablet to read the position. xgps looked interesting but would not build - requires OpenMotif. It should be possible to open the port up to be able to read from another computer, I would think, but on the tablet I needed to be on localhost.

March 7-8
Bought a powered USB hub for about $15. Can read the 1Gb card. Camera shows up but gphoto2 needs a load of libraries and looks like it might be hard to port to ARM. If I have a card in the camera I could pull it and read it in a USB adaptor. Or use a miniSD in a frame and read it directly in the N810 ...

Try building a version of cron by David Parsons. Don't have "mail" so kludge for now with "cat".

March 9
Daylight savings time in Canada under the new rules, but the N810 fails to change. The rules for British Columbia have been available for Linux since 1 April 2006, the day after the government announcement. Been through this last year on desktops ... get northamerica.rules.txt as per my DST page, compile with zic on scratchbox, copy to tablet .. fixed. Looks like zoneinfo is in libc on scratchbox; try doing an update with apt-get and yes, the rules are now OK. Try an upgrade on the tablet but there is no later libc. For now, I have just fixed Vancouver.

(later) tzdata-canada-2006.deb

Try Google maps. Map pane is blank. Hmm, is the browser broken or Google doing something odd? Somewhat later, I realize it is OK unless "fit width to view" is checked. So, don't set this if you want maps to work.

Try Skype talking to the new Skype 2.0 beta on my Linux (FC4) desktop. I thought the video might work, but doesn't seem to. Seems slow both ends. Don't have a microphone on the desktop, and I'm not sure "sound in" works anyway.

March 12
Managed to lock up the device by goofing adding an xmodmap command to /home/user/.profile. The idea is to remap seldom-used chiclet keys (Euro, Yen, Pound) to more useful ones ("|", Escape, Tab). Create /etc/X11/Xmodmap with the following:

keycode 58 = m M Escape Escape Escape
keycode 47 = semicolon colon bar bar bar
keycode 21 = plus equal Tab Tab Tab
keycode 48 = apostrophe question grave grave grave
then (after installing xmodmap) do xmodmap /etc/X11/Xmodmap. Now Fn-M sends Escape, Fn-; sends |, and Fn-+ sends Tab, Fn-' sends ` (backtick).
Putting this in .profile seemed like a good idea, viz.
if [ -x /usr/bin/xmodmap -a -r /etc/X11/Xmodmap ] ; then
/usr/bin/xmodmap /etc/X11/Xmodmap
fi

but I did it wrong ("xmodmap /home/user/.profile"; thanks Michael) and the tablet stuck in a loop rebooting over and over so I had to remove the battery to stop it. I couldn't figure out how to fix it (turning off the watchdog with the flasher just make it hang instead of looping), so I reflashed the unit. Again. And made a shell script "xm" to do "xmodmap /etc/X11/Xmodmap" which I have to run by hand.
After some discussion on the maemo-users list I was told you can boot an alternate OS off an SD card using flasher, but of course I didn't have one handy. Then I could have just removed the offending .profile, instead of having to re-do everything. I now have openssh-server deb on the SD card, so (with R&D mode) I can do
$ sudo gainroot
# dpkg -i /media/mmc1/repo/openssh-common.deb
# dpkg -i /media/mmc1/repo/openssh-server.deb
marginally quicker than adding the right repository in application manager and re-installing over the Web.

Other hints: shift-spacebar hides the shift notifier/typeahead chooser, so if you slide out the keyboard, enable fullscreen, and disable the toolbar you can get 100% of the screen area as an xterm.
Note: it's probably better to edit nokia_vndr/rx-44 as per remapping the keyboard than using Xmodmap.

Flasher
Turns out that setting R&D mode is really easy using the flasher. Just power the device off, connect the USB, type
# ./flasher-3.0 --enable-rd-mode
# ./flasher-3.0 -b
power the device on and voila, R&D mode with a little wrench icon and some version info when booting. Now "sudo gainroot" works without patching.

March 13
Some discussion on maemo-users about how to recover from forgetting your lock code. Apparently it's not strongly encrypted in the system, but recovering it is hard unless you already have the tools in place to provide a backdoor into the system - you would have to download an alternate OS, perhaps onto the SD card, and boot that with Flasher. So, write it down, keep it safe, but don't use a sensitive password.

March 14-20
Tried aircrack. Well, airomon-ng - not enough data to try aircrack. Tried -gpsd option - GPS location is logged in a separate file. Need some work to combine location and ESSID data, but haven't done it.
After running airomon-ng, the WLAN connection is shut down and won't restart by tapping the icon. Can't figure out what to do to restart. Probably something in /etc/rc2.d but the usual suspect (S10network) is not there. Not sure why the default runlevel is 2, as per /etc/inittab. I thought runlevel 5 was usually X11 + network, and 2 was multiuser console, no network. Rebooting works (after airmon).

Tried looking for podcasts on radio.cbc.ca. Need my 3x diopter reading specs but only have my 1x ones; can't read the fine print and get lost. A bit too much content to scroll through easily.
Try watching a YouTube video. Works OK, but too much extraneous detail, ads etc. on the page make it hard to position the video on the screen. Grabbing the embed code and making a local HTML page ought to work.

Both of these sites have too much detail to easily browse on the tablet; if I was going to use them regularly I'd probably write/get some kind of scraping script to collect the useful links. Maybe the ad blocker in the maemo repository would work.

-

Thoughts on screen resolution

My first PC back in 1978 or so didn't have a graphic display at all; it had something like 16x64 characters on a TV screen and by creating custom fonts I could get 160 monochrome lines of resolution. Since then screen resolution has increased steadily so that now one can have a triple-head video card and put 5760x1200 pixels on the desktop. Given the acuity of the human eye, this looks good on a screen about 30cm high and about 45cm from the viewer, or scaled proportionately - a projector screen 3m high about 4.5m away. There is no point increasing the screen resolution in terms of pixels/inch, since the eye cannot use it. Instead, increasing the physical size of the display usefully gives more working area.

The N8*0 tablets are of a size to fit in a normal pocket. This is I believe a useful format, and likely to remain so. At 800x480 pixels, since my eyes are getting old I need not just reading glasses, but fine-work glasses to use the display. Even a young user is likely to have trouble if the resolution was increased to 1706x1024 - or rather, trying to read 12pt type at that resolution. So, I think the 800x480 display as used on the N810 and ASUS eeepc is likely to remain common for pocket devices, and hence a worthwhile target for Web designers (who have largely abandoned catering to 12" CRTs with this resolution).

back to general ramblings

I'd been wondering how one could generate mouse 2 or mouse 3 events, if at all. (On Linux*, mouse 2 is "paste" and mouse 3 brings up context-sensitive menus). xev shows a screen tap as mouse 1. In the Firefox browser, particularly, mouse 3 on a link normally brings up a menu allowing one to save a link target instead of downloading or following it. Turns out that the "Help" menu on the browser actually has useful information; it's not just a clone of the Firefox 2 Help menu. Tap-and-press on a link brings up the menu. Still no sign of cut/paste ability - the usual desktop "doubleclick, click" to copy a word or URL is replaced by the somewhat clunky Microsoft style "click-drag, click (file menu), click (edit), click (copy), click (file), click (edit), click (paste)". Or drop the stylus and use ctrl-C/V on the slide-out keyboard, or tap (toolbar ctrl), tap (text box), tap (C), tap (toolbar ctrl), tap (text box), tap (V). Easier just to type the word, probably.

March 21
Just read about Navit for the N8*0, which uses Garmin maps. I have some of those ... hmmm. www.tecdencia.net/navit

Waypoint editing in the Nokia mapper is pitiful. I found them in /media/mmc2/map/mapdata/favourites.txt. I can at least add new points there, e.g. import them from my "real" (Garmin) GPS or Google Maps with suitable massaging.

"ps w" (wide, i.e. don't crop) does not work in the ps in busybox. Do "cat /proc/nnn/cmdline" instead to get long command lines.

Built nbsmtp - a simple email sending client. Hacked it to work like "mail", i.e. from cron. In my repository

March 24
Found I can use the keyboard "Enter" key (centre of joystick) to take photos with Nokia "camera" app, after sliding out the keyboard and selecting "capture". Not quite so painful as trying to tap the icon with the display facing away from me. A real camera would be way better, of course - unless you don't have one with you and you need to document the dent some idiot just made in your car...

Found the GPS demo program from the Maemo 3.x Connectivity Guide. That generates a gzipped track file, and turns on the internal GPS so that gpsd works. You can talk to it with netcat, viz "nc localhost 2947" then type things like "p" (position) or "r" (raw NMEA). cgps works, also.

Installed maemo-mapper. Much better than Nokia map, even if the GPS satellite display is not so pretty. GPX track and waypoint files, Google/Yahoo street and satellite maps, on-screen track display, street routing via Google API at gnuite.com... Hangs on me a couple of times, though.

Firefox browser is missing a lot of the tools & preferences menus. "about:config" works, though, if you want to add a proxy or something.

Gnokii

gnokii installed OK. It behaves somewhat like gammu which I used over USB as described here. I created a /home/user/.gnokiirc file like this
[global]
model = 6820
connection = serial
port = 00:12:34:56:78:AB
(not my real MAC...)
connection = bluetooth

then various commands worked, such as:
$ gnokii --identify
$ gnokii --monitor once
$ gnokii --getfiledetailsbyid 3
$ echo "test gnokii" gnokii --sendsms 21212
It's possible to download ringtones, addressbook entries, send SMS messages, dial a voice number etc. (on the phone, not the tablet...)

Just tried building QRdecode, as per links on PyQrCodec. Works on FC4, runs on the tablet but won't decode images. Must have got something wrong. Started at Nokia's mobile codes page; there's no precompiled reader for the N8*0 that I can see.

March 27
Running out of disk space: It was kind of inevitable, given only 256M on the root filesystem. I found a whole chunk of MP3s I'd put in /home/user/MyDocs/.sounds ("Audio clips" in media player GUI) to make them more accessible. Also a lot of DEB packages in /var/cache/apt/archives, saved when apt-get or the Hildon application manager downloads files off the Internet. They don't need to be kept, and they certainly don't need to be kept on the root filesystem. Save them on a PC, or on the SD card if you need to swap packages in and out.

Tried installing Jalimo. It works, or at least jalimo-swt-example runs and I can run "hello world", e.g.
$ cacao -classpath /home/andrew/HelloWorld.jar HelloWorld
But the point of the exercise was to try some of the Java-based mobilecode decoders from Nokia's scanner download page. Semacode looks promising - the download is a zipfile with a .jar file. Try
$ cacao -classpath semacode_reader_me.jar org.semacode.reader.SemacodeMIDlet
and get javax.microedition.lcdui.Form not found. I don't know where to find this.

Tried qrcode as per PyQrDecode wiki. On FC4 for now. Example won't build with my old 1.4 J2SDK (I thought Java was pretty stable; guess not..) but builds under latest jdk1.6.0_05. So I can try decoding some test images. It decodes QR images from Nokia's online generator, and will decode longer messages than qrdecode will. Some decode in both, some in neither, or in only one. It's noticably slower than qrdecode.

Tried copying qrcode to the tabledt under Jalimo. Fails; get Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit. So I guess I need another package ...
... Jeff McHugh and Stefano tell me I need classpath-gtk. Get that. It works, but painfully slow (50 seconds to decode a camera image) and is not so good with a camera image as with an original. A couple worked with qrdecode (on my desktop) but not with qrcode.


April 5: I had occasionally got segfaults in scratchbox, but compiled code would run on the tablet OK. Then I got several errors trying to build an application in Python, viz.
python2.5 setup.py install
Jose Luis offered the following advice to build a new version of the emulator (quemu):

re. qemu-arm-eabi-no-scratchbox

 1. You have to install gcc-3.4 and zlib1g-dev
     +  (sudo apt-get install gcc-3.4 zlib1g-dev)
 2. Get the patched qemu-arm-eabi sources available in
    sourceforge.net/projects/qemu-arm-eabi
     +  svn co https://qemu-arm-eabi.svn.sourceforge.net/svnroot/qemu-arm-eabi/trunk
        qemu-arm-eabi
 3. Compile  (on the host system!)
     +  cd qemu-arm-eabi
     +  ./configure --target-list=arm-linux-user --static
     +  make
 4. Update the scratchbox
     +  sudo cp arm-linux-user/qemu-arm /scratchbox/devkits/cputransp/bin/qemu-arm-eabi-sb2
     +  sudo vim /scratchbox/devkits/cputransp/etc/cputransp-methods
         o  add the line: qemu-arm-eabi-sb2
     +  vim /scratchbox/users/USERNAME/targets/SDK_ARMEL.config
         o  change the variable value SBOX_CPUTRANSPARENCY_METHOD to
            /scratchbox/devkits/cputransp/bin/qemu-arm-eabi-sb2
The syscall errors will disappear.
On my system I did not have gcc-3.4; the default is gcc-4 with compat-gcc-3.2. I installed an RPM from Fedora Core 6. Also, I had CHINOOK_ARMEL.config not SDK_ARMEL.config.
I had some compile errors in linux-user/syscall.c viz. "undefined reference to inotify_rm_watch" and "FUTEX_LOCK_PI undeclared". I commented out the relevant items and it seemed to work - the cross-compile errors disappeared .

I have been trying to compile the opencv computer vision library and having various problems with it giving different answers on the ARM than on x86. After some investigation I find that the "char" data type seems to be unsigned on the ARM but signed on the x86; the following code gives different answers:

#include "stdio.h"
int main() {
  int j = -2 ;
  char k ;
  k = j ;
  if (k < 0) printf ("k < 0\n" ) ;
}
Juha Kuikka on maemo-users points out that I can use -fsigned-char in CFLAGS to force chars to be signed, as per Russell King's ARM Linux FAQ. That works nicely!

April 24:
Started writing an N810 FAQ.

Took the tablet to the BC Net Conference. Eduroam works! The battery lasts all day. I don't think I'll bring a full-sized laptop to one of these things again - it's too painful always looking for power outlets to charge up, dragging it to lunch because it's too risky to leave it, etc.

Gripes:

  • The keyboard is a bit hard to take notes on compared to a full-size one, given that I might not be some hot-shot touchtyper but I normally use about 7 fingers. But it still beats writing on paper - which isn't online and no-one can read anyway; even me, sometimes.
  • OpenOffice would be nice. Or a PowerPoint reader, anyway, since presentations are often available online.

April 27:
A couple of weeks ago, actually. Fed up with not being able to read my computer monitor and the tablet with the same pair of reading glasses (my eyes are pretty good, I just have "old guy" syndrome), I made some bifocals. Two pairs of $4 reading glasses from the Dollar Store, a hacksaw and epoxy; voila:

Actually, these are the Mk II. The Mk I was a pair of 1.0 dipoter glasses with the bottom half of some 1.5 diopters glued on top of them.

So, is the plastic stand good for anything ? Maybe... Most people would hesitate to drill holes in their desk, or their car dashboard, but this is using an existing bolt. OK as long as it doesn't rain. It's bolted to a metal bracket I made for my Garmin GPS. Which is waterproof, and gives faster first fixes. But it's monochrome with a smaller screen.
I tapped into the bike electrics and brought 12V out on a gold-plated RCA jack. A cigarette lighter socket plugs in that, and a Nokia 12V adapter into that. Ugly - it would be neater to repackage the adapter circuit and connect straight to the RCA jack - but this way I can connect a cellphone charger, plug the adapter into an unmodified car etc.

The GPS Saga, continued

Still trying to understand why the GPS in the tablet is slow to get a fix. The GPS chips is a Texas Instruments GPS5300, with a supposedly good TTFF with A-GPS. But the Nokia regularly takes several minutes, with some users reporting never being able to get a fix. My Garmin GPSMap76, on the other hand, takes about 46 seconds from cold, and it's about a 7-year-old design, also with an internal antenna.

There are a couple of open bugs at maemo.org on GPS, viz. 2877, 2878, with some interesting information. So, after running strace a bit, here is what I think happens:

The GPS chip is normally turned off to save power. It is connected to a serial line /dev/ttyS0 on the CPU. The protocol it uses is not published; it may be subject to non-disclosure by TI. There is a program gpsdriver started out of /etc/init.d which runs all the time and listens on /dev/pgps for requests for GPS. When it gets one it turns on the GPS, translates the secret messages and sends NMEA to /dev/pgps. (NMEA0183 is the standard language used by GPS on ships to talk to autopilots, plotters etc.)

gpsd is an open-source program that listens on localhost port 2947 for requests for position. It reads the NMEA text from /dev/pgps and translates it to a different protocol on port 2947. It can also listen to other GPS devices on Bluetooth, and more than one program can get position from it (only one program at a time can read /dev/pgps). So it is a common interface to all GPSs. This is what maemo-mapper connects to.

But gpsd does not know how to turn on the GPS. When Nokia Map runs there is another program navicore-gpsd-helper which I think turns on the GPS. I still don't really understand it. navicore-gpsd-helper seems to send NMEA; maybe it reads from gpsd and turns it back into NMEA and sends that to navicore.

Some of these need to run as root in order to turn on the GPS. I am still trying to understand.

There is a file /var/lib/gps/nvd_data which contains the state of the GPS chip. It is written by gpsdriver when the GPS is turned off, and read back in when it is turned on. If this file contains a good position, the GPS will start up quite fast (about 17-24 seconds). If this file is deleted, the GPS will take significantly longer - about 3 minutes, possibly longer.

If the clock on the tablet is deliberately set about an hour wrong, the GPS takes about a minute to get a fix (instead of 20 seconds). But subsequent restarts get a fix in 20 seconds, though the tablet clock is not set from the GPS.

If the clock on the tablet is deliberately set about 40 days wrong, it takes much longer to get a fix; in one case about 400 seconds. I am wondering if a bad nvd_data file is worse than not having one at all. If so, one might get a faster fix after a long flight by deleting this file before starting the GPS. I have not been able to make sense of the file format; I was thinking that maybe writing an estimated position to this file would give a faster fix. On my old Magellan GPS, the documentation said that if you didn't set an estimated time and position it would take a very long time to obtain a fix, if at all. (I have not tried flying across the country turning the GPS on and off ...)

I have been told that newer versions of maemo mapper may know how to turn on the GPS. I have not tried looking for one yet.

May 20:
(last few weeks). More on GPS. Continued hacking the demo program, available at N810/gpstest. Used this to log track data for WiFi.

Tried using the tablet to map WiFi signal strength around TRIUMF. Outdoors, use demo program to log GPS position and a bash loop on "iwlist scan" to collect signal strength data. If I start off logged on to the network, and roam outside the AP range, I get disconnected and iwlist stops listening. Doing "ifconfig wlan0 up" seems to get it back, though.
Also tried aircrack-ng. This seems to leave the tablet in an odd state where I have to reboot to get a normal wireless connection. Plus it doesn't always start properly - though that may just be finger trouble (wrong options or something).
For indoors, wrote a CGI script on apache2 to use an imagemap over a floorplan image. Tap where I am, and the CGI gets signal strength from iwlist and logs it with the image co-ordinates. Turns out this is what the $1500 software packages do, though I gather that Airmagnet also associates with each AP and measures packet loss and TCP retries along with signal strength. The tablet is a bit easier to use than balancing a 2lb laptop in your hand for an hour... I did cheat outdoors, and rode around on my motorbike powering the tablet.

Maybe I'll try installing the bluetooth tools and doing something similar - we'd been having 802.11 issues and I wondered if the new Macs with B/T enabled are polluting the 2.4GHz band. Probably not; it looks like it isn't an RF issue.

19 May 2008
Nokia are running a user survey on tableteer.

Found an oooninja article describing how to run OpenOffice in server mode. So I made a CGI script to download and convert documents, rather like the Babelfish "translate this URL" service. Now if I want to view a Powerpoint on the tablet (assuming it's on the Web and I have network access, e.g. at a conference) I can past the URL into the converter page and get back a PDF in a few seconds. Neat (if it stays up).

The N810 WiMax edition is available in the US. WiMAX 802.16e @2.5GHz, available from certain providers (XOHM on Sprint).

31 May 2008
Visited IRMACS, which uses an unsupported wireless security protocol (EAP/TTLS). Eduroam works at SFU, but the connection in the IRMACS theatre is marginal.

Battery Problems: I was using the tablet in the vehicle mount as a GPS on my motorcycle (it's actually more useful than in a car, since using a paper map is basically impossible without stopping, removing gloves etc.). It worked fine one day, but the next day rebooted after about 30 minutes, then rebooted intermittantly every few minutes. The next night it didn't charge properly, then was hard to boot unless connected to a charger. I wasn't sure if there was a problem with the charger, or the charger socket, or a software problem (earlier O/S versions have had problems with booting if the battery is warm). I tried resetting the unit by removing the battery, and noticed that two of the little gold clips were loose. I could not remember whether this was normal or not.

After a lot of messing around, and putting an ammeter inline with the charger, it became apparent that there was at least one intermittent connection to the battery - which has 3 connections, marked (+), (-) and ( ). Moving the battery slightly (there's about 0.3mm of space) would cause the charging current to change and sometimes cause the display to change (light up, go dark, show a "blue screen of death").

(the Nokia chargers seem to be equivalent to a 6.3V source with 1ohm internal resistance, and an 890mA current limit. Connected to the 3.7V battery, this acts as a constant-current charger. The battery initially charges at 890mA for a few seconds, then pulses at about 1Hz - I conjecture a circuit in the tablet measures the voltage when not charging - then charges continuously at 890mA. The charger makes a slight buzzing noise when delivering current. When the battery is perhaps 80% charged, the charging circuit switches back to a pulsed mode until the battery is full. The charging current then drops to zero, and the tablet displays "battery full".)

I replaced the battery with an aftermarket battery from a cellular phone store (I tried about 5 stores, and no-one seems to have the Nokia one) and everything seems to be back to normal. So now I need to figure out if there's any warranty on the original battery, or if I can repair it. Hypothesis: vibration transmitted through the vehicle mount caused the battery to move from side to side slightly, causing the (possibly spot-welded) join of the clips to the battery leads to fail. I may insert a wedge to stop the battery moving.
later .. stuck a bit of electrical tape to the sides of the battery to wedge it. Phoned up Tiger Direct who said there's a 1-year warranty on the battery and tablet, and I should call Nokia. Called Nokia, who said I could return the battery. Did that; cross fingers and hope they don't refuse on the grounds I "dismantled" it (I lifted the sticker to see if I could get at the contacts easily, but it looked like the cover was heat-sealed in place). I might have been able to repair it, though if the battery leads were aluminium solder would not work and I don't have a spot welder. Having got a replacement battery, it's not worth doing anyway - using a repaired battery would doubtless void the tablet warranty, though it would be OK running a bicycle light.

12 June 2008
Took the motorcycle across to Vancouver Island on the ferry. Google (used for Maemo Mapper routing) seems to have a good idea of how fast the ferry goes, but no concept of schedules or that it might not go direct. The route from Vancouver to Duncan shows a 2:53 total trip time, but includes a ferry ride that takes 3 hours. Needless to say, I took the Nanaimo ferry not the Long Harbour and Crofton ones.

I used the gnuite.com interface on my desktop to generate a GPX file, then copied it to the tablet, rather than running the route tool in maemo mapper directly. Probably I should write my own GPX page - it would be nice to have the graphical view as well as the GPX code. Or maybe it's been done already.

Forgot my cellphone (so no mobile internet) but I had saved some stuff to the tablet with wget while still at home. Including some ferry schedules, which for some reason would not display properly offline - the crossing times were present in the HTML but didn't display in Firefox. Probably a missing script/CSS; never mind, could read them in "less".

Maemo mapper worked nicely, if a bit hard to see with sunglasses on. The transreflective screen could be better in direct sunlight. Anyhow, it got me to my destination, popping up a "turn left ahead" notice at an appropriate point.
I'd made a note of a couple of recommended hotels, but not the locations. So I thought I'd try and find them on the Navicore POI display. No luck, but I did find an inexpensive unbranded motel close by, which was perfectly adequate. I note the POI display really needs a GPS fix, otherwise it seems to display hotels alphabetically for the whoule country or something daft.

On the trip back, the GPS never got a fix. I'm not sure why not - maybe because I was moving too fast for a first fix. I knew were I was going and didn't stop to give it a chance to get one. But it got one on the ferry (on the upper deck) in a few minutes.

19 June 2008
Had a look at the Maemo media converter by Urho Konttori. This is a Java application that converts video so it will play on the N770/N8*0. Actually, it's a wrapper around mencoder, part of the MPlayer suite. It wouldn't work for me as it uses the mp3lame encoder, which I didn't have. I did find the libraries and rebuilt mplayer/mencoder, but it still won't work for some unknown reason. However .. I found the twolame libraries, and those do work, so I grabbed the mencoder parameters from the error console and replaced -oac mp3lame with -oac twolame. The following recipe worked for me, making an AVI that would play with the Nokia media player:
mencoder dvd://5 -oac twolame -twolameopts br=64 -ovc lavc -lavcopts vcodec=mpeg4:aspect=4/3:vbitrate=512 -vf scale=480:288 -idx -ffourcc DIVX -quiet -o whatever.avi

Here's a table of what video (from my motley collection of test files and movie trailers) were viewable on my desktop Mplayer, Mplayer on my tablet, and the Nokia media player on the tablet.
Key: Y yes, N no, Nc codec not supported, Nf format not supported, Nl did not launch
fileNokia
media player
Tablet
mplayer
Desktop mplayer
codec video/audio
3gp.3gpYYffodivx/-
bmp24.aviNcNN ffmsrle/-
bmp32.aviNcYrawbgr32flip/-
cinepak.aviNcYffcvid/-
divx.aviNfYffodivx/-
dv_pal_progressive.aviNcYqdv/-
dv_pal_progressive.dvNlYqdv/-
huffyuv.aviNcYffhuffyuv/-
indeo.aviNcNindeo5ds/-
mpeg4.mp4YYffodivx/-
qcif_RGBA.aviNcYrawbgr32flip/-
qcif_RGB.aviYrawbgr24flip/-
qcif_UYVY.aviYrawuyvy/-
qcif_Y8.aviNcYrawy800/-
qcif_YUY2.aviYrawyuy2
qcif_YV12.aviYrawyv12/-
qcif_YV16.aviNN YV16
qcif_YVU9.aviNcYrawyvu9/-
uncompressed.aviNcYrawbgr24flip/-
wmv9.aviYY ffwmv3wmv9dmo/-
Animusic-PipeDream.wmvY/sloY nswmv9dmo/wma9dmo
AnnaYY ffodivx/madffodivx/mp3
SteveSw31.mpgNlY ffmpeg1mpeg12
toystory.aviNcY cvid/pcmffcvid/pcm
wmvideo.wmvNcYwmv8/wmadmo
whiterain.raYno vidrv3040/ffcook
000_2216.qtNlY/slowffmjpeg/pcm
hakuna1.movNY/badffcvid/pcm
sample_h264_100kbit.mp4YYffh264/faad
robots_m480.movNlY/errffsvq3/ffqdm2
queen-damned_lo.movNlYffsvq1/ffqdm2
misc2.wmvNcYwmadmo/dmo
miscNlYffodivx/pcm
misc18.mpgNlYmpegpes/mp3 n/sound

`24 June 2008
Diablo is out - the latest O/S release.

Do backup with rsync, grab Fiasco package, and reflash. Boots up OK.
The security code that I had set when I first got the tablet, then disabled, has got re-enabled. Fortunately I remember the code ...
Forgot to use the Nokia backup tool, and my rsync script missed the image directory. Looks like I've lost a couple of photos :-(
The flash-and-reboot restored some packages I'd installed with the hildon application manager, but not the ones I'd installed with dpkg or apt-get. Fortunately, most of those are saved on the SD card. Install less, nbsmtp, cron, python, battery-status, maemo-mapper

5 July 2008
Installed navit and played with some Garmin maps. Figured out I had to disable the test map in the config file before the Garmin ones would work. It's not as polished as maemo mapper, IMO, and slower. It can't handle a large number of maps, and there is no GUI to select maps to be loaded. Also, compared to the real GPS set, there is little control over the type of objects that are displayed at each level of detail, and small-scale mmaps are not suppressed in favour of large-scale maps, so features are duplicated. Nevertheless, basically it works, and if I want a topo map, there is no alternative AFAIK.
I have been playing with an app called "imgdecode" to list the extents of Garmin files, so I can load only the ones I need. Messy scripts aat the moment.

I also built Navit on my desktop. It's somewhat faster there, and able to handle more maps. An attempt to build it myself in scratchbox failed; not sure why. Threads, maybe.

Installed the APS daemon supl-daemon along with agps-ui. This is supposed to fix the long time-to-first-fix on the GPS by downloading almanac data from the net. I think it helps, though it's time-consuming to test.

Took the bike over to Comox; used maemo-mapper with a couple of downloaded GPX routes. Preloaded most map tiles at home on WiFi, but downloaded a few missing tiles via cellphone on EDGE.

Bought a Ubiquio folding keyboard - I'm typing this on it. Had a heck of a time pairing it - took about an hour of tinkering, and I'm still not sure what the exact moves were. It feels a bit flimsy, but it has 5 rows with digits and reasonable sized keys. We'll see ...

July 16
Took the bike for a road trip up the Duffy Lake road - spectacular mountain scenery, popular with motorcyclists and RVs. Ran the tablet in GPS mode most of the way with Maemo Mapper, also Navit. Navit displays Garmin maps, and I have an old copy of Topo Canada. Unfortunately the current version of Navit does not show the track, or do auto-centering, which makes it hard to use while moving. But it does show many logging roads.
Also, Navit on the tablet cannot cope with many map files, and the topo map has thousands of tiles. As described earlier, I had made an index for these and wrote a script to generate navit.xml for a region of interest. I brought the Ubiquio keyboard and used that while tuning the script and building a tile set for Duffy Lake instead of Vancouver.

I saved the track from Maemo Mapper and used the GPX file for geotagging photos, which I had previously used my Garmin for. Garmin GPX uses GMT, Maemo Mapper appears to use local time, so I had to update my script.




(Pemberton)

I had supper at a White Spot in Squamish, and noticed they had a Fatport WiFi hotspot. UBC have a peering arrangement with Fatport, so my UBC login should work - and it did, but first I had to connect via my cellphone to read the instructions. Whether the technology is really that helpful is another matter - I looked up a phone number on the Web that I could have just dialled 411 to find, loaded some more tiles into Maemo Mapper cache, and found some information about a campsite that turned out to be incorrect.

24 July 2008
The Power Save Mode Saga
After a while (OK, after a long time, because I was usually using the tablet at least some of the time when I took it to work) it became obvious that the battery ran down a lot quicker at work than at home - especially after I started graphing the battery charge level.
After some discussion on maemo-users, Kalle at Nokia pointed the finger at Power-Save handling in the wireless access point (I had initially suspected the much larger amount of broadcast and multicast traffic). After some investigation, at this point I'm still not sure. The wireless chip in the tablet normally is set to power-save mode (under "other" in the "advanced" options in the connection settings for registered APs). This is part of the 802.11 specification ("PS", in the spec. now available for free from ieee.org). Each access point, or SSID on each access point, transmits a beacon at regular intervals (usually 100ms). If a client is in power-save mode, it goes to sleep after a beacon and sets a timer to wake up in time for the next one (or a beacon with DTIM counter zero). If there is data for a registered client, the AP sets a flag so that the client will know and accept the data. According to Kalle, Windows laptops do not ussually implement PS mode, and some access point do not support it properly. When I look at the traffic (with Ethereal, on a laptop with the wireless driver in monitor mode), I cannot see any obvious difference between my Linksys router at home and the Proxim AP4000 at work. In both cases the tablet sets a flag to say it is going to sleep and the TIM flags are cleared after the data transaction. On my router at home, I can change the beacon interval and DTIM multiplier, which is interesting to watch: packets are held until the next DTIM time so that the responses to 10 pings at 1s intervals can all arrive together.

26 July
On Alastor after not using it since Prince George, my old Garmin took a really long time to get a fix (clear view of sky). Tried setting an initial position, tried disconnecting external power to reduce electrical noise. Finally got a fix after maybe 45 minutes. I don't ever remember it taking so long. I'm not 100% sure it had the right time - I think it said 10:20 local at about 16:00. But it may have been saying 10:20 GMT at 17:20 local, which was correct.
The internal clock doesn't lose time when changing batteries, though I don't recall a button cell. Maybe there is one inside I don't know about. The menu won't let me change the tine, only guess a location.

05 August
Off to Las Vegas for BlackHat and DEFCON conferences. Took the N810 along (of course), plus BT keyboard, 110V charger and 12V charger. Good news - the tablet runs all day without a recharge doing duty as a GPS, note taker, Web browser, impromptu WiFi monitor etc.
Bad news - I had the tablet sitting on the dash in my rental car, plugged into the 12V charger (I have "display lit when on charge"), and it fell off, pulled by the somewhat springy power cord, and bent the charger connector. Fortunately the socket in the tablet itself seems OK. The tablet also slid off the dash on other occasions (pulling away from lights, taking a corner etc.) until I bought some rubber bands and put one either side of the display. Bingo! No more sliding around. A few days later I realised that the in-dash compartment that on my minivan holds the fuses, on the rental car seemed to be explicitly designed to hold a GPS or a radar detector. Duh.

The GPS did pretty good, on the whole. I think it worked better in the lower latitudes than back home - it could get a fix from inside my hotel room, and keep one while on the car passenger seat with a steel roof directly above. I should have preloaded some GLX routes for Maemo Mapper before I left home; it would have saved some minor navigational foul-ups (the regular tourist kind, overshooting and doing a U-turn, pulling over to check the map carefully etc.). Maemo Mapper needs an Internet connection to generate a route, while Navicore Map doesn't always find street addresses. Tropicana Ave in Las Vegas for instance (a fairly large road). And it can't always find the number, defaulting to some random place on the street, rather than the closest match. Note to self: what these GPS sets need is a house number display (with most North American cities being on a NS/EW grid and having 100 nominal houses per block, this is mostly computation rather than needing an impossibly large database). But basically, I was using the tablet rather than paper maps, and it worked out fairly well.

Found 3 or 4 other Nokia tablets at DEFCON, plus an Acer Aspire. Chatted to the Aspire owner a bit, since I had just bought one for my daughter but not had much time to play. This uses the Intel Atom, touted occasionally as an ARM-kiler. The owner said that the Aspire has old power-hungry support chips, so the thing only lasts the same 2.5 hours as a normal laptop on the regular batteries, and it hibernates rather than waking at a tap like the N810, so it's no contest - the Nokia wins hands down. Besides, the Aspire won't fit in a regular pocket - ladies handbag, or cargo pants maybe - though it does have a 1024 pixel screen, full-size USB connectors, Ethernet and VGA out. But no BlueTooth.

12 August
Trip through Death Valley on a rented Harley. "internal-temp" on the tablet said 42 celsius in my pocket. Furnace Creek visitor centre said it was about 47. Fired up the GPS occasionally - no cigar lighter socket on the bike, and I didn't want to have a dead set when I needed it to nav back to the hotel. Nearly passed out from heatstroke - it kind of creeps up on you. Found a working standpipe and some shade to get my act together. (Bike desert survival tips: fill your helmet with water, then put it on. Soak your clothes in water. Repeat as needed. Drink a bit too.) I must have been losing water like crazy but wasn't sweating because the wind carried it away before it had a chance to bead. I wasn't particularly thirsty, and didn't really feel that hot, not like when I've had a fever, just started feeling a bit weird). Missed my flight, but US Air put me on on the next day at no charge (thanks!). Got myself marked down for the "suspcious persons" security line for missing a flight or something - the one where they blow air over you and run it through the gas chromatograph. I'd fired off a few rounds that morning at the Vegas gun store range, but apparently not enough to get residue on myself or luggage, thank goodness. (Though this being the US where you can actually buy submachine guns, and take them on planes in checked baggage, it's probably no big deal). The N810 made it through the security check without being investigated (only swabbed down for explosives), and they didn't complain about the pocket knife or lockpicking tools. Or the DEFCON badge - funny-looking circuit board with a switch, pirate sticker and flashing lights (but I'd removed the battery). Confiscated my sunblock, though (too big). (I'd meant to check it all, but went the wrong way as I already had a boarding pass).

13 August
Looks like my new SD card video camera can be read in USB host mode from the N810 (neat). I hadn't taken the cables with me, else I could have posted a few images or videos via the tablet using the hotel or conference network connection.

6 September 2008
3 week road trip to Disneyland. Took tablet (of course..) and old Garmin GPS, which only had a basemap for the US hence really only useful for geotagging photos when the tablet was out of battery.

Signed up for Boingo. Asked if they had a GPX list of hotspots, or a tool to find by location. They don't, only a list by country, state and address. So I made one, using gnuite.com and wget. It's at andrew.triumf.ca/N810/BoingoGPX
if anyone wants to try, these files will load in Maemo Mapper and show Boingo hotspots in Washington state, Oregon, Nevada and California in the US.

Update - Boingo now have an interactive map online (thanks!); but you need an Internet connection before you can find an Internet connection.

But when it came down to it, I never really used Boingo. Most of the hotspots are in McDonalds or other restaurant chains we don't often patronise, and I got free WiFi at a couple of campsites, or paid for it in a hotel. So I may cancel my subscription.

Our hotel in Anaheim had WiFi in the lobby, but only a wired connection in the rooms - slightly annoying. I had also brought an Acer Aspire One, which has a regular Ethernet jack, so I was trying to get Maemo Mapper tiles onto the tablet using the Aspire as a proxy. After messing around a bit I did actually manage this - created an Ad Hoc mode station on the Aspire using (I think) wlanconfig, created an Ad Hoc entry manually on the N810 using static ip, and ran tinyproxy on the Aspire to proxy HTTP. Ideally one would set up bridging on the laptop, use 802.11 Master mode and just connect transparently on the N810, but the Aspire has limited space, no build environment, and I couldn't get Master mode to work.

I ended up with huge GPX track files from Maemo Mapper - much larger than on the Garmin (which has limited RAM and an algorithm to automatically reduce track data). But still managed to geotag a lot of my photos and videos.

later
Tried a few Boingo hotspots locally. One in a UPS store had been discontinued, but still shows in their map. One on the map is shown about 4km East of where it really is. Two others I tried (outside restaurants) would not work. Another prompted an error from the Boingo applet (so I guess that it's running, anyway). I didn't actually go into the restaurants and ask for WEP keys etc.

December 2008
I finally wrote a GPX generator - dual-hosted at gpx.geotags.com. This uses Google's API to display a route between two addresses, then the KML (google earth) interface to download it as KML then convert to GPX. Which I can then save as a named file and send to the tablet. Probably similar to what gnuite.com does. I also looked at downloading POIs, but didn't finish anything.

2009
Daylight saving time starts March 8. Usually I set my watch from a computer that uses NTP, then wander around resetting all the clocks. This year thought it would make more sense to walk around with the tablet which can run NTP directly. I have /etc/ntp.conf set to

driftfile /var/lib/ntp/drift
server 0.ca.pool.ntp.org dynamic
server 1.ca.pool.ntp.org dynamic
server 2.ca.pool.ntp.org dynamic
and made the following to display time to 1/10 second:
#!/usr/bin/perl
use Time::HiRes qw( gettimeofday usleep )  ;
$| = 1 ;
system("ntptrace -n -m 1");
while (1) {
  $t = gettimeofday() ; 
  $t2 = $t * 10 ;
  $it = 1 + int($t2) - $t2 ;  # time left till next tick
  ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($t);
  $dsec = $sec +$t - int($t) ; 
  printf("%2.2d:%2.2d:%04.1f\r",$hour,$min,$dsec) ;
  $dt = usleep ($it*100000) ;
}
I found Time/HiRes in the scratchbox tree and copied it over; ditto GetOpt.pm.


Playing with Gnokii and Twitter: Twitter and more recently Facebook let you send status updates via cellphone SMS messages. With gnokii I can tell my Nokia cellphone via Bluetooth to send SMS. This is probably less overhead than using IP over GPRS and the Twitter API. Here's a short script to send a Twitter update:

#!/usr/bin/perl
while ($_ = shift) {
  $msg .= $_ ; $msg .= ' ' ;
}
$twitno = '21212' ; #Canada
open (OUT,"|gnokii --sendsms $twitno") or die "Can't run gnokii\n" ;
print OUT "$msg\n" ;
close(OUT) ;
I also have a version to get GPS coordinates and send a location update with a Google map url from
$url = sprintf("http://andrew.triumf.ca/gm?%.4f%%2c%.4f",$lon,$lat) ;
Twitter just takes it; Facebook replies with a long SMS saying that it worked. Useful if you want to tell people where you are. SMS seems not to require as good a signal as voice, or not for so long, and uses less energy than a typical voice call.

In October 2008 or so my laptop was stolen. So now I have a new laptop - a Dell Inspiron 1525 with built-in Bluetooth. This is useful with the tablet - I can send files such as GPX routes over Bluetooth when WiFi is unavailable. Normally at home the tablet's got a static address on my home network, and I have SSH keys set up, so using scp to push a file across is trivial. But while travelling I had some random ip addresses on a hotel LAN, so Bluetooth was easier. My laptop has Fedora Core 9 with Gnome, and in the desktop GUI I can select "send file". If I want to go the other way (from the tablet to the laptop), I can use the file manager on the tablet then "send". On the laptop, I have to enable Bluetooth discovery temporarily. I could set up an 802.11 ad hoc network if I wanted to log in from the laptop away from an access point; I haven't found an equivalent to SSH over Bluetooth.

Looks like Google satellite maps are no longer available in Maemo Mapper - Google changed the tile naming scheme, and maybe made it deliberately difficult to download tiles outside of a normal Web browser. Pity.

Looks like my power-save mode bug with the Proxim AP is not going to be fixed in Diablo. Rats! I now tend to put the tablet in offline mode at work when I'm not actually using it, which is slightly irritating.

Tried converting some Youtube music videos to play on the tablet, using the same mencoder recipes as for DVD. Works OK. There's a Python script around called youtube-dl to assist in downloading the FLV file. Typically there is a low-res and a high-res version. The low-res one will often play OK directly in mplayer on the tablet, but has some problems in media player - jerky video. Once converted to an AVI at lower frame rate, plays OK. Current recode script is

#!/bin/sh
if [ -z "$1" ] ; then
  echo "Expect file; recode X to X.n810.avi" ;
  exit 
fi
if [ -z "$2" ] ; then
  out=$1.n810.avi
else 
  out=$2
fi
if [ -e "$1" ] ; then
  mencoder $1 -oac mp3lame -lameopts vbr=3:br=64 -af volnorm=2:0.3,extrastereo=2 \
    -ovc lavc -lavcopts vcodec=mpeg4:aspect=4/3:vbitrate=512 -vf scale=400:240 -idx -ffourcc DIVX -quiet -o $out
else
  echo "Cannot open $1"
fi

Downloaded Flite speech synthesis to try with Maemo Mapper. Works, but I can hardly understand what it's saying and it only speaks once. Would be nice to tie a hardware button to "speak again".

April 2009
While at a track meet, uploaded a photo to my website the hard way: saved it to a micro-SD card in the camera using an adapter, then physically moved the card to the tablet using another adapter. Normally I have a 2G card using ext3, while the camera card uses VFAT. I did it "hot", and the tablet locked up so I had to power-cycle it. Not sure whether I was unlucky or whether doing a hot swap is generally a bad idea; after all, USB sticks and, AFAIK, SD cards slots on laptops are designed for hot swap.
Anyhow, after getting the photo onto the tablet I used rsync via BT/EDGE on my cellphone to get it on my server (as I would do from my desktop at home) then sent email to say it was there. I'd really like to get gphoto2 working if I could; I ought to be able to control the camera directly via USB. Which would allow jitter-free long exposure on a tripod (my camera does not have a mechanical trigger socket), and things like "take a picture every 1km" using GPS.
(later) played around with USB - cannot get a stable lsusb reading with the camera connected. I was also having trouble with the powered hub, and can't find the USB stick that used to work for me.

May 2009 Not much new .. leaving the tablet on the bedside table and checking out cartoons (Dilbert, xkcd, phdcomics) before getting up in the morning. Sometimes news via Google gadgets and email, too.
- after slagging the handwriting recognition as useless, I find I can at least use it to enter "d" for dilbert.com and "x" for xkcd - the browser autofills the rest as a frequently-entered URL. I also realized that the browser icon on the toolbar requires less clicks to enter a bookmark on a running browser than file/navigation/bookmarks from the banner.

July 2009 Openstreetmap (which is the default map in Maemo Mapper) has much more content than I recall when I first tried. I've been adding some local roads and lanes with Merkaartor (on my Linux desktop) - download tracks from the tablet and import the GPX into merkaartor then trace over them. Uploads appear on the web fairly fast (a few days at most).
We can make this better than commercial maps like Google, if volunteers add more details. E.g. buildings at the University of British Columbia have been added.
I see Maemo Mapper now supports overlays for e.g. Google Traffic. Have not investigated yet.

Someone said that there were now marine charts available for the iPhone. It seems that the US NOAA issues electronic charts for free in BSB format, and there is a company repackaging these and others for an iPhone app. It ought to be possible to do at least as good on the N810. After some messing around I found I can convert the raster charts to PNG then cut them up into tiles for a slippy map compatible with Maemo Mapper. So I can use the tablet as a backup to my Garmin mapping GPS (for which I paid $100's for digital charts. However, the NOAA has no large-scale charts of Canadian harbours. More investigation needed. In theory, I can convert scanned PNGs to BSB (which contains alignment metadata) and back to tiles so could get my critical paper charts into the tablet that way.

I may make this stuff (NOAA slippy charts) available online, or write it up somewhat.

recent: September 2009 Went sailing in August, using the tablet as above. As it happens, we went north to Desolation Sound, rather than south to e.g. Victoria, so the NOAA chart coverage was not so good - the US has small-scale charts of the entire Pacific Ocean, but finer detail only closer to US territories. I scanned bits of several Canadian paper charts, but only converted some of them before sailing. Some others I did under way. This worked well in a couple of places, notably Savary Island, where I had the same large-scale chart as on my Garmin GPS, but the tablet was easier to read - better lit, larger display, colour screen, and faster panning. A reflection on the age of my Garmin, really. On the other hand, the Garmin is waterproof and will talk to my autopilot.


Maemo Mapper with chart of Hornby Island. This is one I scanned and then converted via a "fake" KAP (BSB) file - the KAP file contains data describing the chart extents, and reference points (pixel vs. lat/long location). Having written a script to extract this from real KAP files, it was easiest to create a similar file for hand-converted maps.

Some slippy charts for the West coast of the US are available at geotags.com/NOAA/. Maemo Mapper repository is http://geotags.com/NOAA/%0d/%d/%d.PNG. Note the conditions of use.


Useful Links

RSS

Andrew Daviel


*Linux: the 2-click cut/paste operation is more properly a feature of Xorg X11 as configured in popular Linux distributions such as Redhat Fedora. "Linux" itself is a shorthand for "Linus Torvald's Linux kernel packaged together with a lot of compilers and tools from the Free Software Foundation and a ton of other applications from people like Mozilla and Sun and Adobe", and often referred to as "GNU/Linux"