README/certs/README/.env.example/printers.example.toml were all still describing this as a learning-stage stub with no real printer protocol clients - rewritten to reflect the real Bambu MQTT client, cert auto-pinning, and marlin serial connection that now exist. - Remove examples/fetch_bambu_cert.rs: its manual fetch-and-save workflow is now what BambuPrinter::connect()'s ensure_trusted does automatically on every connect, so it has no remaining use case. - Fix examples/printer_polymorphism.rs, which no longer compiled - dispatch_gcode was replaced by real methods earlier this session; swapped in print_status() as the vendor-only-extension example. - Remove Config::bambu_ca_cert_overrides/bambu_require_valid_cert and the .env vars documenting them - confirmed dead (nothing read them), fully superseded by printers.toml's per-printer ca_cert_path/ require_valid_cert plus automatic trust-on-first-connect pinning. - Fix stale doc comments in printer/mod.rs and printer/bambu.rs that described certificate trust and MQTT as not built yet, or referencing the now-removed example. No behavior change in the daemon itself - verified with cargo build --examples and a live run of printer_polymorphism and auto_connect_bambu against the real P1P/H2C printers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
53 lines
1.8 KiB
TOML
53 lines
1.8 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)
|
|
# No ca_cert_path needed even though P1P doesn't chain to the bundled CA -
|
|
# `connect()` auto-pins a certificate via trust-on-first-connect the first
|
|
# time it can't verify against the bundled one, and saves it under
|
|
# certs/pinned/<sn>.pem for every run after that (see BambuPrinter::
|
|
# ensure_trusted's doc comment). Only set ca_cert_path explicitly if you
|
|
# want to point at a certificate you've captured/vetted some other way.
|
|
|
|
[[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
|