# Meshtastic Protocol Buffers Generation This internal package manages the generation of Go types from the [official Meshtastic protocol buffer definitions](https://github.com/meshtastic/protobufs). ## Upstream Source The protobuf definitions are included as a git submodule at: ``` protocol/meshtastic/internal/pbgen/upstream ``` Tracked repository: `https://github.com/meshtastic/protobufs.git` ## Generating Go Code To regenerate the Go protobuf types after updating the submodule: ```bash # Update the submodule to latest (optional) git submodule update --remote protocol/meshtastic/internal/pbgen/upstream # Regenerate Go code go generate ./protocol/meshtastic/internal/pbgen ``` ### Requirements - `protoc` (Protocol Buffers compiler) - `protoc-gen-go` (install via `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`) ## Generated Package Generated Go types are placed in: ``` protocol/meshtastic/pb/ ``` Import path: ```go import meshtasticpb "git.maze.io/go/ham/protocol/meshtastic/pb" ``` All Meshtastic protocol buffer messages (Position, User, Data, etc.) are available from this package.