<p>This can be done, but you need to have the right order of operations. <a href="https://octoprint.org/" rel="nofollow noreferrer">Octoprint</a> relies on such a setup. </p>

<ul>
<li>Set up the serial connection <strong>first</strong>, as sending the connect signal from your terminal or Raspberry to Marlin triggers the printer to reboot.</li>
<li>After having the connection established, start the printjob either via the control buttons or the remote console (for example: Octoprint or Repetier Server, running on your Raspberry)</li>
</ul>

<p>Note that you have to make sure not to dis- and reconnect the raspberry during print, as that might trigger a reboot of the printer!</p>

CC BY-SA 4.0
2020-01-15T13:30:01.897Z
2020-01-15T13:40:43.360Z
2020-01-15T13:40:43.360Z
Trish
<p>I am wondering if it is possible to print with a 3D printer from an SD card and connect to a serial host at the same time. I want to use the Marlin <code>M118</code> serial print command to trigger custom functions running on a Raspberry Pi. The RPi would be connected to the printer over serial but would not be sending G-code. Is this possible?</p>

<p>My printer is the Monoprice Mini Delta. It runs a Marlin based firmware and I can install standard Marlin on it if necessary.</p>

CC BY-SA 4.0
2020-01-15T08:20:33.083Z
Welcome to 3DPrinting.SE!
0scar
<marlin><electronics><repetier><serial-connection>
Print from SD and connect to serial host at the same time
Seth A
# Print from SD and connect to serial host at the same time

(Asked by: username_0 on 2020-01-15)

I am wondering if it is possible to print with a 3D printer from an SD card and connect to a serial host at the same time. I want to use the Marlin `M118` serial print command to trigger custom functions running on a Raspberry Pi. The RPi would be connected to the printer over serial but would not be sending G-code. Is this possible?

My printer is the Monoprice Mini Delta. It runs a Marlin based firmware and I can install standard Marlin on it if necessary.

**Tags:** marlin, electronics, repetier, serial-connection
> **Comments:**
> **username_1**: Welcome to 3DPrinting.SE!  

---

## 1 answers

### Answer by username_2 on 2020-01-15. Score: 3 | Accepted answer

This can be done, but you need to have the right order of operations. [Octoprint](https://octoprint.org/) relies on such a setup.

* Set up the serial connection **first**, as sending the connect signal from your terminal or Raspberry to Marlin triggers the printer to reboot.
* After having the connection established, start the printjob either via the control buttons or the remote console (for example: Octoprint or Repetier Server, running on your Raspberry)

Note that you have to make sure not to dis- and reconnect the raspberry during print, as that might trigger a reboot of the printer!


---

