Skip to content

Slicer Integration

Daniel Heinen edited this page May 9, 2026 · 1 revision

Slicer Integration

ankerctl implements the OctoPrint-compatible /api/files/local endpoint, so any slicer that can submit jobs to a "custom print host" can send G-code directly to your AnkerMake M5 through ankerctl.

Tested slicers:

  • PrusaSlicer (and all forks)
  • OrcaSlicer
  • SuperSlicer
  • Bambu Studio

This page shows the configuration for each.

Common settings

For every slicer the values are the same:

Field Value
Host type OctoPrint
Hostname localhost (or your server IP)
Port 4470 (or your FLASK_PORT)
API Key the value from ./ankerctl.py config set-password (if set)
HTTPS No (the bundled web server is HTTP)

Make sure the web server is running before the slicer tries to upload:

./ankerctl.py webserver run --host 0.0.0.0 --port 4470

PrusaSlicer / SuperSlicer

  1. Printer Settings → Physical Printer → Add new printer
  2. Set Host type to OctoPrint
  3. Fill in Hostname or IP and API Key
  4. Click Test — you should see a green "Connection to printer works correctly" banner

To send a job:

  1. Slice your model normally
  2. Click the dropdown next to Export G-code
  3. Choose Send and Print (uploads + auto-starts) or Send to printer (upload only)

Screenshot of PrusaSlicer

OrcaSlicer

  1. Open Printer settings → Connection
  2. Select OctoPrint (under "Print Server Type" or similar)
  3. Fill in Hostname / IP and API Key
  4. Click Test to verify

OrcaSlicer also adds ;LAYER_COUNT:N to the G-code header — ankerctl extracts this automatically so the layer counter in the web UI matches the slicer's view.

Bambu Studio

Bambu Studio supports OctoPrint-compatible endpoints in its newer versions. Configure as for OrcaSlicer above. Bambu writes ; total layer number: N in the header, which ankerctl recognizes.

Behavior

  • Send and Print is the common case. The file is uploaded over PPPP and the print starts immediately. There is no "spool" or queue on the printer.
  • Upload only uploads but does not start. You can then start the print from the printer's touchscreen or via POST /api/printer/control {"value": 0}.
  • During an active print the file lists in the UI do not refresh (to avoid disrupting the running job). Pause or cancel first if you need to manage files.

Authentication

When ANKERCTL_API_KEY is set:

  • The slicer must include the key. PrusaSlicer / Orca / Bambu put it in the X-Api-Key header automatically when you fill the API Key field.
  • Without the key, uploads return 401 Unauthorized.

Troubleshooting

"Connection refused"

The web server is not running, or FLASK_HOST does not include the IP the slicer is reaching. Either:

  • Run ./ankerctl.py webserver run --host 0.0.0.0 to bind to all interfaces, or
  • Match the slicer's hostname to your FLASK_HOST (e.g. set both to 127.0.0.1)

"401 Unauthorized"

API key mismatch. Check:

  • ./ankerctl.py config show shows the right key (or (none))
  • The env var ANKERCTL_API_KEY matches
  • The slicer's API Key field is exact (no trailing whitespace; case-sensitive)

"413 Request Entity Too Large"

The G-code exceeds UPLOAD_MAX_MB (default 2048). Raise it in your environment.

Upload starts then stalls or times out

Almost always a network issue:

  1. Lower UPLOAD_RATE_MBPS to 5 for stability over Wi-Fi
  2. Verify PPPP is connected (navbar status dot)
  3. If you are on a VLAN with QoS, check that UDP traffic to the printer is not throttled

File uploaded but print does not start

  1. The printer is busy with another job — pause/cancel first
  2. The printer is mid-handshake — retry after a few seconds
  3. The slicer used "Upload only" instead of "Send and Print"

G-code is uploaded twice

OrcaSlicer and PrusaSlicer have separate "Send" and "Send and Print" actions. Pressing both in quick succession queues two uploads. The second one fails because the printer is already starting the first.

Slicer-specific tips

  • Set the printer model in your slicer to the AnkerMake M5 (or a Marlin clone with the right bed shape). Otherwise the G-code header will not match the printer's expectations and you may see unexpected positioning.
  • Enable thumbnails in the slicer's G-code export so they appear in the History tab and in Apprise notifications.
  • Custom start G-code — feel free to add M115 or M119 will fail (Anker stripped them from their Marlin fork) but standard G28, G29, M104, M140 all work.

API reference

For the underlying endpoint specification (request format, response codes, multipart fields), see API Reference → Slicer integration.

Clone this wiki locally