0012

Installing octoprint on an OpenWRT router

I have been using octoprint, a free and open-source web-based software that allows you to remotely control and monitor 3D printers, on my iBook G4. However, this did not seem too practical to me to have a large laptop next to my 3D printer, which sole purpose was to send controls to it . Because of this I was thinking about installing octoprint on a much less powerful device. I ended up installing it on a router, which runs OpenWRT. OpenWrt is a free and open-source operating system based on the Linux kernel that is specifically designed for embedded devices and provides a customizable and extensible platform that allows users to install and configure various applications. The installation was essentially realized in a few steps.

  1. Connect Wifi
  2. Install USB drivers
  3. Setup extroot
  4. Install libffi-dev libraries
  5. Install serial drivers
  6. Install Octoprint according to this link
  7. Setup automatic login, as login was too slow

In contrast to the installation steps provided in this link, octoprint now has a dependency on libffi. Unfortunately, the libffi headers are missing on OpenWRT, therefore additional steps are needed.

First, the headers have to be downloaded. For this, I downloaded the package for the according cpu architecture from the debian repositories, extracted the headers and installed the headers using the following script, found here. Mind, that you may have to adjust the ffi.so version in that script.

#!/bin/sh
echo -e "\033[32m Install C library......libffi \033[0m"
mkdir -p /usr/include/ffi && \
cp ./ffi/ffi* /usr/include/ffi && \
ln -s /usr/lib/libffi.so.8.1.0 /usr/lib/libffi.so

At last, I had to setup automatic login, as somehow I was not able to do the initial login. I suspect that calculation of secrets were way too slow on that device such that it messes up the login process.

Next Post Previous Post