Part 8 - eInk Weirdness
- In Part One we talk about the hardware
- In Part Two, We got Ubuntu on your MicroSD card.
- In Part Three We get everything set up to my personal liking, but ymmv.
- In Part Four We get CoreDNS built
- In Part Five We deploy and configure CoreDNS
- In Part Six We add a few odds & ends to make the host more durable
- In Part Seven We add the bits for the eInk display
PaperTTY1 is a nifty python tool to display a console TTY on an eInk display. Here we’ll walk through setting it up to give us an easily viewable status indicator
I wanted some mechanism of easily assessing the health of the DNS hosts…
I didn’t want to spend too much time on it, but I wanted it to be robust enough that it would ‘just work’ consistently.
I ended up trying a few different tools, but ended up landing on a combination of PaperTTY and DNSTop. There are definitely other ways to achieve this goal, and I will likely play with others later..
…This works well for the moment.
- PaperTTY
- Get the necessary dependencies for PaperTTY set up
- Clone the repo
- setup papertty
- test that it actually works with THIS eink display.
- install some fonts
- and make it start at boot on a specified vty.
- DNSTOP
- Install it
- get it running properly automagically
apt-get install libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev \
libopenjp2-7 libtiff5 python3-pip python3-pip-whl \
python3-setuptools-whl python3-venv python3.10-venv \
python3-rgpio python3-rpi.gpio rpi.gpio-common \
rgpio-tools librgpio1
Poetry is a packaging and dependency management toolchain for Python.
I do not advocate running random shit on the internet piped into an interpreter sight unseen.
I STRONGLY encourage you to look at the script (found here) before running the install one-liner below:
root@coredns-03:~# git clone https://github.com/joukos/PaperTTY.git
Cloning into 'PaperTTY'...
remote: Enumerating objects: 801, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 801 (delta 13), reused 20 (delta 8), pack-reused 772
Receiving objects: 100% (801/801), 7.00 MiB | 13.36 MiB/s, done.
Resolving deltas: 100% (497/497), done.
root@coredns-03:~#
root@coredns-03:~# cd ~/PaperTTY && poetry install
root@coredns-03:~# cd ~/PaperTTY && poetry install
Creating virtualenv papertty-uSU0pReX-py3.10 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (163.6s)
Writing lock file
Package operations: 1 install, 9 updates, 0 removals
β’ Updating attrs (19.3.0 -> 22.1.0)
β’ Updating idna (2.9 -> 3.4)
β’ Updating setuptools (65.3.0 -> 50.3.2)
β’ Updating six (1.15.0 -> 1.16.0)
β’ Updating hyperlink (19.0.0 -> 21.0.0)
β’ Updating incremental (17.5.0 -> 21.3.0)
β’ Updating pyhamcrest (2.0.2 -> 2.0.3)
β’ Updating zope-interface (5.1.0 -> 5.4.0)
β’ Installing rpi-gpio (0.7.1)
β’ Updating spidev (3.4 -> 3.5)
Installing the current project: papertty (0.1.8b)
According to [WaveShare’s guidance][waveshare-docs] [^waveshare-docs^], the following are necessary:
- The latest version of [libbcm2835][lib-bcm2835-site][^libbcm2835site^] here’s a link to the [src tarball][lib-bcm2835-tarball][^libbcm2835tarball^],
- The version of WiringPi [specifically from this repo.][wiringpi-repo][^wiringpi-repo^]
I don’t think this was strictly necessary though. In fact, I’m fairly certain this was a red herring. Nevertheless this was the install process.. it’s useful so as to be able to ascertain if the problem is papertty or the eink display / pi
CopyPasta:
cd /usr/src && \
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz && \
tar xzvf bcm2835-1.71.tar.gz && \
cd /usr/src/bcm2835-1.71 && \
./configure && make && make install && \
ls -la /usr/local/lib/libbcm2835.a /usr/local/include/bcm2835.h
Acutally running the commands:
root@coredns-03:~# cd /usr/src
root@coredns-03:/usr/src# wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
root@coredns-03:/usr/src# tar xzvf bcm2835-1.71.tar.gz
root@coredns-03:/usr/src# cd bcm2835-1.71/
root@coredns-03:/usr/src/bcm2835-1.71# ./configure && make && make install
Inspect them for good measure:
root@coredns-03:/usr/src/bcm2835-1.71# ls -la /usr/local/lib/libbcm2835.a /usr/local/include/bcm2835.h
-rw-r--r-- 1 root root 430648 Sep 18 23:21 /usr/local/lib/libbcm2835.a
-rw-r--r-- 1 root root 105329 Sep 18 23:21 /usr/local/include/bcm2835.h
Copypasta:
cd /usr/src && git clone https://github.com/WiringPi/WiringPi.git && cd WiringPi && /usr/src/WiringPi/build
root@coredns-03:/usr/src# cd /usr/src && git clone https://github.com/WiringPi/WiringPi.git
Cloning into 'WiringPi'...
remote: Enumerating objects: 1730, done.
remote: Counting objects: 100% (613/613), done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 1730 (delta 554), reused 501 (delta 501), pack-reused 1117
Receiving objects: 100% (1730/1730), 802.92 KiB | 3.72 MiB/s, done.
Resolving deltas: 100% (1186/1186), done.
root@coredns-03:/usr/src# cd WiringPi && /usr/src/WiringPi/build
...
TBD
oepn files network buffers calomel tips
apt-get install bwm-ng libconfig9 libfreetype-dev libio-pty-perl libipc-run-perl libpng-dev libpng-tools libsnmp-base libsnmp40 libtime-duration-perl libtimedate-perl lldpad lldpd moreutils nfs-common prometheus-node-exporter prometheus-node-exporter-collectors python-is-python3 python3-pip smartmontools snmp snmp-mibs-downloader sockperf spi-tools
https://wtfutil.com https://github.com/wtfutil/wtf.git