Part III: Command-Line Printer Control
Command-Line Printer Control
Why click buttons when you can talk to the printer directly over serial? The Ender-3 V3 SE speaks G-code — every command the slicer generates, you can type by hand.
Option A: Raw Serial with picocom
sudo pacman -S picocom
picocom -b 115200 /dev/ender3v3se
You’re now connected directly to the Marlin firmware. Type G-code commands and see raw responses:
| Command | What It Does |
|---|---|
|
Query current nozzle and bed temperatures |
|
Print firmware version and capabilities |
|
Dump all firmware settings (steps/mm, acceleration, PID values) |
|
Home all axes (X, Y, Z) |
|
Run auto bed leveling (CR Touch) |
|
Set nozzle temperature to 210°C (non-blocking) |
|
Set nozzle temperature to 210°C and wait until reached |
|
Set bed temperature to 60°C (non-blocking) |
|
Set bed temperature to 60°C and wait until reached |
|
Move to position X=100 Y=100 at 3000 mm/min |
|
Raise Z axis to 10 mm |
|
Extrude 10 mm of filament at 200 mm/min |
|
Fan on full (0–255 range) |
|
Fan off |
|
Save settings to EEPROM |
|
Load settings from EEPROM |
|
Disable stepper motors (lets you move axes by hand) |
Exit picocom: Ctrl+A then Ctrl+X
| If you’re inside tmux, Ctrl+A is likely your tmux prefix and won’t reach picocom. Instead, kill it from another pane: |
# Find the PID holding the serial port
lsof /dev/ender3v3se
# Kill it
kill <PID>
G-code commands are case-sensitive — use uppercase (M105, not m105). Lowercase will return Unknown command.
|
Option B: pronsole (Full CLI Print Control)
pronsole is a dedicated command-line interface for 3D printers — connect, preheat, load G-code, and kick off prints without ever opening a GUI.
yay -S printrun
pronsole.py
The command is pronsole.py, not pronsole. Verify with: pacman -Ql printrun | grep bin
|
You will see two harmless warnings about dbus and psutil — these are optional dependencies for sleep inhibition and process priority. Ignore them.
| Command | What It Does |
|---|---|
|
Connect to the printer over serial |
|
Query current temperatures |
|
Set bed temperature |
|
Set nozzle temperature |
|
Home all axes (lifts nozzle — use before cleaning bed) |
|
Extrude 50mm of filament (use to test flow) |
|
Load a sliced G-code file (no |
|
Start printing the loaded file |
|
Watch print progress, temps, and ETA in real time |
|
Pause the current print |
|
Resume a paused print |
|
Reset the printer (use to cancel a failed print) |
|
Turn off heaters and motors |
|
Disconnect from the printer |
|
Quit pronsole |
pronsole does not expand ~. Always use the full absolute path when loading G-code files (e.g., /home/evan/3dprints/… not ~/3dprints/…).
|
There is no abort or cancel command. To stop a bad print: pause → reset → home → clean bed → load → print.
|
CLI-First Workflow
The full terminal-native workflow — slice in the GUI, then drive everything from the shell:
1. Power on printer
2. Clean bed with IPA
3. Load STL into OrcaSlicer (flatpak run com.orcaslicer.OrcaSlicer)
4. Select profile: Ender-3 V3 SE / 0.4 nozzle / PLA
5. Adjust nozzle temp for your filament (check spool label)
6. Click "Slice plate" → "Export G-code" → save to ~/3dprints/
7. Preheat via picocom:
picocom -b 115200 /dev/ender3v3se
M104 S210 (nozzle)
M140 S60 (bed)
M105 (check temps)
8. Kill picocom from another pane:
lsof /dev/ender3v3se → kill <PID>
9. Print via pronsole:
pronsole.py
connect /dev/ender3v3se 115200
load /home/<user>/3dprints/<file>.gcode
print
monitor
10. Watch first layer — confirm filament is extruding
11. Walk away (monitor command shows progress remotely)
12. Remove print after bed cools to ~30°C
| If printing via USB/serial, your computer must stay connected for the entire print duration. If the laptop dies or disconnects, the print stops. For unattended prints, use the MicroSD card method. |