99c1d038f9
The rest of proto/bambulab/ was pure boilerplate/comments with nothing concrete to copy from. This one message (sequence_id + command, matching Bambu's real get_version request) is wired all the way through: real proto, real generated Rust struct, lib.rs actually include!'d instead of commented out. continuum-proxy's bambu_protocol_demo example serializes it and diffs the output against Bambu's actual wire JSON byte for byte. Verified with cargo build (this crate) and cargo run --example bambu_protocol_demo (continuum-proxy) - output matches exactly.
24 lines
679 B
Protocol Buffer
24 lines
679 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package bambulab.v1;
|
|
|
|
// One real, fully-wired example — copy this shape for every other command
|
|
// (pushing/pushall, print control, etc.). sequence_id is `string`, not
|
|
// int64: Bambu sends it as a JSON string ("0"), and this crosses the wire
|
|
// as JSON over MQTT, not binary protobuf — the Rust type needs to match
|
|
// what serde_json actually produces, not what "feels more correct" for a
|
|
// counter.
|
|
message InfoCommand {
|
|
string sequence_id = 1;
|
|
string command = 2;
|
|
}
|
|
|
|
// Add your next message here, e.g.:
|
|
//
|
|
// message PushingCommand {
|
|
// string sequence_id = 1;
|
|
// string command = 2;
|
|
// int32 version = 3;
|
|
// int32 push_target = 4;
|
|
// }
|