Jump to content

OctoPrint on armbian


Recommended Posts

Hi, 

  I've been running Octoprint on armbian for several months with good results of a couple of printers with good performance no relevant problems. Installation process is not complex but I decided to build a simple a plug&play meta-distribution like OctoPi for Rpi boards but based on armbian so it can be used potentially in any of the supported boards.  I started with the popular Opi Zero as it is really cheap and the four cores of the H2+ processor handle perfectly a 3d printer load and is 3 times cheaper than a typical RPI3B that octoPi requires.

 

You can find it here: https://github.com/ludiazv/octocitrico

 

Built-in features are:

Core (installed and enabled):

  • Optimized armbian Debian buster.
  • Latest stable octoprint version.
  • Selection of top octoprint plugins.
  • HAProxy with self signed keys for ssl access.
  • Avahi service: Bonjur addvertisement (this enable to acces with host-name.local via ssh or http/s)
  •  SSH console access.
  • USB OTG console access (if available in the board)
  • Enabled i2c-dev,spidev (if available on the board)

 

3D printer related software (installed but disabled):

  • Klipper
  • PlatformIo core for building 3D printer firmware.
  • Marlin 1.1.x & Marlin 2.x.x firmware (bugfix versions)

 

Extras (installed but disabled):

  • MPGStreamer USB camera support (experimental)
  • SMB shares to remote edit configuration files from a remote PC.

 

 

Feedback and contributions are welcome.

 

Thanks armbian guys for the awesome work you do.

 

Link to comment
Share on other sites

Hi everyone.  I tried to use this to build an image for an Opi One. It looked like it was going to work, but now it has thrown this error a couple times:

 

Processing triggers for resolvconf (1.79) ...
Errors were encountered while processing:
 selinux-policy-default
E: Sub-process /usr/bin/dpkg returned an error code (1)
[ error ] ERROR in function create_rootfs_cache [ debootstrap.sh:239 ]
[ error ] Installation of Armbian packages failed 
[ o.k. ] Process terminated 
[ o.k. ] Unmounting [ /home/vagrant/armbian/.tmp/rootfs-current-orangepione-buster-no-no/ ]
[ error ] ERROR in function unmount_on_exit [ image-helpers.sh:66 ]
[ error ] debootstrap-ng was interrupted 
[ o.k. ] Process terminated 
Connection to 127.0.0.1 closed.

 

I can't find it now, but the last time I ran it, I searched for some of the error message and Igor had closed a case that was based on some environment quirk.  But it didn't explain what that was, and it was closed.  I tried to run the script as sudo and got a message that I wasn't the correct Vagrant user, so that didn't work. 

 

Just to let you know how thick skulled I am, I just tried to use armbianmonitor, and I'm on an x86 running Ubuntu 20.4.  So yeah. 

 

Thanks for checking this out if you are reading this. I was blown away that this tool existed, and it's pretty new.  Would be awesome if it worked for all the Armbian boards. 

 

I attached a zip file of the entire output.  Here is the bottom in a pastebin:

https://pastebin.com/Cud3EtRG

 

 

octocitrico.zip

Link to comment
Share on other sites

Thanks for answering @ldiaz.  Yes for sure I would share it if I can get it to work. I made several images for Nacho at NextCloudPi before the Armbian guys made it part of armbian-config.  I don't know how to share it on git, but I'll figure it out. 

 

I didn't alter the extra.sh at all. 

 

# Board Release
BOARD=orangepione
BRANCH=current
RELEASE=buster

# General configuration. 
KERNEL_ONLY="no"
KERNEL_CONFIGURE="no"
PROGRESS_DISPLAY="plain"
BUILD_MINIMAL="no"
BUILD_DESKTOP="no"
INSTALL_HEADERS="no"

# This setting for clean build
CLEAN_LEVEL="make,debs,cache,sources"
#CLEAN_LEVEL="make,debs,cache"
# This setting for rebuilds
#CLEAN_LEVEL="debs,extras"
#CLEAN_LEVEL=""

# Lang
DEST_LANG="en_US.UTF-8"

# output
SEVENZIP="yes"
COMPRESS_OUTPUTIMAGE="sha,7z"
 

Link to comment
Share on other sites

Yea you are probably young though. I'm 54, and wrote one of the first books on remote web publishing (in perl) back in 1996, and never had a computer course in my life. Those days are gone for me. My brain just doesn't want learn entire new things anymore.  I had to ask my sysadmin the other day to remind me how to use nmap so I could find my pi on the network.   At this point I'm just hoping that Mr. @ldiaz can make this thing work. I have a pile of Opi Ones from a failed project a couple years ago and I want to build a print farm for my twins.  This would be a real gift for my lazy old brain. :)

Link to comment
Share on other sites

Hi,

  I tested it. I confirm that is general problem with the build in armbian. Installing the package selinux-policy-default. Is not the problem of the OPiOne or the custom script to configure all 3d printer software. This script is not even executed as the erros in the stage 2 when armbian installs addtional packages. It fails with current version of armbian build. Maybe @Igor can point out a solution.

 

Link to comment
Share on other sites

So should I just assume this is maybe a future thing @ldiaz ?  I saw @Igor took a look at it and liked it but did not comment.   Maybe it'll make it into armbian-config at some point down the road.  I have a few rpis that I can get started with so it isn't a huge deal.  I just love to use Armbian and opis when I can for some reason.  It's like my personal discovery or something. :)

Link to comment
Share on other sites

Hi @DeterminedOpier,

 

  I updated the repository fixing some problems and supporting opi one. find the prebuilt images here: https://github.com/ludiazv/octocitrico/releases I do not have a opi one to test but it should work as the board is very similar to the opizero and supported well in armbian.

 

Let me know if works well when you've tested. Also I removed klipper install by default as it not the typical use case so the image will be smaller.

 

 

 

 

Edited by ldiaz
Link to comment
Share on other sites

@ldiaz have you ever tried to get an rpi CSI camera to work with the camera interface? I have tried all of the stuff I could find on the forums 

sudo apt-get install v4l-utils

and what I could understand from this thread:

but still nothing, even from just sudo mplayer tv:// 

Going to try a USB camera now. I just happen to have a pile of those rpi cameras. 

 

#edit  couldn't get USB camera to work either, but mplayer gave me a different error, and now I have /dev/video 0 1 and 2.

#edit2 later found the service in the config script, enabled it, and it got a could not remove klipper service message, but the star was there when I went to check, so it apparently worked. 

but camera does not

 

 

Link to comment
Share on other sites

14 hours ago, DeterminedOpier said:

@ldiaz have you ever tried to get an rpi CSI camera to work with the camera interface? I have tried all of the stuff I could find on the forums 

sudo apt-get install v4l-utils

and what I could understand from this thread:

but still nothing, even from just sudo mplayer tv:// 

Going to try a USB camera now. I just happen to have a pile of those rpi cameras. 

 

#edit  couldn't get USB camera to work either, but mplayer gave me a different error, and now I have /dev/video 0 1 and 2.

#edit2 later found the service in the config script, enabled it, and it got a could not remove klipper service message, but the star was there when I went to check, so it apparently worked. 

but camera does not

 

 

 

In order to work with a camera the camera must work first on your system. @@lex posted a guide to configure a CSI camera on the OpiOne.  If the camera works fine you can edit /boot/octopi.txt 

to configure it to be use with the streamer software. Use v4l2-ctl --list-devices and v4l2-ctl -d <dev> --list-formats --list-ctrls for analyzing your set up.  Resolution, format, etc.. need to be configured in the camera_usb_options=" --- " in /boot/octopi.txt . I tested several USB cameras and the streaming worked ok. I did not test CSI cameras on Opis.

 

 

Regarding klipper. In the last version should be be stopped and not installed I removed it to make the image smaller.  If you are not using it do not worry about this setting.

 

 

 

 

 

Link to comment
Share on other sites

Ok thanks I'm going to keep digging with it.  I don't see a guide by @@lex, just that thread that got hijacked, and I don't understand overlays at all at present, but I'll try to figure it out.  To me right now the important thing was getting octopi going and being able to install the plugin for the raise cloud. It works fantastic, and I am over the top grateful for the help.  The camera is a nice thing, but not a big deal with what I am trying to do with them right now.  Eventually I'll get it. :)

Link to comment
Share on other sites

I caught one thing I hadn't tried from all the threads out there about the gc2035 (orange pi branded) camera.  This is what it says. 

 

pi@citrico-opione:~/v4l2loopback$ v4l2-ctl -d /dev/video0 -D
Driver Info:
    Driver name      : cedrus
    Card type        : cedrus
    Bus info         : platform:cedrus
    Driver version   : 5.4.45
    Capabilities     : 0x84208000
        Video Memory-to-Memory
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04208000
        Video Memory-to-Memory
        Streaming
        Extended Pix Format
Media Driver Info:
    Driver name      : cedrus
    Model            : cedrus
    Serial           : 
    Bus info         : platform:cedrus
    Media version    : 5.4.45
    Hardware revision: 0x00000000 (0)
    Driver version   : 5.4.45
Interface Info:
    ID               : 0x0300000c
    Type             : V4L Video
Entity Info:
    ID               : 0x00000001 (1)
    Name             : cedrus-source
    Function         : V4L2 I/O
    Pad 0x01000002   : 0: Source
      Link 0x02000008: to remote pad 0x1000004 of entity 'cedrus-proc': Data, Enabled, Immutable
 

Link to comment
Share on other sites

FYI for anyone following this thread in the future, if you are trying to get the old standard orange pi camera (that Steven sells on Ali) to work with Armbian, as of right now it is not supported in the mainline kernel, and the legacy 3.4 kernel is deprecated because the repositories are no longer supported. So for now, they don't work. We'll have to put them away until they are cool and retro like vinyl records. 

Link to comment
Share on other sites

So, @ldiaz, and others who may be interested in this thread.  

 

The Orange Pi One experiment is a complete failure.  Octoprint installs correctly, connects, prints, all just fine and everything is seamless. 

 

But, and this is obviously a huge but, long prints eventually fail, and usually late.  So you wake up to a 20 hour print that should still be going, and the print head is frozen at over 80%.  So essentially a whole day got taken up, for nothing. 

 

This has happened repeatedly, over a dozen times, while I tested and retested to eliminate variables. 

 

* Changed brand of SD card. 

* Moved pis to power source not the same as printer, in case it was a voltage sag. 

* Using shielded printer cables. 

* Initially we used an OctoFarm overlay program, so tested with and without. 

* This happened on both Prusa and several CR-10s.

 

And the most telltale of them all was that yesterday I burned a standard Raspberry Pi Octopi image, fired up one of my 3B plusses, and hooked it to one of the CR-10s. The camera came on (which I never got working on the Opi), and the first large 22 hour print just finished. 

 

I think there is some kind of communication jam up going on, because though the problem is repeatable, it happened at different times. Some even failed at 2%, same behavior.  I didn't have the serial log enabled, but the standard log showed nothing. 

 

If you are interested @ldiaz, I am willing to hang in there and continue to test for you. After a week and a half of failed prints, I personally I am completely abandoning the Opis for now and moving to Rpis.  Nobody even answered my webcam question, and I know Igor isn't interested in camera stuff historically, so it just isn't worth it for now.  I am subscribed to this thread, so if you want to come back and try to figure it out at some point, just let me know and I'll be happy to lasso a printer and see if it works. Thankyou of course for all of your efforts. I love Armbian and appreciate the work that you all bring to the world of experimental computing. I will do whatever I can to help. 

Link to comment
Share on other sites

@DeterminedOpier

Sorry to hear that.  The problem you are describing is hard to debug as is related with intermittent communication. It can be anything form octoprint to usb kernel drivers for this SOC, usb cable or sockets or even the firmware of the 3d printer. I think you can enable the serial logger in octoprint to try to identify when the freeze happens.

 

 My experience with a couple of OpiZeros LTS is good with a couple of printers (Ender 3 and a I3 clone) is stable. I've printed long prints of 10-12 h without problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines