OctoGoatBox

From RepRap
Revision as of 07:57, 8 January 2015 by AndrewBCN (talk | contribs)
Jump to: navigation, search
Crystal Clear action run.png
OctoGoatBox

Release status: working

Octogoatbox hardware TV Box 1a.jpg
Description
Dual core ARM Cortex-A7 OctoPrint Server
License
GPLV3
Author
Contributors
Based-on
[[]]
Categories
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. 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 small OctoPrint server to our LAN either through WiFi or through Ethernet.

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.

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.

HOWTO

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. 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). Your Android TV Box almost certainly already has an internal WiFi interface so you can just check what driver it is using.

9. Fix /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

Android TV Box assimilated by OctoGoat and converted to OctoGoatBox.