Tag Archives: allwinner

OctoPrint installation on Orange PI PC – Print Test File

After the OctoPrint server configuration

Printer settings

we set the connection parameters for the printer.

After connecting to the OctoPrint server with the octoprint user and password as password, we set up the printer connection

octoprint-connessione

With these settings it is possible to print a gcode file already generated with Cura or Slic3r

Cura

Slic3r

or upload a stl file on which the slice will be executed using the loaded cura profile and the CuraEngine on the Orange Pi PC system.

In the case where a stl file is imported, the slicing of the file is proposed

octoprint-sliceAt this point the file is ready for printing

octoprint-fileslicedOnce the printing is started, the progress and temperature can be checked

octoprint-progressbaras the layers that are being created

octoprint-sliceprogressIn this example, the basic settings were used to start the system for the first time.

For further information and configurations on OctoPrint refer to the software documentation

Octoprint Documentation

At the following link the supported printers are listed

Supported printers

OctoPrint installation on Orange PI PC – Printer Settings

After  defining the local hostname resolution

Local Hostname Resolution

at this point it is necessary to configure the printer.

WARNING: Use of the settings shown is at your own risk. We assume no responsibility if these settings cause malfunctions or breakage of the printer.

At the first access to OctoPrint, the basic parameters for managing the printer are requested. In our case, we connect the Orange PI PC to an Anet A8 3d printer via the USB port. At the first access to the address

http://3dprinter.local

 a configuration mask is shown

octoprint-accesspressing next we access the next screen where to define the user who manages the printer with his password

octoprint-accesscontrolWe press Keep Access Control; the next step is  the control of the Internet connection in which we disable the Connectivity Check

octoprint-accessconnectivityWe have to import our cura profile for Anet A8 and set  the path to the executable CuraEngine, compiled in the previous article

Octoprint Installation

octoprint-printerprofile

octoprint-curaengine

The imported profile must be generated by Cura 15.04.x or older. Below is the link to the various versions of the Cura software

Cura

We can now define the parameters of the printer, in our case Anet A8

octoprint-printer1We set the bed size and print volume

octoprint-printer2The speed of movement using the control panel is defined in the next step; we set up conservative parameters

octoprint-printer3Finally, we set the extruder parameters

octoprint-printer4

At the next screen we set the commands to be sent to Debian directly from OctoPrint; they are set as follows

octoprint-command

where in the password you must enter the password to run the root commands on Debian.


The folder in which Octoprint has been installed is inserted for the software update

octoprint-swupdateWe do not insert anything for the webcam

octoprint-webcamFinally, the configuration is completed with the Finish button.

octoprint-finishFor more OctoPrint settings and addons refer to the site

OctoPrint

In the next article we’ll print a test model

Print test file

OctoPrint installation on Orange PI PC – Local Hostname Resolution

After configuring haproxy for the use of content in http on the standard port

HAProxy Installation

we configure the Linux machine to publish the hostname on the network with the avahi daemon.

On Linux and OSX machines this service is natively visible, while for Windows systems it is necessary to install the Bonjour service

Bonjour application for windows

On the Orange PI PC the avahi daemon must be installed with the command

We change the name to which our 3D print server must match in the two files /etc/hosts and /etc/hostname

In our case the name orangepcpc has been changed to 3dprinter.

Restarting the linux box, the services are accessible  using the name 3dprinter.local.

avahiIn the next article we’ll show a printer configuration

Printer Settings

OctoPrint installation on Orange PI PC – HAProxy Installation

After the automatic start of OctoPrint configuration

OctoPrint Autostart

at this point we can set up the system to answer to the standard port of an Http server.

For this purpose we install and configure the HAProxy reverse proxy

HAproxy

Proceed to the installation

Edit the /etc/haproxy/haproxy.cfg file and add to the default the directives including also the use of webcam

Restart the proxy with the command

Restart the Orange PI. If everything is configured correctly, the 3D print server answers on port 80  of the Orange Pi PC ip address

http://ORANGEPIPC_IP

haproxyIt is possible to map the Octoprint service on port 5000 only to the loopback interface by editing the file ~/.octoprint/config.yaml

and adding the host reference under the server directive

Restart OctoPrint

Now the 5000 port is mapped only with the address 127.0.0.1.

In the next article, we’ll configure Linux to publish the hostname on the network so that it can be accessed through this reference without using the IP address

Local Hostname Resolution

OctoPrint installation on Orange PI PC – Autostart

After the installation of OctoPrint and CuraEngine in the previous article

OctoPrint Package Installation

we treat now the configuration of the 3d print server.

As first operation, we set up the automatic startup of OctoPrint.

Run the following commands

Edit the /etc/ defaults/octoprint file changing the pointing to the executable to start OctoPrint using vi

or nano

and edit the file from

to

taking into account also the different user being used.

Add the script to startup automatically OctoPrint

Start OctoPrint  with the command

Check that OctoPrint is active on port 5000 of the Orange PI PC by accessing the address

Rebooting the Orange PI PC, the OctoPrint server now starts automatically.

In the next article, Linux will be configured to connect to OctoPrint on the Http standard port, i.e. on  port 80

HAProxy Installation

OctoPrint installation on Orange PI PC – Python package installation

This article describes how to enable the Orange PI PC board to work as 3d printers network server.

A  software that provides this functionality is OctoPrint

OctoPrint

From the OctoPrint site we can download an image for Raspberry PI with the system already ready; in the case of the Orange PI PC we have  to install and configure OctoPrint on a Linux image.

You can also use a Linux image available for Orange PI PC and run the steps related to OctoPrint package installation, but you have to check the prerequisites for Octoprint python package installation.

We instead built for this article an image using the Armban scripts.

As a first step, prepare the micro sd card with an Armbian image. In the specific case, we’ll use a Debian Jessie image created using the Armbian script, as indicated on the link

Armbian building

and described also in a previous article

Building Armbian image for Orange PI PC

We followed these steps to build the Armbian image on Ubuntu Xenial 16.04; from  a Linux command shell

In the building options choose

armbianopipcfosWe selected the default kernel configuration

armbianopipckernelChoose an Orange PI PC board

armbianopipcboardWe used the mainline kernel

armbianopipcmlkerneland Debian Jessie as distribution

armbianopipcjessieWe built an image with desktop envinronment

armbianopipcjessiedeAfter this option, the script proceeds to the compilation. The generated image is Armbian_5.34_Orangepipc_Debian_jessie_next_4.13.12_desktop.img. This image can be downloaded from the link

Armbian image for Orange Pi PC

Start Armbian and create the user for the Jessie image; in this case we choose octoprint/password as user.

If necessary, reconfigure the keyboard with the command

and proceed to upgrade the system

If the system needs to be configured via a wireless connection, the connection must be active at startup. For this purpose in our case we used the Wicd daemon

Wicd Debian

Remove the network-manager package

This command uninstalls network-manager and network-manager-gnome.

Check that the wireless interface is not present in

/etc/network/interfaces

Proceed to Wicd installation

Check that the octoprint user is present in the netdev group

In our case it is already present, giving as a result

netdev-group

If not present, add it with the command

Start  wicd

Logon to the armbian graphic desktop and start the wireless configuration with the command

wicd-client

Configure and save the network connection from the graphical interface.

If you want the remote desktop follow the steps listed in the article

Remote desktop setup for Armbian on Orange PI PC

We can now install Octoprint. Follow the steps available at the link

OctoPrint installation on Linux

Install the prerequisites

Create under /opt the octoprint folder and assign the ownership  to octoprint

In a Linux shell command go to /opt/octoprint  folder and download the software

Run

Create the  .octoprint folder

Add  octoprint to the following groups  to manage the 3d printer using the USB port

Check  the correct installation by running the command

The OctoPrint server can be reached on port 5000 at the IP address of Orange PI PC

http://ipaddress:5000

octoprinttest

Install the Cura Engine at this point; place yourself in the octoprint user’s home and download the source package

Unpack the package

Go into  the unpacked folder

Run  the compilation with the command

The compiled software is located under the build folder

curaengineCreate the /opt /octoprint/cura folder and copy the CuraEngine file to this folder

The executable is now in the /opt/octoprint/cura folder and will be used later by OctoPrint.

In the next article we’ll treat how to configure OctoPrint’s automatic startup

OctoPrint Autostart

Libreelec8 addon building for Orange PI PC

In the article about the Libreelec8 build for Orange PI PC

Libreelec8 in OrangePI PC

we created the environment and compiled the Libreelec8 image for our development board. We integrate what it has been said in the previous article showing how to build  the Libreelec 8 addons for our Orange PI PC board.

Now we proceed to build some addons. The packages that you can build are available in the kodi-binary-addons folder as shown below

libreelec8 addonsand in the packages/addons folder

addons packages

We build the  pvr.iptvsimple addon running the following command from the /home/sviluppo/orangepi/libreelec/libreelec-8.0 folder

addon command

We build the proftpd addon, among those avaliable in the packages/addons  folder

The compiled addons are available in the following folder

addons

Here are the links to download some compiled addons

PVR addons

Service Addons

Libreelec8 in OrangePI PC

This article describes the steps that I ran to prepare a first version of Libreelec 8 in Orange PI PC cards and other H3 socs.

Starting from the Debian development envinronment, with its installed packages, already used for the compilation of OpenELEC 7

 Openelec compilation for Orange PI PC

we proceed to build an Libreelec 8 image.

We started as basis from the work done for Openelec 7 and Libreelec 7 available on the two github repositories

H3 Openelec 7 Github

H3 Libreelec 7 Github

Log in a unix command shell as user sviluppo; create a folder, libreelec , under orangepi folder and move into it

Clone the Libreelec8 github

The patches have been created for a specific version of the commit, so we align our github clone to that version

Download from the following link the patches, the H3 project and other stuff

H3 Libreelec 8

Unzip this file in /home/sviluppo/orangepi/libreelec

Run the following steps

1)Copy  to /home/sviluppo/orangepi/libreelec/libreelec-8.0/projects the folder

H3

2) Copy to /home/sviluppo/orangepi/libreelec/libreelec-8.0/packages/multimedia  the folders

cedarx
libmpeg2

3) Copy to /home/sviluppo/orangepi/libreelec/libreelec-8.0/packages/tools the folder

sunxi-tools

4) Copy to /home/sviluppo/orangepi/libreelec/libreelec-8.0/packages/sysutils  the folder

  sunxi-sys-utils

5) Copy to /home/sviluppo/orangepi/libreelec/libreelec-8.0/packages/graphics  the folder

sunxi-mali

6) Copy to /home/sviluppo/orangepi/libreelec/libreelec-8.0/packages/linux-drivers  the folder

mt7601u

7)  The following patches are available in /home/sviluppo/orangepi/libreelec/H3LE8/patches folder

linux.patch

image.patch

mkimage.patch

kodi.patch

libcec.patch

u-boot.patch

u-boot-release.patch

u-boot-update.patch

Patch the code from the /home/sviluppo/orangepi/libreelec folder running the following commands

Proceed to the image build for Orange PI PC from the folder /home/sviluppo/orangepi/libreelec/libreelec-8.0  running

At the end of the compilation in the /home/sviluppo/orangepi/libreelec/libreelec-8.0/target folder we find the files to install or update Libreelec 8

 At the link

Openelec 7 H3 FAQ

we find the boards we can build changing the SYSTEM parameter in the building command

SYSTEM=opi2
SYSTEM=opione
SYSTEM=opipc
SYSTEM=opiplus
SYSTEM=opilite
SYSTEM=opipcplus
SYSTEM=opiplus2e
SYSTEM=bpim2p
SYSTEM=bx2

This image is a first attempt to build Libreelec 8 for  H3  socs. The image was installed on Orange PI PC and the system worked well, but still bugs and malfunctions may occur.

Here is the built Libreelec 8 image for Orange PI PC

Orange PI PC Libreelec 8 Image

We tested this image on an Orange PI PC board.

Here are other images we did’t test on the devices

Orange Pi2 Libreelec 8 Image

Orange Pi Lite Libreelec 8 Image

Orange Pi One Libreelec 8 Image

Orange Pi PC Plus Libreelec 8 Image

Orange Pi Plus Libreelec 8 Image

Orange Pi Plus 2e Libreelec 8 Image

WARNING: The image installation on the device is at your own risk. We accept no responsibility if the installation leads to  malfunction or block of the device.

The following article shows how to build the addons

Libreelec 8 addon building for Orange PI PC

Openelec addon building for Orange PI PC

In the article about the OpenELEC build for Orange PI PC

Openelec building for Orange PI PC

we created the environment and compiled the OpenELEC image for our development board. We integrate what it has been said in the previous article showing how to build  the Openelec addons for our Orange PI PC board.

As stated in the linked article we have to open a shell command window in the  OPENELEC-OPIPC folder

Using the  graphical interface in Debian we can verify the availabilty of the official addons structure. To add the unofficial ones we have to run from the  OpenELEC-OPIPC folder

Now we proceed to build an official addon and an unofficial one. The packages that you can build ara available in the official folder as shown below

official Addonsand in the unofficial folder

unofficial Addons

We build the  official pvr.iptvsimple addon with the command

For the unofficial we build the p7zip module

The compiled addons are availablein the following folder

addons

In the case of errors in the compliation check the logs and proceed consequently. For example in the case of trasmission the system was not able to download the source package using the link in the package.mk file

To overcome this unexpected error we added another link to the package, i.e.  we  changed the package.mk file from

to

In this way, the transmission addon has been compiled correctly, always with the command

Building Armbian image for Orange PI PC

We treat now the bulding of the image Armbian for Orange PI PC. From the developer’s github

Armbian Github

we find the steps to do the task.

From the Armbian site

Building Armbian

the supported building envinronment is Ubuntu. In our test we use Ubuntu 16.04.1 LTS x86-64

Ubuntu

and our Debian 8.5 envinroment used for the other tasks described on this site. With Ubuntu the compile.sh script installs all the required packages to build the image.  On the Armbian web site we can find also various compilation options..

Using Debian 8.5 as host, we have to exectute some prerequisites tasks described below. In the case of issues execute the building on Ubuntu..

First we install the cross compilation envinronment in Debian

https://wiki.debian.org/CrossToolchains

We have to create the file  crosstools.list in /etc/apt/sources.list.d

Edit this file and add the line

Save the file and add the repository key using curl. We install the curl package

and add the key

Now we are ready to install the packages and architecture as listed below

At this point the procedure is the same on Ubuntu or Debian. We create a folder called armbian under orangepi folder in the home folder of the linux system; in our case the user is sviluppo

We clone the repository with the following command in a shell command window in the armbian folder

To build the image execute

When requested enter the root password and for our image select the options described below.

  • Full OS image

fullosimage

  • Orangepipc board

orangepipc

  • default kernel

defaultkernel

  • Debian stable image

debianstable

  • Image with desktop envinronment

debiande

We find the image under the folder output/images ready to be transferred on a micro sd card as described in previous article

immagine