https://github.com/sameer/eink-clock
https://github.com/sameer/eink-clock
clock eink-clock kindle kindle-networking raspberry-pi raspberry-pi-zero-w rust ssh
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sameer/eink-clock
- Owner: sameer
- License: other
- Created: 2020-06-06T20:12:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-18T17:00:22.000Z (over 4 years ago)
- Last Synced: 2025-04-02T11:54:18.886Z (11 months ago)
- Topics: clock, eink-clock, kindle, kindle-networking, raspberry-pi, raspberry-pi-zero-w, rust, ssh
- Language: Rust
- Size: 24.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# eink-clock
A clock for e-ink displays like that in the [Kindle DX Graphite](https://en.wikipedia.org/wiki/Amazon_Kindle#Kindle_DX_Graphite).

## Setup
### Physical requirements
* Raspberry Pi Zero W or other device of your choice with networking capabilities
* [jailbroken Kindle](https://wiki.mobileread.com/wiki/Kindle_Hacks_Information#Jail_break_JB) with usbnetwork
### Software
#### Prerequisites
* [Rust Language](https://www.rust-lang.org/learn/get-started) and [Cargo package manager](https://doc.rust-lang.org/cargo/index.html)
#### Building
##### Install directly on an ARM device (easier but takes longer)
First get the necessary dependencies
###### ArchLinux
```bash
pacman -S cairo openssl libusb-compat zlib
```
Now build.
```bash
# 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](https://aur.archlinux.org/packages/arm-linux-gnueabihf-gcc/).
If you have yay or other makepkg utilities, you will have to install it manually.
Build
```bash
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:
```bash
ssh root@192.168.2.2
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
```bash
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](https://purisa.me/about/) if you have problems.
## Special Thanks
* [David Allen Sibley](https://en.wikipedia.org/wiki/David_Allen_Sibley) for his beautiful drawings of North American birds.