The BookBox : A localized, portable ebook delivery system using open-source components

Ebooks are becoming an essential part of library services. Most library eBooks are delivered through third party vendors encumbered by DRM and access controls. Open and out of copyright ebooks provide a large library of books and articles that Librarians and information professionals can experiment with and provide to their patrons.

This post shows how librarians can use cast-off technology to create a localized ebook  delivery system to deliver ebooks over a Wifi connection. The system described in this post can be put together with a wide variety of hardware, much of which can be re-purposed from obsolete components. This system can also be powered by battery power to deliver a large number of electronic texts to school rooms, agricultural centers or higher educational institutions even in areas without consistent electrical power.

Components of the system.

  1.  A computer that can run the Debian operating system. Old laptops, old desktops, plug computers and even NAS devices like the PogoPlug can be used as the computing platform.
  2.  A Router capable of running  the DD-WRT open source firmware
  3.  A USB drive or flash memory key ( if computer doesn’t have memory like the PogoPlug)
  4.  (optional) A battery pack
  5.  (optional) An enclosure to hold the system.

For my example build I used a Seagate FreeAgent DockStar as the base computer and a Asus WL – 330GE as the router. My example build fits in a standard metal lunch box, including a battery pack. My example build cost ~$100 US.

Plug the computer into a router with an ethernet cable.

Install Debian on the computer platform. Debian can be downloaded from

In my example build, I used a Seagate DockStar FreeAgent NAS device and installed Debian from the version maintained by Jeff Doozan. His instructions for installing Debian on the Dockstar are found at

If using the DockStar as I did in my example build, David Dart’s guide to creating the ‘PirateBox’ can give you additional valuable advice on mounting partitions on your drive or USB memory key.

Install the Monkey webserver software on your project computer.
The Monkey webserver is an extremely simple webserver with minimal configuration required. You can install monkey using the apt program manager by issuing the command

sudo apt-get install monkey

All of the monkey configuration files are found in conf/ directory.
Open monkey.conf in nano by issuing the command

sudo nano monkey.conf

In monkey.conf, ensure that monkey is listening on port 80, and note the location of the HTTP directory. If necessary, you can change the location of the HTTP directory. This is the location where we’ll be uploading the ebook files.

Save the monkey.conf file.

To test, create an index.html file with ‘Hello World’. Open the IP address that your router has given the computer like this http://%5BIP Address]:[Port Number].

On another computer, use the Calibre software ( ) to create an ebook library from the source of your choice. Calibre is a powerful tool for organizing, editing, creating and distributing eBooks. Sources for your library include the Project Gutenberg books, open access books from the Internet Archive, or a project like TEEAL Using Calibre you can add metadata, download covers and other details from and the Internet Archive.

Once your Calibre library is created, you can use a companion program called Calibre2odps to create a set of static HTML pages.

This set of static HTML pages can be uploaded to any webserver, in any location.

Copy the complete Calibre2odps library over to the HTTP directory of your Debian webserver.

Your webserver can now be plugged into any network connection, and will serve up the complete catalog in HTML and ODPS formats on port 80.

I created a simple index.html landing page pointing to both the catalog.html and catalog.xml files. This is the default landing page.

To create a standalone system, use an old router capable of running the DDWRT open source firmware. You can find a list of compatible routers by visiting

Install DDWRT according to the directions for your particular model. For my project I used the Asus WL330GE because it can be powered by a USB cable.

Once DDWRT is installed, you can change the SSID to something more appropriate, I suggest ‘Bookbox’

Plug the DDWRT router into your computer platform, turn everything on and connect to your ‘Bookbox’ wireless network.

The goal of this setup is to force all traffic to visit index.html when they connect to the network.

Point your browser to to visit the control interface for the router.  Go to Status > LAN and write down the IP address that has been assigned to the computer by the router. This may take a while.

Next, go to Services > Services  and set the DNSMasq and Local DNS buttons to Enable. In the “Additional DNSMasq Options” add the following

address=/#/ (enter the IP address you wrote down)

Click Save.

Go to Services > Hotspot tab and click Enable beside HTTP Redirect.

Enter the following items

HTTP Destination IP: (Your server’s IP Address)

HTTP Destination Port: 80

HTTP Source Network: (the “0” denotes the whole range of IP addresses under this address)

Click Save, then go to the Administration > Management tab and click the Reboot Router button at the bottom of the page. Wait for the router to reboot and enter any address in the address bar of your browser. You should now be redirected to the index.html landing page .

If you connect to the Bookbox wireless network with a ODPS compatible ebook reader you can browse a catalog of ebooks within the ereader.

If this system has been put together with a plug computer, or using one of the systems that David Darts prototyped with his Piratebox systems, you should be able to power the entire system using a consumer laptop external battery pack. The DockStar or Pogoplug systems are particularly easy to power as their extra USB ports can easily provide power to the router over USB. The entire system, when set up using the DockStar and the Asus WL330GE  can be fit into a standard tin lunchbox, including a fairly large battery pack.

I have found that simpler web browsers, such as those found on e-readers actually handle this system better than the more complex Mobile Safari. From the feedback from David Darts project, it looks like Android phones seem to handle this connection quite well.



The Architecture of the Next Gen ILS

Marshall Breeding’s Systems Librarian column in the October 2010 edition of Computers in Libraries has been on my mind extensively recently. I’ve spent the last two years integrating our ILS with a hosted Aquabrowser instance and Summon and I was pretty surprised at the amount of ‘hacking’ that had to go on to make things work.

The primary method we are using in the Library world is MARC 21 export for these services. Why don’t these services support our existing search infrastructure of Z39.5?

Is this a speed issue? A caching issue? It just seems quite silly to depend on a frail script to upload large files on a regular basis when the infrastructure to support queries already exists and has been the standard for years.