Difference between revisions of "Umikaze"

From iagent
Jump to: navigation, search
(Created page with "<img src="http://www.thing-printer.com/wp-content/uploads/2017/04/Umikaze_header.png" style="width: 960px; margin: auto; display: block;"> Umikaze 2.1 is a complete Linux dis...")
 
(Starting up)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<img src="http://www.thing-printer.com/wp-content/uploads/2017/04/Umikaze_header.png" style="width: 960px; margin: auto; display: block;">
+
[[File:Umikaze header.png|700px|center]]
  
 
Umikaze 2.1 is a complete Linux distribution based on Ubuntu 16.04.1 LTS. It has all the necessary software for running [[Replicape]] to control your 3D printer. It is a fork of Kamikaze which remains Debian IoT based.
 
Umikaze 2.1 is a complete Linux distribution based on Ubuntu 16.04.1 LTS. It has all the necessary software for running [[Replicape]] to control your 3D printer. It is a fork of Kamikaze which remains Debian IoT based.
Line 67: Line 67:
 
====Starting up====
 
====Starting up====
 
You should see the app appear, similar to this:  
 
You should see the app appear, similar to this:  
<div style="position: relative;">
+
[[File:Etcher.png|900px|center]]
<img src="http://www.thing-printer.com/wp-content/uploads/2016/05/etcher.png" style="margin: auto; width: 800px; display:block; "/>
 
</div>
 
 
Follow the instructions from the app, briefly: <br>
 
Follow the instructions from the app, briefly: <br>
 
1) Hit "select image" and find the image you previously downloaded called " Umikaze-2.1.1.img.xz". <br>
 
1) Hit "select image" and find the image you previously downloaded called " Umikaze-2.1.1.img.xz". <br>

Latest revision as of 20:38, 20 October 2018

Umikaze header.png

Umikaze 2.1 is a complete Linux distribution based on Ubuntu 16.04.1 LTS. It has all the necessary software for running Replicape to control your 3D printer. It is a fork of Kamikaze which remains Debian IoT based.

Previous versions of Kamikaze/Umikaze in this branch:

The way this works is you download an image file, extract that onto a mico SD card and place that SD card in your BeagleBone Black. After some 5 minutes of looking at the logo and drinking coffee, the flashing procedure is over, you remove power from the BeagleBone, eject the SD card and re-apply power to the board. If you have Manga Screen, you should see Toggle appear on the LCD. You should also be able to point your browser to [http://kamikaze.local] which will display a welcome wizard with instructions about how to set up your Octoprint instance. The rest of the documentation is included in the Redeem page or below.

Umikaze 2.1.1

Umikaze 2.1.1 is now available for download. With version 2.1, the way the image is created has changed. The image is now made starting from the Ubuntu 16.04.2 LTS release for BeagleBone, and altered to be great for 3D-printing. Redeem, Toggle and OctoPrint is now installed by forking the git repository and installing from source. This makes hacking very easy, and also enables updates to be monitored from within OctoPrints own software update system.

Download at:

 Umikaze 2.1.1

Release notes

Umikaze 2.1.1

Release notes for previous versions:

Release notes for Kamikaze 2.1.0

The size is 835 MB compressed, but expands to a 3.6GB partition, suitable for a 4GB or bigger SD card. If you have one of the older rev C BeagleBone Black with only 2GB eMMC, you will not be able to flash it, and will need to run from the SD card..

Bugs

Follow the Umikaze development here: Umikaze github

There are always bugs, and we're hard at work squashing them. If you run into a bug, please check the Umikaze github bugtracker to see if it's been reported, and if not, please add it there so it can be tracked by other users also.

Username/password

For SSH:

username: ubuntu
password:  temppwd

That is the default user password which can use sudo. If you are not on a secure and private network, it is highly advised to change the password! Do this by SSH-ing in as the user you want to change the password of and running the command

passwd

Note that these user passwords are completely separated from the octoprint users you setup during the setup wizard for access control!

Once you log in as the user ubuntu, you can sudo to root as needed to edit system files.

sudu su -

and enter the ubuntu passwd.

Burn image

Once you have the BBB-flasher downloaded to your computer, you can transfer it to a microSD card (not included) in the normal manner.
Go to http://www.etcher.io/ and download the app for your OS.

Linux

For Linux, make sure you make the app executable and start it as root:

cd ~/Downloads
chmod +x Etcher-linux-x64.AppImage
sudo ./Etcher-linux-x64.AppImage

Windows

It's a normal program installer. Install it and run it.

OS X

It's a normal installer, just drag the app into the application folder.

Starting up

You should see the app appear, similar to this:

Etcher.png

Follow the instructions from the app, briefly:
1) Hit "select image" and find the image you previously downloaded called " Umikaze-2.1.1.img.xz".
2) Insert a 4GB micro SD card (or larger) in your SD card reader slot. The card should be detected by the app.
3) Hit flash, and wait for it to finish.

Elias also made a quick video on how to do this procedure:
{{#evt: service=youtube |id=https://www.youtube.com/watch?v=23Id20_8hWs |alignment=center }}

Running Umikaze from SD card

If you want to run the image from the SD card and not overwrite the on board flash, you need to place the SD card in a computer running Linux (Windows and MacOS cannot read the card as yet) and edit the file on the SD card with the path /boot/uEnv.txt. from the partition called Umikaze. Comment out the last line of the file with a #, the line that starts the flasher instead of systemd.

Flashing procedure

Once the SD card is inserted in the SD card slot of the BBB, hold down the "boot" button and apply power. If you have a Manga Screen installed, the Kamikaze splash screen will appear within 3 seconds. After 10-5 seconds, the 4 lights on the BBB will flash in a "Night rider" pattern (also called cylon leds). Once the flashing procedure is done, after about 15 minutes, the board will power down. Remove power, eject the SDcard and re-apply power. The first time the BBB boots up after removing the SD card, it will run a script to compile the device tree overlays into the kernel and then it will reboot.

Troubleshooting

Make sure:

  1. The microSD card you are using is 2GB or more.
  2. All the lights light up at the end of the flashing procedure.
  3. You remove the card after the flashing procedure is done.
  4. During the first boot, you leave it powered on for a few minutes. On first boot, some scripts will run, and Octoprint will take a while to start.
  5. If you're not planning on using USB networking you'll need to setup wifi following the instructions in Kamikaze_2_1#Wifi

Getting started

Elias made a quick video to show how to get started with Kamikaze 2.0.8 - it will be updated for Kamikaze 2.1.0: {{#evt: service=youtube |id=https://www.youtube.com/watch?v=BKb28fJx26I |alignment=center }}

Ways to connect

There are several ways to connect your computer to the BeagleBone Black. If you have a router or switch, simply use a network cable and connect your BeagleBone to that. The BeagleBone should start to answer pings on the [link-local] address right away:

ping kamikaze.local

If you are on a more exotic network, you might have to find your BeagleBones IP address manually.

Another way is using a USB cable to connect from your computer to the BeagleBone. The BeagleBone has ethernet over USB that has a static IP address of 192.168.7.2. You can then log in with ssh:

ssh root@192.168.7.2 

and check your BBBs assigned IP address with ifconfig. Note that if your computer may recognize the ethernet but not automatically set an IP that allows it to talk to the BBB - in which case you should setup a manual IP on that interface with the address 1.92.168.7.1 and netmask 255.255.255.0

Note for Windows users: you'll need to install Apple's bonjour service to autodiscover the BBB on the network, if your router/modem doesn't do DNS assignment (or if you're using USB). Furthermore, for ssh on windows, it is recommended to use PuTTY

Quirks

The first time Umikaze boots, the index file for the kernel objects is recreated and the necessary permissions for Octoprint are run. It can take a while, please be patient.

If you have Manga Screen and would like to avoid the blinking cursor screwing up your Toggle, you can disable the cursor from the command line of BeagleBone. Disable console cursor:

 echo 0 > /sys/class/graphics/fbcon/cursor_blink

Upgrading packages

Since this is a Debian system, packages can be upgraded with apt.

apt-get update
apt-get upgrade

Please note that since this also upgrades the SSH daemon, which may kick the user out during the upgrade process. If that happens, you need to SSH back in, and continue the process:

dpkg --configure -a

Most users will want to update the latest version of redeem or toggle periodically.

To update redeem

The octoprint_redeem plugin should provide a prompt when there is a redeem update available, and the wizard should work in almost all cases. If it doesn't, or if you prefer knowing the gritty details of how to do this by hand, here are the manual instructions:

login as root and execute these commands:

cd /usr/src/redeem
git pull
python setup.py clean install
cp configs/* /etc/redeem
systemctl restart redeem


To switch to the develop branch

If your printer suffers from problems that are being addressed or if you want to help test the next version of redeem, you need to switch your installation to the develop branch of Redeem. Beware: there be bugs and dragons in this code!

To do so, follow these instructions:

cd /usr/src
rm -r redeem
git clone https://bitbucket.org/intelligentagent/redeem.git
cd redeem
git checkout develop
make clean install
systemctl restart redeem

To update toggle

Just like Redeem's updates, the octoprint_toggle plugin should provide a wizard for updating the software. Below are the manual commands for the geeks, the curious, and those whose automatic updates failed. But please report it if the failure is consistent!

login as root and execute these commands:

cd /usr/src/toggle
git pull
python setup.py clean install
cp configs/* /etc/toggle
systemctl restart toggle

Wifi

Umikaze 2.1 uses NetworkManager for handling connections, instead of connman.

Basically plug in your wifi dongle, boot (or reboot), connect to the BBB via USB or Ethernet, login via SSH as root, and run

nmtui

The wizard should be pretty self-explanatory, but reach out to the community on Google+ or the #support channel on Slack should you need help.

Webcam

Webcam streaming has been tested with Logitech C270. Most of this is from: https://github.com/foosel/OctoPrint/wiki/Setup-on-BeagleBone-Black-running-%C3%85ngstr%C3%B6m#webcam

mjpg-streamer is shipped with Umikaze 2.1 by default. It is on and if you have a webcam plugged in before powering up, the streams should return video if your webcam is supported.

The stream should be available through [http://kamikaze.local:8080/?action=stream] To integrate this in Octoprint:

 nano /home/octo/.octoprint/config.yaml

Add this to the webcam section if octoprint isn't showing the feed already:

 webcam:
   stream: http://kamikaze.local:8080/?action=stream
   snapshot: http://kamikaze.local:8080/?action=snapshot
   ffmpeg: /usr/bin/ffmpeg

Restart octoprint

System commands

The wizard for Octoprint has a section asking for server commands. Fill in these commands for the entries:

Restart octoprint:
sudo systemctl restart octoprint.service
Reboot:
sudo reboot
Shutdown:
sudo shutdown -h now

Known problems

  • Redeem configuration files list is empty on initial boot.
    • Upload an empty config file to show the pre-defined files from the filesystem.
    • Same applies to Toggle
  • Uploading local.cfg via Octoprint Redeem plugin renders an empty file the first time.
    • Upload the file twice for it to work.
  • The Kamikaze logo does not show up on MangaScreen during eMMC flashing. Purely cosmetic.
  • Some modifications of the local.cfg or to a printer's .cfg file aren't applied
    • The workaround is to manually search for and delete two files:
 firmware_endstops.bin 

and

 firmware_runtime.bin

they should be somewhere in /usr/local/lib/python2.7 and you can find them with sudo find | grep firmware_runtime in that directory.

Manual installation of package feed

To manually add the Debian repository with Replicape and Toggle packages, add this in a shell on your BeagleBone:

 wget -O - http://kamikaze.thing-printer.com/apt/public.gpg | apt-key add -
 echo "deb http://kamikaze.thing-printer.com/apt ./" >> /etc/apt/sources.list
 apt-get update

The Kernel in the current image is the 4.1 LTS branch, and it has PRU support.

Efforts are ongoing to try and use the 4.4 LTS branch for the new Wireless version of the BeagleBoneBlack.

Source files

Umikaze 2.1.x is a distribution building on top of the wonderful Ubuntu LTS console distribution for BeagleBone. It is merely adding the necessary packages and overlays necessary as in 1.x and 2.0.x versions did on top of Debian. Kamikaze 2 source files are available here [1]

Kamikaze 1.x and 2.0.x is a fork of Robert C Nelsons wonderful Debian distribution for BeagleBone. It tries to follow his branch closely, but adds some additional packages, specifically Redeem, Octoprint, CuraEngine, Toggle and the necessary Cogl and Clutter packages for making that work. Here are the source files:

 https://github.com/eliasbakken/kamikaze

Attributions

Octoprint is the brainchild of Gina Häußge, license AGPL and hosted here:

 http://octoprint.org/

CuraEngine is developed and maintained by Ultimaker and has the AGPL V3 license. See the git repo for details:

 https://github.com/Ultimaker/CuraEngine