- GenericPrinter grows upload_project_file, send_gcode_line, and a generic upload_gcode<P> driver that streams a whole gcode file line by line through any vendor's send_gcode_line. - PrusaSerialPrinter's connect/send_gcode_line are real (not stubs): a held-open MarlinSerialConnection (src/printer/marlin_serial.rs) writes each line and waits for Marlin's "ok" before sending the next. Config changed from com_port: i16 to port: String + baud_rate: u32 to hold a real device path. - Bambu: BambuGenericPrinter + BambuV1Printer/BambuV2Printer collapsed into one BambuPrinter, since which MQTT/BambuMQTT version (v3.1.1/v1 vs v5/v2) a printer speaks is discovered at connect() time (or forced), not something config should pick a type for - the same physical printer can change after a firmware update. printers.toml gets a new "bambu" vendor (auto-detect, the default) alongside bambu_v1/bambu_v2 (force a specific one). - Bambu's gcode_line request is now built for real via continuum-schema-instance against continuum-schemas' JSON Schema, picking the v1 or v2 schema directory based on the detected protocol version, instead of a hand-written serde struct. - Added rumqttc as a dependency (not wired up yet - the real MQTT v5-then-v3.1.1 fallback connect and the publish/receive plumbing are still stubs).
52 lines
1.7 KiB
TOML
52 lines
1.7 KiB
TOML
# Copy this file to printers.toml (gitignored) and fill in your real
|
|
# printers. See src/fleet.rs for the loader, examples/test_bambu_certs.rs
|
|
# for a way to test a Bambu printer's certificate against this config.
|
|
|
|
[[printer]]
|
|
id = "p1p"
|
|
name = "P1P"
|
|
# Forced instead of "bambu" here since this one's a known-old printer -
|
|
# see fleet.rs's PrinterEntry doc comment for the full vendor list.
|
|
vendor = "bambu_v1"
|
|
host = "192.168.1.50"
|
|
access_code = "REPLACE_WITH_ACCESS_CODE"
|
|
sn = "REPLACE_WITH_SERIAL_NUMBER" # printer screen > Settings > Device (used for MQTT topics later)
|
|
# P1P doesn't chain to the bundled CA - point this at a cert you've
|
|
# downloaded from the printer itself. Leave unset to use the bundled CA.
|
|
# `cargo run --example fetch_bambu_cert -- p1p ./certs/p1p.pem` can fetch it
|
|
# for you (trust-on-first-connect - see that example's doc comment).
|
|
ca_cert_path = "./certs/p1p.pem"
|
|
|
|
[[printer]]
|
|
id = "h2c"
|
|
name = "H2C"
|
|
# "bambu" auto-detects MQTT v5-vs-v3.1.1 (BambuMQTT v2-vs-v1) on connect -
|
|
# the recommended default, since a firmware update can change which one a
|
|
# given printer speaks without you knowing ahead of time.
|
|
vendor = "bambu"
|
|
host = "192.168.1.51"
|
|
access_code = "REPLACE_WITH_ACCESS_CODE"
|
|
sn = "REPLACE_WITH_SERIAL_NUMBER"
|
|
# No ca_cert_path - current-generation printers verify against the bundled
|
|
# CA (certs/bambu_ca2.pem) fine.
|
|
|
|
# [[printer]]
|
|
# id = "voron"
|
|
# name = "Voron 2.4"
|
|
# vendor = "klipper"
|
|
# host = "192.168.1.52"
|
|
|
|
# [[printer]]
|
|
# id = "mk4"
|
|
# name = "MK4"
|
|
# vendor = "prusa_link"
|
|
# host = "192.168.1.53"
|
|
# api_key = "REPLACE_WITH_API_KEY"
|
|
|
|
# [[printer]]
|
|
# id = "mk3s"
|
|
# name = "MK3S+"
|
|
# vendor = "prusa_serial"
|
|
# port = "/dev/ttyACM0"
|
|
# baud_rate = 115200 # optional, defaults to 115200
|