Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
octoprint [2017/10/20 12:11]
94.50.140.167
octoprint [2018/04/29 00:43] (current)
68.7.156.206 [Connecting via Ethernet]
Line 1: Line 1:
-====== Connection methods ​======+= Connection methods =
 There are 3 different ways to connect [[http://​octoprint.org|Octoprint]] to Smoothie: There are 3 different ways to connect [[http://​octoprint.org|Octoprint]] to Smoothie:
   * Ethernet   * Ethernet
Line 6: Line 6:
  
  
-===== Connecting via Ethernet ​=====+== Connecting via Ethernet ==
 Octoprint can't connect via network natively, so we'll use ''​socat''​ (a fork of famous ''​netcat''​) to create a local pipe to route traffic to Smoothie Octoprint can't connect via network natively, so we'll use ''​socat''​ (a fork of famous ''​netcat''​) to create a local pipe to route traffic to Smoothie
  
-First install it:+First install it (all the following examples are for [[https://​octopi.octoprint.org|OctoPi]]):
 <​code>​ <​code>​
 sudo apt-get install socat sudo apt-get install socat
Line 16: Line 16:
 Now try this command (replace ''​SMOOTHIE_IP''​ with your Smoothieboard address, like ''​192.168.0.10''​) Now try this command (replace ''​SMOOTHIE_IP''​ with your Smoothieboard address, like ''​192.168.0.10''​)
 <​code>​ <​code>​
-sudo socat pty,waitslave,​link=/​dev/​ttySmoothie,​perm=0660,​group=tty tcp:​SMOOTHIE_IP:​23+sudo socat pty,wait-slave,​link=/​dev/​ttySmoothie,​perm=0660,​group=tty tcp:​SMOOTHIE_IP:​23
 </​code>​ </​code>​
  
-You'll see no output (that'​s ok). +You'll see no output (that'​s ok). Leave the command running. We'll finalize that later.
  
  
Line 25: Line 25:
  
  
-Leave the command running and proceed ​to Octoprint [[http://​octopi.local|Web UI]]+Proceed ​to Octoprint [[http://​octopi.local|Web UI]]
  
 Go to **OctoPrint Settings** → **Serial Connection**:​ Go to **OctoPrint Settings** → **Serial Connection**:​
Line 43: Line 43:
 Now try to connect to the printer. If it connects, we should finalize the configuration and add ''​socat''​ to system startup Now try to connect to the printer. If it connects, we should finalize the configuration and add ''​socat''​ to system startup
  
-Add the following line to ''/​etc/​rc.local''​, substituting ''​SMOOTHIE_IP''​ with Smoothie IP address:+Open ''/​etc/​rc.local''​
 <​code>​ <​code>​
-socat pty,​waitslave,​link=/dev/ttySmoothie,​perm=0660,​group=tty tcp:​SMOOTHIE_IP:​23+sudo nano /etc/rc.local
 </​code>​ </​code>​
  
-If unsure how to do it, just run this, substituting ​''​SMOOTHIE_IP''​ with Smoothie IP address:+Go down with <​key>​↓</​key>​ key until you reach the end of the file. The last line is usually ''​exit 0''​. **Before ​this line** add the following (replace ​''​SMOOTHIE_IP''​ with Smoothie IP address):
 <​code>​ <​code>​
-sudo sed -e "​s|exit 0|socat pty,waitslave,​link=/​dev/​ttySmoothie,​perm=0660,​group=tty tcp:​SMOOTHIE_IP:​23\n\0|" /​etc/​rc.local >/​tmp/​rc.local +socat pty,wait-slave,​link=/​dev/​ttySmoothie,​perm=0660,​group=tty tcp:​SMOOTHIE_IP:​23 ​&
-sudo mv /​tmp/​rc.local /​etc/​rc.local+
 </​code>​ </​code>​
 +Save & exit: <​key>​Ctrl+O</​key>,​ <​key>​⏎</​key>,​ <​key>​Ctrl+X</​key>​
 +
 Reboot and check if it works. Reboot and check if it works.
  
----- 
  
-P/S: try to print some file from Octoprint (not from Smoothie'​s SD card). ​+==== Sorry, it's slow ==== 
 + 
 +Try to print (stream) ​some file from Octoprint (not from Smoothie'​s SD card). ​
 You may notice that it streams gcode **awkwardly slow** even on a fast network connection. ​ You may notice that it streams gcode **awkwardly slow** even on a fast network connection. ​
 That's how it happens for some of the users. That means you should prefer USB to Ethernet connection. That's how it happens for some of the users. That means you should prefer USB to Ethernet connection.
-It might be woking for you. Please leave a note somewhere if the speed is fine via socat 
  
-===== Connecting via USB / UART =====+It might be woking for you. Please leave a note somewhere if the speed is fine via socat. 
 + 
 +Still you can upload to SD (slow too: 1 MB/min for some users) and use Octoprint to start / stop jobs and control printer status 
 + 
 +== Connecting via USB / UART == 
 + 
 +Described on Octoprint wiki at https://​github.com/​foosel/​OctoPrint/​wiki/​Setup-OctoPrint-with-Smoothie .  
 + 
 +Set the "​Ignore any unhandled errors from the firmware"​ setting in Octoprint.
  
-Described on Octoprint wiki at https://github.com/foosel/OctoPrint/​wiki/​Setup-OctoPrint-with-Smoothie+//TODO add some more documentation here//