A clock for e-ink displays like that in the Kindle DX Graphite.
- Raspberry Pi Zero W or other device of your choice with networking capabilities
- jailbroken Kindle with usbnetwork
First get the necessary dependencies
pacman -S cairo openssl libusb-compat zlib
Now build.
# May take a long time
cargo build --release
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
Check the parameters in src/main.rs
and tailor them to your situation. Reach out to me if you have questions.
If you cross-compiled, transfer the project folder to the device.
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
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.
- David Allen Sibley for his beautiful drawings of North American birds.