@@ -3,6 +3,8 @@ syntax = "proto3";
33package meshtastic ;
44
55import "meshtastic/atak.proto" ;
6+ import "meshtastic/channel.proto" ;
7+ import "meshtastic/config.proto" ;
68
79option csharp_namespace = "Meshtastic.Protobufs" ;
810option go_package = "github.com/meshtastic/go/generated" ;
@@ -827,6 +829,141 @@ message ModuleConfig {
827829 string node_status = 1 ;
828830 }
829831
832+ /*
833+ * MeshBeacon module config
834+ */
835+ message MeshBeaconConfig {
836+ /*
837+ * Boolean options for the beacon module, packed into the `flags` bitfield below.
838+ * OR the FLAG_* values together; a flag is on when its bit is set.
839+ */
840+ enum Flags {
841+ /*
842+ * No options enabled.
843+ */
844+ FLAG_NONE = 0 ;
845+
846+ /*
847+ * Enable receiving MESH_BEACON_APP packets from other nodes.
848+ * The text portion is delivered to the local message inbox.
849+ * Offered channel/preset are stored for the client app to act on.
850+ */
851+ FLAG_LISTEN_ENABLED = 1 ;
852+
853+ /*
854+ * Enable periodically broadcasting MESH_BEACON_APP packets from this node.
855+ */
856+ FLAG_BROADCAST_ENABLED = 2 ;
857+
858+ /*
859+ * When both text and offer content are present, split the beacon into a separate
860+ * MESH_BEACON_APP (offer only) and TEXT_MESSAGE_APP (text only) packet, so firmware
861+ * that only decodes TEXT_MESSAGE_APP still receives the human-readable text.
862+ */
863+ FLAG_LEGACY_SPLIT = 4 ;
864+ }
865+
866+ /*
867+ * Bitwise-OR of Flags values (listen / broadcast / legacy-split toggles).
868+ */
869+ uint32 flags = 1 ;
870+
871+ /*
872+ * Optional: node ID to send beacon messages AS.
873+ * When set, the `from` field of outgoing beacon packets is set to this node ID,
874+ * making beacons appear to originate from that node.
875+ * When unset (0), beacons are sent as the local node.
876+ * A remote admin can only set this field to their own node ID.
877+ */
878+ uint32 broadcast_send_as_node = 3 ;
879+
880+ /*
881+ * Message to include in each beacon broadcast. Max 100 bytes enforced by firmware.
882+ */
883+ string broadcast_message = 4 ;
884+
885+ /*
886+ * Optional channel (name + PSK) to advertise in the MeshBeacon offer_channel field.
887+ */
888+ ChannelSettings broadcast_offer_channel = 5 ;
889+
890+ /*
891+ * Optional region to advertise in the MeshBeacon offer_region field.
892+ */
893+ Config.LoRaConfig.RegionCode broadcast_offer_region = 6 ;
894+
895+ /*
896+ * Optional modem preset to advertise in the MeshBeacon offer_preset field.
897+ */
898+ optional Config.LoRaConfig.ModemPreset broadcast_offer_preset = 7 ;
899+
900+ /*
901+ * Single-target TX channel: channel settings (name + PSK) to send beacons on.
902+ * If unset, beacons go out on the primary channel. Used only when broadcast_targets is empty.
903+ * NOTE: the single-target path embeds the ChannelSettings inline here, whereas a
904+ * broadcast_targets entry references a channel-table slot by channel_index instead — see
905+ * BroadcastTarget. The two paths are equal, first-class options; only this representation differs.
906+ */
907+ ChannelSettings broadcast_on_channel = 8 ;
908+
909+ /*
910+ * Region to use when sending beacons on broadcast_on_preset.
911+ */
912+ Config.LoRaConfig.RegionCode broadcast_on_region = 9 ;
913+
914+ /*
915+ * Modem preset to use when sending beacons.
916+ * If different from current config, the radio is temporarily switched for TX.
917+ */
918+ optional Config.LoRaConfig.ModemPreset broadcast_on_preset = 10 ;
919+
920+ /*
921+ * How often to broadcast, in seconds. Min 3600 (1 h), default 3600.
922+ */
923+ uint32 broadcast_interval_secs = 11 ;
924+
925+ /*
926+ * One entry in the multi-target broadcast list.
927+ * The broadcaster transmits one beacon copy per entry, each on its own radio settings.
928+ */
929+ message BroadcastTarget {
930+ /*
931+ * Modem preset to use for this target.
932+ * Falls back to the running config preset if unset.
933+ */
934+ optional Config.LoRaConfig.ModemPreset preset = 1 ;
935+
936+ /*
937+ * Region to use for this target. UNSET means use the running config region.
938+ */
939+ Config.LoRaConfig.RegionCode region = 2 ;
940+
941+ // Tag 3 was an embedded ChannelSettings; replaced by channel_index (tag 4) to keep
942+ // ModuleConfig within the BLE FromRadio size budget. Branch unreleased, so tag 3 is a gap.
943+
944+ /*
945+ * Index into the device's channel table (0..MAX_NUM_CHANNELS-1) of the channel to
946+ * transmit this target's beacon on. The referenced channel must already be configured
947+ * on the node (its key is needed to encrypt). If unset, the default channel for the
948+ * preset is used.
949+ */
950+ optional uint32 channel_index = 4 ;
951+ }
952+
953+ /*
954+ * Multi-target broadcast list.
955+ * When non-empty the broadcaster transmits one beacon copy per entry in sequence,
956+ * each temporarily switching the radio to that entry's preset/region/channel.
957+ * When empty, the broadcaster uses the scalar broadcast_on_preset / broadcast_on_region /
958+ * broadcast_on_channel fields instead (the single-target path).
959+ * Single- and multi-target are equal, first-class options — neither is preferred or
960+ * deprecated. They differ only in how the TX channel is named: broadcast_on_channel embeds a
961+ * ChannelSettings inline, while a target references an existing channel-table slot by
962+ * channel_index (see BroadcastTarget).
963+ */
964+ repeated BroadcastTarget broadcast_targets = 13 ;
965+ }
966+
830967 /*
831968 * TODO: REPLACE
832969 */
@@ -910,6 +1047,11 @@ message ModuleConfig {
9101047 * TAK team/role configuration for TAK_TRACKER
9111048 */
9121049 TAKConfig tak = 16 ;
1050+
1051+ /*
1052+ * MeshBeacon module config
1053+ */
1054+ MeshBeaconConfig mesh_beacon = 17 ;
9131055 }
9141056
9151057 /*
0 commit comments