Setting Up Octoprint Web Interface for 3d Printer on Cubietruck

2,785

13

8

Posted in Technology3D-Printing

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

Wifi:

1. Login to lubuntu: linaro/linaro

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

3. Add nameserver 8.8.8.8 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://svn.code.sf.net/p/pyserial/code/trunk pyserial-code cd pyserial-code cd pyserial python setup.py build sudo python setup.py 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 https://github.com/foosel/OctoPrint.git

3. cd OctoPrint

4. git pull git checkout devel sudo python setup.py install

After that, ./run to run the Octoprint server. It will be hosted in 0.0.0.0:5000 locally on the Cubietruck. You can also access it through other devices by replacing the 0.0.0.0 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 https://github.com/jacksonliam/mjpg-streamer.git

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

5.make

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

Step 5: Finally: Attach Your Printer to Cubietruck Usb

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

Share

    Recommendations

    • Spotless Contest

      Spotless Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Space Challenge

      Space Challenge
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    8 Comments

    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/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ENjJvA/netaddr-0.7.19/egg-dist-tmp-VXnJfn
    warning: no files found matching 'release.py'
    error: Setup script exited with error: No space left on device

    but there is about 118GB space free

    3 replies

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

    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 8.8.8.8)

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

    change to deb http://old-releases.ubuntu.com/ubuntu/ raring main universe

    deb-src http://old-releases.ubuntu.com/ubuntu/ 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://svn.code.sf.net/p/pyserial/code/trunk pyserial-code

    24.) cd pyserial-code/pyserial

    25.) python setup.py build

    26.) sudo python setup.py install

    27.) cd ~

    28.) git clone https://github.com/foosel/OctoPrint.git

    29.) cd OctoPrint

    30.) git pull git checkout devel sudo python setup.py install

    31.) octoprint serve

    awesome, many thanks

    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

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

    1 reply

    Thanks for the compliment ;)