Introduction: Setting Up Octoprint Web Interface for 3d Printer on Cubietruck

Picture of Setting Up Octoprint Web Interface for 3d Printer on Cubietruck

It would be interesting to be able to manage your 3d printer without having a cable attached to your PC. Most people have tried it out using raspberry pi. Initially, I bought this bought for some other projects but it has been lying around for quite sometime. This board has 2 USB 2.0, VGA, HDMI, RS232, ethernet, SATA, SPDIF and some GPIO ports. So, I thought why not try out the Octoprint. Let's get started.

Step 1: Step 1: Setting Up Cubietruck

The cubietruck is a dual core ARM board by default the wifi is disabled. If you are using the ethernet instead, the wifi setup is optional. In order to perform the setup, you need a monitor and a keyboard. The cubietruck supports both VGA and HDMI. However, these options are done when selecting the image for this board.


1. Login to lubuntu: linaro/linaro

2. add bcmdhd to /etc/modules (need to reboot)

3. Add nameserver to /etc/resolv.conf ( without this, the system will be connected to the wifi but no internet access)

4. Reboot

Step 2: Step 2: Adding External Harddisk

The image is loaded into the internal NAND RAM. To speed things up and add more space to the system, I have connected a 2.5" harddisk to the SATA port on-board. The system files can be moved to the harddisk by performing the following steps:

Moving the rootfs to harddisk:

1. sudo su - root --> change to root user

2. mkdir /tmp/1 /tmp/target

3. mount /dev/nandb /tmp/1

4.fdisk -l -> to locate your drive, sda? sdb?

5.fdisk /dev/sda

4. mkfs.ext4 /dev/sda1

5. mount /dev/sda1 /tmp/target

6. (cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv

7. mount /dev/nanda /mnt/

8. vi /mnt/uEnv.txt (Change root=/dev/sda1)

9. sync

10. umount /mnt

11. reboot

Step 3: Step 3: Installing Octoprint

Install subversion at get pyserial for the Ramps 1.4 to connect with Cubietruck:

1. sudo apt-get install subversion

2. svn checkout svn:// pyserial-code cd pyserial-code cd pyserial python build sudo python install

Install Python related packages and clone the Octoprint devel source for the latest development.

1. cd ~

2. sudo apt-get install python-pip python-dev git git clone

3. cd OctoPrint

4. git pull git checkout devel sudo python install

After that, ./run to run the Octoprint server. It will be hosted in locally on the Cubietruck. You can also access it through other devices by replacing the with the Cubietruck IP.

Step 4: Step 4: Adding Webcam

Additionally, you can also add webcam to stream the video of the print. Install the related packages and clone mjpg-streamer:

1. cd ~

2. sudo apt-get install subversion libjpeg8-dev imagemagick libav-tools cmake

3. git clone

4. cd mjpg-streamer/mjpg-streamer-experimental


To test out the video stream: ./mjpg_streamer -i "./ -y" -o "./ -w ./www" You should be able to get the life feed from your USB webcam using port 8080 with the Cubietruck IP or locally in Cubietruck.

Step 5: Finally: Attach Your Printer to Cubietruck Usb

Picture of Finally: Attach Your Printer to Cubietruck Usb

Now your printer can be access locally through the web interface.


DanielW313 (author)2017-02-28

Got a Problem i can´t solve. everything is fine until sthe installation of octoprint. there i got an error Processing netaddr-0.7.19.tar.gz

Writing /tmp/easy_install-ENjJvA/netaddr-0.7.19/setup.cfg
Running netaddr-0.7.19/ -q bdist_egg --dist-dir /tmp/easy_install-ENjJvA/netaddr-0.7.19/egg-dist-tmp-VXnJfn
warning: no files found matching ''
error: Setup script exited with error: No space left on device

but there is about 118GB space free

zhenning (author)DanielW3132017-03-01

Did you run in normal user or sudo mode? One problem could be your root is full.

DanielW313 (author)zhenning2017-03-01

All done. Prolem was a size of /tmp about 20mb. And another way like the tutorial:

01.) Login to lubuntu: linaro/linaro

02.) sudo vi /etc/modules (add bcmdhd)

03.) sudo vi /etc/resolv.conf (Add nameserver

04. sudo vi /etc/apt/sources.list

change to deb raring main universe

deb-src raring main universe

05.) sudo vi /etc/fstab (change the size to about 200mb)

06.) Reboot

07.) sudo apt-get update

08.) sudo apt-get upgrade

09.) sudo su - root

10.) mkdir /tmp/1 /tmp/target

11.) mount /dev/nandb /tmp/1

12.) fdisk -l

13.) mkfs.ext4 /dev/sda1

14.) mount /dev/sda1 /tmp/target

15.) (cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv

16.) mount /dev/nanda /mnt/

17.) vi /mnt/uEnv.txt (Change root=/dev/sda1)

18.) sync

19.) umount /mnt

20.) reboot

21.) sudo apt-get install python-pip python-dev git

22.) sudo apt-get install subversion

23.) svn checkout svn:// pyserial-code

24.) cd pyserial-code/pyserial

25.) python build

26.) sudo python install

27.) cd ~

28.) git clone

29.) cd OctoPrint

30.) git pull git checkout devel sudo python install

31.) octoprint serve

DanielW313 (author)zhenning2017-03-01

done with sudo, sudo -i

jjpython (author)2017-02-15

awesome, many thanks

uzzi7862 (author)2015-05-21

Really amazing.You like literally developed a base platform. From here on you can add so much additional functionality which is limitless.Thank you for taking time to create this.You did a great Job

seamster (author)2014-10-30

Very nice. Thanks for sharing this tutorial, I think a lot of people will find it useful!

zhenning (author)seamster2014-10-30

Thanks for the compliment ;)

About This Instructable




More by zhenning:Historical building 3d lamp shadeSetting Up Octoprint web interface for 3d printer on CubietruckMulti 3d printer head carriage
Add instructable to: