Skip to content

sameer/eink-clock

Repository files navigation

eink-clock

A clock for e-ink displays like that in the Kindle DX Graphite.

Demo of display

Setup

Physical requirements

  • Raspberry Pi Zero W or other device of your choice with networking capabilities
  • jailbroken Kindle with usbnetwork

Software

Prerequisites

Building

Install directly on an ARM device (easier but takes longer)

First get the necessary dependencies

ArchLinux
pacman -S cairo openssl libusb-compat zlib

Now build.

# May take a long time
cargo build --release
Build on your computer (cross-compile, harder but takes less time)
ArchLinux

Get the cross-compile toolchain: arm-linux-gnueabihf-gcc. If you have yay or other makepkg utilities, you will have to install it manually.

Build

PKG_CONFIG_SYSROOT_DIR=/usr/arm-linux-gnueabihf/ PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target arm-unknown-linux-gnueabihf

Configuration

Check the parameters in src/main.rs and tailor them to your situation. Reach out to me if you have questions.

Deploying

If you cross-compiled, transfer the project folder to the device.

Set up Kindle networking

eink-clock will automatically connect to a Kindle that has usbnetwork enabled and shows up as usb0 in ip addr.

If you are connecting multiple Kindles, you'll need to change the usbnetwork config to assign unique MAC addresses and unique IP addresses.

On the Kindle, make sure you've enabled auto-start for usbnetwork just in case the Kindle loses power:

ssh [email protected]
ls /mnt/us/usbnet/
# If there is a DISABLED_auto file, rename it to auto
# Beware that this means networking will always be enabled at startup
# You cannot connect the Kindle as a USB storage device again until you rename auto to DISABLED_auto
mv /mnt/us/usbnet/DISABLED_auto /mnt/us/usbnet/auto
Set up systemd service file

This needed to run eink-clock at startup

ln -s /root/eink-clock/eink-clock.service /etc/systemd/system/
systemctl enable eink-clock.service
systemctl start eink-clock.service

And that's it, the clock should now be running! Feel free to contact me if you have problems.

Special Thanks