Luigi Rizzo's Kindle blog


Kindle3 information

This page contains some informations (features, bugs, etc.) on the Kindle. Unless specified otherwise, I will mostly refer to the Kindle3 WiFi which is what I have.


standalone kindle terminal (posted 2011-01-07)

Below is a standalone C program which lets you run a shell from the Kindle's keyboard and screen (updated 2011-01-07 to fix a bug in cursor handling, and also add some useful shortcuts to launchpad.ini, see the WiFi issues indicated in another post)
Extract the archive, look at the source and possibly rebuild it to make sure you don't have surprises (there is a precompiled binary if you trust it). Copy myts.arm and the two
  • ini files in a directory on the kindle and manually start

the program in background.
The program acts as a "launchpad", i.e. it recognises certain key sequences and executes actions (e.g. run programs) as defined in the config file launchpad.ini".
In particular, the "Shift" t sequence enters terminal mode, from which you can exit pressing "Left<" (the "Page Back" key on the upper left side of the screen). ESC is "Left>", other Key mappings for the terminal are shown on the on-screen window.
The font is CP437- 8x16 so you can see 75 chars in vertical mode, and the full 80 chars in horizontal.
The KindleDX keys might need some tweaks -- see keydefs.ini
Thanks to the author of launchpad for code examples on how to access the kindle's inputs and framebuffer.

Network Connection (posted 2011-01-02)

The kindle often complains that it cannot connect to a WiFi network, but what this really means is that it cannot connect to, and this blocks the browser even if local connectivity is available.
To make the system believe that the network is reachable (and let the browser work), you can issue the following command:
dbus-send --system /default com.lab126.wifid.cmConnected
and you will see the [Wi-Fi] icon turn on.
Unfortunately you need to do it every minute or so, because the daemon in charge of connectivity (wifid or probably the 3G equivalent as well) periodically tries to refresh the address and connect to amazon, and on failure it issues a
dbus-send --system /default com.lab126.wifid.cmNotconnected
event which blocks the browser again.

TCC for Kindle (posted 2010-11-12)

I have prepared a version of the Tiny C compiler for the Kindle. You can find it at
Headers are still missing, you have to find it somewhere else (I am working on it).

Kindle terminal update (posted 2010-11-07)

An updated version of Ajaxterm which lets you configure ports, commands etc through the command line, plus many simplifications

Kindle terminal (posted 2010-11-05)

One way to run a shell on a kindle is to use the browser as the user interface. is a simplified and stripped down port of the AjaxTerm program that is suitable for operation on the Kindle.

AjaxTerm uses some simple javascript on the client to access a server in charge of forking shells (and keeping them alive) and pass tty data across the HTTP connection. This approach is especially useful on the kindle, where running an xterm or a shell in console mode is challenging. Instead, the browser can be used for this.

The original AjaxTerm uses a Python script, with the usual amount of classes, to implement its services. I have completely reimplemented the program in C, using a single process that handles multiple connections and forks the child shells as desired. The javascript has also been heavily simplified, removing unnecessary libraries.
The tarball includes:

  • this README
  • myts.c (source code for the server)
  • myts.arm -- a version of the server compiled for the kindle
  • ajaxterm.js,css, html files

    To use the program you must run the server from the directory where the javascript files are, and then launch a browser to
    On the kindle, ALT maps to CTRL, and the ESC key is the "page back" key on the left of the screen.
    At this stage the program is still a bit experimental in that it still needs work on two areas, namely process management and terminal emulation. In particular:

    • complete ANSI control code emulation. Not all ANSI sequences are recognised, though most things work (top, vi, ...). The missing sequences mostly refer to color handling.
    • reconnect to existing sessions. at the moment each session uses a random key so if the browser dies or disconnects, you cannot reach the existing session anymore
    • session termination. shells remain alive until the server terminates. I should implement a way to explicitly kill a session or connect to one of the existing ones.

  • Refresh content after modifying filesystem (posted 2010-11-01)

    In order to refresh content after modifying the files in /mnt/us you should run
    dbus-send --system /default com.lab126.powerd.resuming int32:1

    Browser does not open links in new tab (posted 2010-10-28)

    An annoying feature of the browser is that it refuses to open links in a new window. And since there is no way to capture the link or store it as a bookmark, you cannot navigate on links which have 'target="..."' set.
    The error message is
    Web Browser could not open this link because opening multiple
    windows is not supported.
    in variable messages.error.new_window_suppressed called by Browser.jar: com/amazon/ebook/booklet/browser/r.class

    Browser supported formats (posted 2010-10-28)

    Another slightly annoying feature of the browser is that it will not display or download a pdf file (even if the reader is able to display it).

    System configuration (posted 2010-10-27)

    Some information on the Kindle3 hardware and software
    \# more /proc/cpuinfo 
    Processor        : ARMv6-compatible processor rev 3 (v6l)
    BogoMIPS        : 255.59
    Features        : swp half thumb fastmult vfp edsp java 
    CPU implementer        : 0x41
    CPU architecture: 6TEJ
    CPU variant        : 0x1
    CPU part        : 0xb36
    CPU revision        : 3
    Cache type        : write-back
    Cache clean        : cp15 c7 ops
    Cache lockdown        : format C
    Cache format        : Harvard
    I size                : 16384
    I assoc                : 4
    I line length        : 32
    I sets                : 128
    D size                : 16384
    D assoc                : 4
    D line length        : 32
    D sets                : 128
    \# more /proc/meminfo 
    MemTotal:       256568 kB
    \# df
    Filesystem           1k-blocks      Used Available Use% Mounted on
    /dev/mmcblk0p1          662362    492797    142941  78% /
    tmpfs                   128284        20    128264   0% /dev
    rwfs                     32768       696     32072   2% /mnt/rwfs
    shm                     128284         0    128284   0% /dev/shm
    rwfs                     32768       696     32072   2% /var
    /dev/mmcblk0p2           23797      1492     21077   7% /var/local
    fsp                    3247200    119968   3127232   4% /mnt/us
    fsp                    3247200    119968   3127232   4% /opt/amazon/screen_saver/600x800
    /dev/loop/0            3247200    119968   3127232   4% /mnt/base-us

    Browser and Javascript or SVG (posted 2010-10-25)

    I have some applications such as which use Javascript for polling a server, and some other which even do SVG rendering, and they seem to work fine on the Kindle's browser.

    Image viewer (posted 2010-10-24)

    As mentioned by other blogs, there is a picture viewer on the Kindle but is not very robust.
    You need to create a pictures directory under the root of your filesystem, then a subdirectory for each set of pictures, and then use ALT-Z to refresh the window. The set of pictures will be listed as a separate document in the home menu.

    Support for file:/// (posted 2010-10-22)

    Some blogs suggest that Kindle2 supports the file:///URLs.
    This is not true anymore on Kindle3 with 3.0.2 or 3.0.3 . The GUI on the browser replies with this message
    Web Browser cannot download files using this protocol. Only HTTP: and HTTPS: protocols are supported.

    Issues with WiFi on open networks (posted 2010-10-21)

    The Kindle3 seems to have issues connecting to open WiFi networks in DHCP mode. Setting the network as STATIC and supply entries manually might help a little. 3.0.3 does not seem to work much better.
    You can get a bit of information by doing Home->Settings->711 as the page is dynamic. You see that it often refuses to accept certain DHCP offers, for reasons unknown to me.

    Useful links (posted 2010-10-20)