DR800+

Author: Iñigo Serna, inigoserna AT gmail DOT com
Version: 4 - Jul 3rd. 2011
Home page:https://inigo.katxi.org/devel/dr800/dr800+.html or http://www.terra.es/personal7/inigoserna/dr800/dr800+.html
Last update:Sun Jul 3 23:48:08 2011

Table of Contents

Introduction

DR800+ is an enhanced firmware for DR800 ereaders from now defunct IREX company.

It's based on IREX last code, version 2.0RC3. It includes some features ported from DR1000 and also new exciting features that improve the overall usability of the DR800.

Screenshots, packages to download and discussion forum in MobileRead: http://www.mobileread.com/forums/showthread.php?t=93627

Disclaimer

There is no warranty of any kind, backup your data first, be ready to reflash your device, etc, etc, etc.

Anyway I've tested these programs on my DR800S and on the emulator, it should work on DR800SG models as well. If you find something wrong, please tell me.

Development

The sources are on https://bitbucket.org/inigoserna/dr800

In the section Building instructions you have more information if you want to build the software yourself.

Features

+ general
  - nice installer [v3]
  - faster: compiled with optimizations for the CPU of the DR800
    "-mcpu=arm1136jf-s -mtune=arm1136jf-s -O3 -funroll-loops" [v3]
  - modify IREX default gtk+ theme style: make scrollbars narrower [v3]

+ popupmenu
  - taskbar
    . open several docs/apps simultaneously (ported from DR1000) [v1]
    . add active task-list in menu, to allow natigation without stylus
      [from Mackx's work] [v3]
    . add a menu item to toggle taskbar visibility [v3]
    . make taskbar visibility at start configurable in System/dr.ini,
      default: /apps/er/dr800plus/show_taskbar=false [v3]
  - statusbar
    . page bar, document pages thumbnails, fullscreen, continuous mode, and
      some great usability shortcuts in the statusbar (ported from DR1000) [v1]
    . statusbar: show a clock instead of "Menu" text [v2]
  - new "System Information" menu item: program that shows hardware information,
    monitor resources, list running process and even can kill them [v3]
  - add toolbar icons for FBReader [v3]
  - allow to add/remove icons from external apps, using new ipc calls:
    "addToolbarItem", "clearToolbarItem" [Mackx's patch] [v3]

+ ctb
  - books thumbnails are stored in file system instead of in global.db
    database as the other metadata. This makes database smaller and much
    faster browsing. Read `Thumbnails`_ section for more information [v4]
  - shortcuts
    . for docs, apps, folders... (ported from DR1000) [v1]
    . show books cover in shortcuts [v3]
    . use nicer "shortcuts view" icons [v3]
  - extra sorts: add Sort by Type and Sort by Size (ported from DR1000) [v1]
  - view details: additional listview for files (modified date column
                  has been removed to fit on the screen) (ported from DR1000)
                  [v1]
  - add a Recently Opened view [v3]
  - make number of items in recents views configurable in System/dr.ini,
    default: /apps/er/dr800plus/num_recent_items=15 [v3]
  - move Help view at end [v3]
  - mdbindex
    . indexing can be optionally disabled by an option in System/dr.ini,
      default: /apps/er/dr800plus/disable_indexing=false [v3]
    . configurable option in System/dr.ini to log indexing,
      logs go to file SD_card/mdbindex_(timestamp).log,
      default: /apps/er/dr800plus/log_indexing=false [v3]

+ uds
  - 12 pages in thumbnails view for pdf files [v3]

+ erbrowser
  - don't quit erbrowser when selecting another application or document
    in the taskbar (ported from DR1000) [v2]
  - fullscreen (ported from DR1000) [v2]

+ notepad
  - don't quit notepad when selecting another application or document
    in the taskbar. This allows us to have several notes open or to take
    notes while reading other documents (ported from DR1000) [v2]

Install or upgrade

VERY IMPORTANT NOTES:

Installation steps:

  1. Get the binary package from http://www.mobileread.com/forums/showthread.php?t=93627
  2. To install uncompress and copy contents to Programs folder on your DR800 SD card
  3. Remember to copy DR1000 UDS file as indicated above
  4. Then from your DR800, navigate to SD -> Programs and click on the DR800+ icon

To uninstall click on it again and follow the instructions.

This is how your SD card would look:

SD card
    /Programs
        ...
        _dr800+           (directory)
        ...
        DR800+.desktop    (file)
        ...
    /...

Getting DR1000 UDS binary

Sadly enough UDS binary is not open-source so we don't have the code and we can't distribute the file within our packages.

To extract DR1000 uds binary you need to do these steps on a Linux machine:

1. Go to IREX firmware update site, download the DR1000 firmware:
   http://updates.irexnet.com/beta/dr1000s/update-dr1000s-0629.zip

2. Follow the instructions at http://www.mobileread.com/forums/showthread.php?t=75946
   a. uncompress the .zip file
   b. get the file System/update/rootfs.bin
   c. as root, mount rootfs.bin::
      # modprobe jffs2
      # modprobe mtdram total_size=90000 erase_size=256
      # modprobe mtdchar
      # modprobe mtdblock
      # dd if=rootfs.bin of=/dev/mtdblock0
      # mount -t jffs2 /dev/mtdblock0 /mnt
   d. get the file in /mnt/usr/bin/uds

3. Another method, http://www.mobileread.com/forums/showpost.php?p=1045772&postcount=6
   "I ran into some problems with the mtdblock device. Many distributions
   limit the amount of memory allocatable to mtdram. That means out of the
   box your hack with the modprobe mtdram total_size=90000 erase_size=256
   will simply not work.

   I used the loopback mount method.

   A short description follows::

     # modprobe loop
     # modprobe mtdblock
     # modprobe block2mtd
     # losetup /dev/loop0 /path/to/rootfs.bin
     # echo "/dev/loop0,256KiB" > /sys/module/block2mtd/parameters/block2mtd
     # modprobe jffs2
     # mount -t jffs2 /dev/mtdblock0 /mnt

   You have now mounted the rootfs.bin on /mnt via loopback. Obviously the
   mountpoint /mnt must exist and the /mtdblock device number can be found with::

     # ls /dev/mtdblock*

   and that's it."

Customization

There are a few options you can modify to customize DR800+ behaviour.

To modify these settings you have to edit the System/dr.ini file on your SD card and then reboot the device. There is no graphical application by now.

The list of customizable options:

Thumbnails

Since version 4, DR800+ doesn't use global.db database to store thumbnails. Now it saves image files in <SD_card>/System/.covers/{size}/{xx}/{file_id}.png where:

Thus, global.db file is much smaller and browsing is much faster.

There is also a tool migrate-thumbs to move thumbnails from/to global.db database to/from file system. It is used by the installer to move the thumbs to the proper storage depending on the firmware version.

This program makes backup of the database and covers folder when migrating the thumbnails, and doesn't continue if it finds a previous backup to avoid losing the images in case of a problem.

It can also be used independently, for testing purposes, etc.

Note that old notes thumbnails are not migrated (they need to be opened and closed again), but new notes get their thumbnail correctly.

Issues and bugs

Building instructions

Note you don't need to do this to use DR800+, as it is distributed as binary package for your device. These instructiones are for intrepid people who wants to get their hands dirty and play with the code.

First, you need a working DR cross compiling development enviroment. I won't explain how to do it, as IREX provided a good document.

Each of the improved binaries could be built with these instructions:

$ source /usr/local/poky/eabi-glibc/arm/environment-setup
$ autoreconf -i --force
$ intltoolize

To build a valid binary for DR800 with advanced features:

$ export MACHINE_NAME=dr800s  # or dr800sw or dr800sg
$ ./configure --host=arm-poky-linux-gnueabi --prefix=/usr --sysconfdir=/etc --enable-epaper --enable-dr800plus

Then before running make you can customize the compilation editing some special flags in the config.h file. Note you should leave all options as they are to build all the features.

And then:

$ make

You can find the binaries under the src directory.

Note that since v4 in order to build ctb you must build ermetadb first and copy a couple of files to the proper locations in your building machine:

About the UI installer

The nice UI installer used in DR800+ is somehow special.

Coded by me in Vala language is a flexible and generic application installer for DR devices.

The main page will show the application description with an optional image and some actions to do. Each action run a different script (or the same script with different arguments).

If the script does not write anything to stdout or stderr, it means it was ok, so a new window with a feedback message and the option to finish or reboot is shown.

In case there is something, it is treated as an error so a new window will display the error message and a button to quit the installer.

To package a new program you need:

  1. copy the UI installer under the name you like
  2. write a resource.xml file with your settings
  3. write the un/install code as a shell script.
  4. optionally, add a logo image
  5. edit the installer desktop file to call this UI installer

resources.xml file format

This is a XML file with next structure:

  • title: installer header
  • description: text to be shown on main screen. Note in case you want to use tags (like <b>, <i>, etc) you should change some characters by the equivalent HTML entities, f.e. &lt; for <, &gt; for > and so on
  • logo_file (optional): path to the image file to be shown in main screen

Then the actions, a list of action containing:

  • ui_label: option text to be shown in the UI, f.e. "Install DR800+ (does a backup first if needed)"
  • message: action text to be used in error messages, f.e. "installing enhanced DR800+"
  • command: command to be run when this action is selected, f.e. "dr800+-install.sh --install"

ChangeLog

Changes v4:
-----------
* ctb, ermetadb
  - books thumbnails are stored in file system instead of in global.db
    database, this makes database smaller and much faster browsing
  - new "migrate-thumbs" tool to move thumbs from global.db to
    <sd_card>/System/.covers and vice versa
  - settings icons are loaded from /usr/share/ctb/settings now
* popupmenu
  - fixed bug: pressreader makes popupmenu crash
* general
  - installer shows progress now

Changes v3:
-----------
* general
  - nice installer
  - faster: compiled with optimizations for the CPU of the DR800
    "-mcpu=arm1136jf-s -mtune=arm1136jf-s -O3 -funroll-loops"
  - modify IREX default gtk+ theme style: make scrollbars narrower
* popupmenu
  - taskbar
    . add active task-list in menu, to allow natigation without stylus
      [from Mackx's work]
    . add a menu item to toggle taskbar visibility
    . make taskbar visibility at start configurable in System/dr.ini,
      default: /apps/er/dr800plus/show_taskbar=false
    . don't update clock when notepad is active [Mackx's patch]
  - new "System Information" menu item: program that shows hardware information,
    monitor resources, list running process and even can kill them
  - add toolbar icons for FBReader
  - new API ipc calls to add/remove icons from external apps
    "addToolbarItem", "clearToolbarItem" [Mackx's patch]
* ctb
  - shortcuts
    . show books cover in shortcuts
    . use nicer "shortcuts view" icons
  - add a Recently Opened view
  - make number of items in recents views configurable in System/dr.ini,
    default: /apps/er/dr800plus/num_recent_items=15
  - move Help view at end
  - mdbindex
    . indexing can be optionally disabled by an option in System/dr.ini,
      default: /apps/er/dr800plus/disable_indexing=false
    . configurable option in System/dr.ini to log indexing,
      logs go to file SD_card/mdbindex_(timestamp).log,
      default: /apps/er/dr800plus/log_indexing=false
* uds
  - 12 pages in thumbnails view for pdf files

Changes v2b:
------------
* popupmenu
  - statusbar: fixed excessive battery drain problem

Changes v2:
-----------
* popupmenu
  - statusbar: show a clock instead of "Menu" text
* erbrowser
  - don't quit erbrowser when selecting another application or document
    in the taskbar (ported from DR1000)
  - fullscreen (ported from DR1000)
* notepad
  - don't quit notepad when selecting another application or document
    in the taskbar. This allows us to have several notes open or
    to take notes while reading other documents (ported from DR1000)

Changes v1:
-----------
* popupmenu
  - taskbar: open several docs/apps simultaneously (ported from DR1000)
  - statusbar: page bar, document pages thumbnails, fullscreen, continuous
               mode and some great usability shortcuts in the statusbar
               (ported from DR1000)
* ctb
  - shortcuts: for docs, apps, folders... (ported from DR1000)
  - extra sorts: add Sort by Type and Sort by Size (ported from DR1000)
  - view details: additional listview for files (modified date column
                  has been removed to fit on the screen) (ported from DR1000)

Final words

I'm due to thank many people like Mackx, CoolDragon, Gertjan, Yuri, and all the persons in IREX/IRX that built this marvellous device and made it open.

Thanks also to all the guys at MobileRead.