Skip to main content
  1. Our Guides/
  2. CoreDNS @ Wolfspyre Labs/
  3. 🏗️ Setting Up CoreDNS/
  4. Pi4 Soup to nuts/

* eInk woes

🐾

Well…. hell. #

If you’re here, it means that something LIKELY didn’t quite go right when kicking off PaperTTY.

Lets see if we can help sort that out.

  • not even talking to the display

“Whomp Whomp ☹️” #

poetry run papertty --driver EPD2in13b scrub
gpiozero not found - defaulting to RPi.GPIO
Loading PIL font /usr/src/PaperTTY/papertty/resources/tom-thumb.pil. Font size is ignored.
Failed to init gpiozero spi device
  • is SPI enabled?
root@pi # ls /dev/*spi*
/dev/spidev0.0  /dev/spidev0.1
  • is i2c enabled?
root@gitlab-arm60-runner:/usr/src/PaperTTY# ls /dev/*i2c*
/dev/i2c-1
  • are the pins connected in the right places?
gpiozero found - using that instead of RPi.GPIO
Loading PIL font /usr/src/PaperTTY/papertty/resources/tom-thumb.pil. Font size is ignored.
/root/.cache/pypoetry/virtualenvs/papertty-LoWC4mRA-py3.12/lib/python3.12/site-packages/gpiozero/devices.py:300: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
  warnings.warn(

cat pyproject.toml [tool.poetry] name = “papertty” version = “0.1.8” description = “Python module to render a TTY or VNC on e-ink” authors = [“Jouko Strömmer jouko.strommer@iki.fi”] readme = “README.md” repository = “https://github.com/joukos/PaperTTY" homepage = “https://github.com/joukos/PaperTTY"

[tool.poetry.dependencies] click = “^8.1.7” Pillow = “10.4.0” python = “^3.10” gpiozero = “^2.0.1” lgpio = “^0.2.2.0” “RPi.GPIO” = “^0.7.1” spidev = “^3.6” vncdotool = “^1.2.0”

[tool.poetry.scripts] papertty = “papertty.papertty:cli”

[build-system] requires = [“poetry>=0.12”] build-backend = “poetry.masonry.api”





- noise

#### "W...T...F?"
If you're... Unlucky..  
!(../eink-garbage.jpg)

well... Lets see if we can't get you sorted.

There's a few different forks of PaperTTY. 
while I want to encourage y'all to use the upstream. [This fork][mcarr823fork] has a lot of useful fixes.

I've found that I can't use the red variants with the original codebase... and (as of now) the 2in13b driver doesn't work with my displays, the `d` variant does. (but only in black/white mode)
so... using that and moving on. 

- Testing in terminal mode
Some configs don't work so well in stdin mode, making it a hair challenging to eval 'is this thing on?'

fortunately:

root@gitlab-arm61-runner:/usr/src/mcarr923/PaperTTY# poetry run papertty –driver EPD2in13v2 –nopartial terminal –vcsa /dev/vcsa3 –font="/usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf” –size=9 –cols 46 –rows 11 –sleep 0.9 –cursor=none

loiosh@gitlab-arm61-runner:/home/loiosh# echo -e ‘123456789|123456789|123456789|123456789|123456\r\n02_456789|123456789|123456789|123456789|123456\r\n03_456789|123456789|123456789|123456789|123456\r\n04_456789|123456789|123456789|123456789|123456\r\n05_456789|123456789|123456789|123456789|123456\r\n06_456789|123456789|123456789|123456789|123456\r\n07_456789|123456789|123456789|123456789|123456\r\n08_456789|123456789|123456789|123456789|123456\r\n09_456789|123456789|123456789|123456789|123456\r\n10_456789|123456789|123456789|123456789|123456\r\n11_456789|123456789|123456789|123456789|123456’ > /dev/tty3


--size=6 --cols=70 --rows=16 (70x15)
--size=7 --cols=60 --rows=14 (60x13)
--size=8 --cols=51 --rows=11
9 - 46 x 12

### PaperTTY {#papertty}

#### Install Pre-Reqs{#deps}

##### Apt Packages{#packages}

```shell {linenos=false}
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 #

Poetry is a packaging and dependency management toolchain for Python.

Warning

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:

Install Poetry #
curl -sSL https://install.python-poetry.org | python3 -
Quickly test/validate Poetry’s functionality #
root@coredns-03:~# poetry --version
Poetry (version 1.2.1)

Clone the Repo #

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:~#

Build PaperTTY #

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)

Waveshare recommendations #

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

BCM2835 #

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
WiringPi #

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
...

sysctls #

TBD

oepn files network buffers calomel tips

Prometheus #

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

Extra Credit #

WTFUtil #

https://wtfutil.com https://github.com/wtfutil/wtf.git