buckket / kindle-abfahrt

Public transportation depatures for the Kindle Paperwhite
GNU General Public License v3.0
9 stars 1 forks source link
kindle public-transportation

kindle-abfahrt Build Status Go Report Card codecov GoDoc

kindle-abfahrt is a small Go program which fetches and displays departure information of public transportation services on a Kindle Paperwhite 3 (PW3). Currently it’s supporting the official API of the Verkehrsverbund Berlin-Brandenburg (VBB), which is basically the HAFAS ReST API by HaCon used by many more transportation authorities in Germany and Europe.

Note: This is just a quick hack which is specifically tailored to run on a PW3 and use the VBB API. Whilst it should be relatively easy to support other Kindle models (different screen resolutions) and add support for more data providers, this has not been implemented as of yet. Right now this is, if any, a starting point to develop one’s own information display.

You need to jailbroken/rooted Kindle for this to work. Check out: https://www.mobileread.com/forums/showthread.php?t=320564

Example of a Kindle PW3 running kindle-abfahrt

(The stand was designed with OpenSCAD and its source files can be found in the stand folder.)

Description

The Kindle Paperwhite 3 comes with an 800 MHz i.MX 6 SoloLite ARMv7 processor and thus is quite capable to execute all necessary tasks on its own. First it queries the data provider every n minutes to receive information about planned departures and then draws an in-memory image using the draw2d library. This image is converted to grayscale and exported as a PNG file. The Kindle comes with a system command (eips) to draw a given image file to the framebuffer. This command is called after exporting said PNG file. And that’s all there is to it.

The Kindle lasts about 24h on battery with a refresh rate of one minute. Keeping the charger attached is the recommended mode of operation.

Other Kindle models have different screen resolutions and thus need tweaking, as the screen layout is hardcoded right now.

At the moment the user has to take care of stopping and restarting the stock GUI and tweaking the system so that the Kindle stays powered on and does not draw over our screen. Take a look at the start script which is mentioned in the Notes section. It should give a rough idea of all the necessary steps.

A simple caching mechanism for the returned raw API data is implemented as well so that the number of API queries can be reduced while still updating the relative departure times with every refresh.

Installation

Usage

Notes

ToDo

License / Copyright