Octoprint 1.5.2 3D print server on Omega2+
I installed Octoprint 1.5.2 on an Omega2+ with the Mini Dock for USB and power. There are other ways to do this, like a few different Docks that would work, or you can do it with pins. But USB seems the simplest to me at least for my use.
The post I'm replying to explains how to do this with Octoprint 1.3.9 on an older Omega2+ firmware, I don't know which version. I wanted to do it with the latest version (1.5.2) and firmware (Ω-ware: 0.3.2 b233), and I was able to do it with a few tweaks. For completeness I'll post the whole procedure. I'm writing this from memory, I didn't take notes on the specific things I did differently so let me know if you have problems.
I made changes to config files using the Code Editor app through the web interface. The previous instructions use vi, which to me seems more difficult. Ok, here goes.
This assumes you have gone through the initial setup wizard, have a microSD card in the slot on the Omega (I think 2GB is enough but I'm not positive), and have a way to connect your 3D printer to the Omega (USB is simplest).
1. Change the package repository
In the file /etc/opkg/distfeeds.conf, uncomment these two lines (probably lines 2 and 5):
src/gz openwrt_base http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/base src/gz openwrt_packages http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/packages
2. Format and mount SD card
opkg install fdisk e2fsprogs block-mount umount /dev/mmcblk0p1 mkfs.ext4 /dev/mmcblk0p1 umount /dev/mmcblk0p1 mkdir /mnt/SD mount /dev/mmcblk0p1 /mnt/SD
(will get some error like can’t umount, just ignore it)
3. Copy OS to SD card
tar -C /overlay -cvf - . | tar -C /mnt/SD/ -xf - umount /mnt/SD block detect > /etc/config/fstab
4. Auto mount SD card on system boot
In the file /etc/config/fstab,
change the option: target '/mnt/mmcblk0p1' to option: target '/overlay'
change the option: enabled '0' to option enabled ‘1'
after rebooting you can verify if /overlay is mounted properly by running
You should see something like
Filesystem Size Used Available Use% Mounted on /dev/root 7.8M 7.8M 0 100% /rom tmpfs 60.9M 124.0K 60.8M 0% /tmp /dev/mmcblk0p1 14.5G 1.3G 12.4G 10% /rom/overlay overlayfs:/overlay 14.5G 1.3G 12.4G 10% / tmpfs 512.0K 0 512.0K 0% /dev
Except your used and free space will be different.
5. Set up swap space and expand /tmp
opkg install swap-utils
create swap file on SD card
dd if=/dev/zero of=/rom/overlay/swap.page bs=1M count=512
This will take a few minutes
mkswap /rom/overlay/swap.page swapon /rom/overlay/swap.page
should look like
total used free shared buffers cached Mem: 124808 96724 28084 132 5444 15564 -/+ buffers/cache: 75716 49092 Swap: 1048572 0 1048572
mount -o remount,size=200M /tmp
5. Install C++ and Python (I chose Python 3 because Python 2 is being phased out)
opkg update opkg install gcc make opkg install python3 python3-pip unzip opkg install python3-dev --force-overwrite pip3 install --upgrade pip pip3 install --upgrade setuptools
7. Download and install Octoprint
cd /root wget https://github.com/foosel/OctoPrint/archive/1.5.2.zip unzip 1.5.2.zip cd OctoPrint-1.5.2 ln -s /usr/bin/gcc /usr/bin/ccache_cc
Install (this will take a while)
pip install -r requirements.txt
Fix some file/folder names for compatibility
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.5.2/src/octoprint/util/comm.py sed -i 's/Häußge/H\./g' /root/OctoPrint-1.5.2/src/octoprint/util/virtual.py sed -i 's/Häußge/H\./g' /root/OctoPrint-1.5.2/src/octoprint/plugins/virtual_printer/virtual.py sed -i 's/exit("You should not run OctoPrint as root!")/pass/g' /root/OctoPrint-1.5.2/src/octoprint/server/__init__.py
8. Run Octoprint Server
octoprint serve --iknowwhatimdoing &
Wait several minutes for server to start
Use browser to connect
Go through the setup wizard and change settings as needed for your printer
You might want to update Octoprint and/or install some plug-ins. Future updates might not work, so you risk messing up your Octoprint install, do so at your own risk. Same goes for plug-ins, some of them might not install on the Omega2 or break something, but the ones I tried worked fine.
9. Set to automatically start Octoprint on boot
In the file /etc/rc.local, add this right above the exit line
octoprint serve --iknowwhatimdoing
or, for debugging purposes, to log Octoprint's console output, instead add
octoprint serve --iknowwhatimdoing >> /tmp/output.txt 2>&1 &
If you want to be able to update, or possibly to install certain plugins, you might want to use the swap file and expand /tmp. I don't know if this has any performance implications or if there's some reason not to, I'm still a beginner with Linux, but I have some experience. If you want to do this, in the same file /etc/rc.local, add the following above the Octoprint line
### activate the swap file on the SD card swapon /rom/overlay/swap.page ### expand /tmp space mount -o remount,size=200M /tmp
And that's it! Happy printing!
Let me know if you have any problems or questions or comments.
Another note. If you don't do the last optional step, you can delete /rom/overlay/swap.page to save space
I've been testing this setup with my Prusa i3 MK3S, and I get really bad prints compared to printing directly. Looks like the layers are offset from one another and it's possibly overextruding. I don't know if it's the Omega2+/Octoprint setup (probably), or if there are some settings that aren't right. So it seems like the Omega2+ isn't powerful enough to run Octoprint. Probably have to spring for a Raspberry Pi. They say it doesn't work with the Raspberry Pi Zero W, so probably has to be one of the higher end ones. And the Omega2+ doesn't have anywhere near the specs.
Does anyone have suggestions on how to make it work? If not, then I don't think Octoprint works well enough with the Omega2.
I can try this setup with my Wanhao Duplicator i3 Plus when I get some time during xmas. I'm using Octoprint with a Raspberry Pi 3 at the moment, but I only use it to monitor the print. The print itself is running "internally" using the SD card slot and the onboard logic. The Pi is just for print monitoring purposes. Maybe the Omega is powerful enough to do that at least, i.e. just offering the web interface and monitoring the print?
@dude8604 I will try on my Flashforge Guider IIS, give me a few days to find some time.
@chrizree Yeah, probably. And I guess it could just send the Gcode to start a print directly from the SD card in the printer. That should work without interfering with the print. I'll try that.
Thank you sharing the Gcode on how start printing directly from the SD card. Lets hope that the code is accepted and my Omega2+ printer starts printing directly from my SD card.