<p>I want to plug in my drivers from the printer into my Raspberry Pi. I want to control the printer's axes by sending G-code directly from the Raspberry Pi command line (if possible) to the drivers.</p>
<p>Is that possible and if yes does anyone know how? As I stated above without using any 3rd party program/software.</p>

[{'answer_id': 17857, 'author': 'user77232', 'author_id': 12857, 'author_profile': 'https://3dprinting.stackexchange.com/users/12857', 'pm_score': 0, 'selected': False, 'text': "<p>You can send the data to the serial port using <code>echo</code>, but you'll have to use <code>cat</code> to get the response.</p>\n"}, {'answer_id': 17930, 'author': 'craftxbox', 'author_id': 6996, 'author_profile': 'https://3dprinting.stackexchange.com/users/6996', 'pm_score': 2, 'selected': False, 'text': "<p>A very dumb, simple way to send GCODE to your printer from the terminal can be achieved with:<br />\n<code>echo &quot;gcode here&quot; &gt; /dev/ttyS0</code><br />\n/dev/ttyS0 can vary, It may be /dev/ttyACM0, /dev/ttyUSB0, or any similar with a different number.</p>\n<p>You can figure out which path is correct for your printer with the command <code>ls /dev/tty*</code> and comparing the results with your printer plugged in and unplugged, Whichever device pops up new should be your printer.<br />\nAs well, Some printers may appear in <code>/dev/serial/by-id/</code> instead of <code>/dev/tty*</code>, so if you can't find your printer normally, try <code>ls /dev/serial/by-id/</code> instead.</p>\n<p>If this doesn't seem to work, you may need to change the serial settings using the command <code>sudo stty -f /dev/ttyS0 115200</code>, replacing /dev/ttyS0 and 115200 to the device path and printer baud rate respectively.</p>\n<p>If you are looking for a more bi-directional solution, you can use the command <code>screen</code>, which is usually installed by default. You can use it like this:<br />\n<code>screen /dev/ttyS0 115200</code> and exit by Control+A, then pressing D<br />\nAnother solution would be the <code>pronsole</code> utility from Printrun/Pronterface, which can be installed using <code>sudo apt install printrun</code> and invoked with <code>pronsole.py</code> and you can then connect to your printer with the syntax<br />\n<code>connect /dev/ttyS0 115200</code> or simply <code>connect</code>, as pronsole has the ability to autoconnect to your printer. Exit with the <code>exit</code> command.</p>\n"}, {'answer_id': 17931, 'author': 'R.. GitHub STOP HELPING ICE', 'author_id': 11157, 'author_profile': 'https://3dprinting.stackexchange.com/users/11157', 'pm_score': 0, 'selected': False, 'text': "<p>Sending G-code to a printer via a serial interface is a bidirectional operation that requires waiting for acknowledgment from the printer before sending further commands. In theory, this shouldn't be needed and hardware flow control (or even XON/XOFF flow control if the hardware is not available) should be used, but that's not the way things were done. Thus, sending G-code with &quot;dumb&quot; commands like &quot;cat&quot; does not work.</p>\n<p>If you want to send individual commands manually, you can use a program like Minicom (or screen's built-in serial terminal support) and process the acknowledgments yourself. But if you want to really stream print jobs, you need at least a minimal program for it. This can be written in a few lines of Python or Perl if you like. I know there are examples of such but I don't have the links handy and haven't tried any of them to be able to recommend one, anyway.</p>\n"}]
['https://3dprinting.stackexchange.com/questions/17845', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/30614/']