Update docs and prune examples superseded by real functionality
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.
This commit is contained in:
@@ -11,11 +11,12 @@ 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"
|
||||
# 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"
|
||||
|
||||
Reference in New Issue
Block a user