From RepRap
Jump to: navigation, search
Crystal Clear action run.png

Release status: working

Octogoatbox hardware TV Box 1a.jpg
Dual core ARM Cortex-A7 OctoPrint Server
CAD Models
External Link

About the OctoGoatBox

Basically, the OctoGoatBox is a dual core Allwinner A20 Android TV Box running a derivative of Debian Wheezy and one or two instances of OctoPrint by Gina Häußge. We are going to repurpose the generic mass-manufactured Android TV Box hardware into a small Linux server running OctoPrint by booting a custom version of Debian Wheezy with a custom Linux kernel from an SD card. And we'll connect this diminutive OctoPrint server to our LAN either through WiFi or through Ethernet.

This is what the OctoGoatBox looks like when printing, and accessed through WiFi on a web browser:

Screenshot OctoPrint.jpg

Hardware requirements

  • Allwinner A20 Android TV Box with 1GB RAM (check the Discussion tab for recommendations).
  • 8GB (or larger) SD Card or microSD card with adapter, class 10.
  • (Optional) Inexpensive webcam to make timelapses of or simply monitor our 3D prints.

It is assumed that your work environment includes a local network with an accessible WiFi/Ethernet router. The OctoGoatBox first needs to be connected to the Ethernet network and then we can configure its WiFi interface.

Choice of Linux distribution

We are going to use Bananian, which is Debian Wheezy armhf with a significant amount of customization for A20 hardware. I also tried Linaro/Ubuntu 14.04 armhf, it works but requires more customization and is much higher maintenance than Debian / Bananian.

Webcam support

In theory just about any webcam with a Linux driver would work here. In practice the choice boils down to two options:

  • If you need high-quality video you need a webcam with compressed MJPEG video format support. These are a little bit more expensive.
  • If you only need 320x240 video support (for e.g. monitoring your prints and eventually posting a couple of timelapses on YouTube), an inexpensive (about $5) webcam with basic YUYV video format support will do OK.

Check the Discussion tab for recommendations.


Important: this HOWTO expects you to have a more than basic grasp of the Linux command line. You will be required to SSH into a headless Linux server and to find out the DHCP address of the OctoGoatBox from your local LAN router/DCHP server. If you are not familiar with these actions it is recommended that you either get a more knowledgeable person to help you, or give up on setting up an OctoGoatBox for the moment. A more detailed, hand-holding style guide will possibly be available at a later date.

Generic instructions:

1. Download Bananian. https://www.bananian.org/download

2. Follow installation instructions to flash SD card.

3. It should boot right up (green light blinks) and get a DHCP address from your LAN router if connected with an Ethernet cable. SSH into it, user/password root/pi. Change root password.

4. Next apt-get install mc, usbutils, wireless-tools, wpasupplicant, build-essential and any other packages your life depends on.

5. Fix /etc/environment and /etc/default/locale to avoid stupid messages about LC_ALL not set, etc

6. Add user pi with password raspberry

7. Git clone and install development branch of OctoPrint as explained in GitHub wiki following exactly the same instructions as for OctoPrint Raspbian installation.

8. Insert USB WiFi dongle and check that it is correctly detected and driver loads (dmesg, lsusb, lsmod). Your Android TV Box almost certainly already has an internal WiFi interface so you can just check what driver it is using.

9. Edit /etc/network/interfaces so Banana Pi connects through WiFi interface by default.

10. Configure Wifi router so Banana Pi gets same local IP address every time.

Note that OctoPrint seems to somehow hog the i/o on the Banana Pi until it is properly configured and is connected to a 3D printer through the USB serial interface, for some unknown (to me, at least) reason. I am guessing there is a timeout somewhere in the OctoPrint code that has to kick in and then everything works fine... just be patient.

Example 1 : Banana Pi running OctoPrint, inexpensive webcam

Banana Pi, WiFi dongle, SD card and Octogoat.

This combination works more or less out of the box. The WiFi dongle is a TP-Link TL-WN725N V2 which has a Realtek RTL8188EU chip that is supported by its specific driver in the Linux kernel, but most other USB WiFi dongles work just as well.

Power supply (5V@2A) and inexpensive 640x480 USB webcam.

The power supply is a generic 5V @ 2A wall power brick with a mini-USB connector. The inexpensive 640x480 USB webcam is directly recognized by the Linux uvc driver and provides low-quality uncompressed (YUYV) video at 320x240 - good enough for monitoring your prints and the occasional timelapse upload to YouTube.

Example 2 : Generic Allwinner A20 Android TV Box running 2 instances of OctoPrint, Logitech webcam

The advantage of the Android TV Box is that it includes an internal WiFi interface and you get a case and a power supply included (as well as an infrared remote and an HDMI cable, both of which we are not going to use) for more or less the same price as a "naked" Banana Pi.

Android TV Box assimilated by OctoGoat and converted to OctoGoatBox.

The more expensive USB webcam outputs a high-quality compressed MJPEG video stream which is directly relayed to the network interface by our mjpeg-streamer daemon. This results in low CPU load (usually < 5%).

The two instances of OctoPrint allow the control of two 3D printers printing simultaneously, driven by the OctoGoatBox.