pull/347/head
Sacha Weatherstone 2023-05-20 19:29:34 +10:00
rodzic 4195c6881e
commit 25c319a898
22 zmienionych plików z 303 dodań i 389 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ on:
inputs:
increment_type:
type: choice
description: "Select the type of version increment"
description: Select the type of version increment
required: true
options:
- patch

1
.trunk/.gitignore vendored
Wyświetl plik

@ -5,3 +5,4 @@
plugins
user_trunk.yaml
user.yaml
shims

Wyświetl plik

@ -1,6 +1,6 @@
version: 0.1
cli:
version: 1.7.0
version: 1.9.1
plugins:
sources:
- id: trunk
@ -8,13 +8,13 @@ plugins:
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- yamllint@1.30.0
- buf-lint@1.17.0
- buf-breaking@1.17.0
- yamllint@1.31.0
- buf-lint@1.19.0
- buf-breaking@1.19.0
- actionlint@1.6.24
- markdownlint@0.33.0
- prettier@2.8.7
- gitleaks@8.16.2
- markdownlint@0.34.0
- prettier@2.8.8
- gitleaks@8.16.3
- git-diff-check
runtimes:
enabled:

Wyświetl plik

@ -1,7 +1,3 @@
{
"recommendations": [
"trunk.io",
"pbkit.vscode-pbkit",
"bufbuild.vscode-buf"
]
"recommendations": ["trunk.io", "pbkit.vscode-pbkit", "bufbuild.vscode-buf"]
}

Wyświetl plik

@ -2,18 +2,18 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "AdminProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/channel.proto";
import "meshtastic/config.proto";
import "meshtastic/mesh.proto";
import "meshtastic/module_config.proto";
import "meshtastic/connection_status.proto";
import "meshtastic/deviceonly.proto";
import "meshtastic/mesh.proto";
import "meshtastic/module_config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "AdminProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
@ -21,12 +21,10 @@ import "meshtastic/deviceonly.proto";
* (Prior to 1.2 these operations were done via special ToRadio operations)
*/
message AdminMessage {
/*
* TODO: REPLACE
*/
enum ConfigType {
/*
* TODO: REPLACE
*/
@ -67,40 +65,39 @@ message AdminMessage {
* TODO: REPLACE
*/
enum ModuleConfigType {
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
MQTT_CONFIG = 0;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
SERIAL_CONFIG = 1;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
EXTNOTIF_CONFIG = 2;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
STOREFORWARD_CONFIG = 3;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
RANGETEST_CONFIG = 4;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
TELEMETRY_CONFIG = 5;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
CANNEDMSG_CONFIG = 6;
/*
@ -118,7 +115,6 @@ message AdminMessage {
* TODO: REPLACE
*/
oneof payload_variant {
/*
* Send the specified channel in the response to this message
* NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
@ -126,28 +122,28 @@ message AdminMessage {
uint32 get_channel_request = 1;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
Channel get_channel_response = 2;
/*
* Send the current owner data in the response to this message.
*/
* Send the current owner data in the response to this message.
*/
bool get_owner_request = 3;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
User get_owner_response = 4;
/*
* Ask for the following config data to be sent
*/
* Ask for the following config data to be sent
*/
ConfigType get_config_request = 5;
/*
* Send the current Config in the response to this message.
*/
* Send the current Config in the response to this message.
*/
Config get_config_response = 6;
/*
@ -176,8 +172,8 @@ message AdminMessage {
bool get_device_metadata_request = 12;
/*
* Device metadata response
*/
* Device metadata response
*/
DeviceMetadata get_device_metadata_response = 13;
/*
@ -209,10 +205,10 @@ message AdminMessage {
* Get the mesh's nodes with their available gpio pins for RemoteHardware module use
*/
bool get_node_remote_hardware_pins_request = 19;
/*
* Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use
*/
*/
NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20;
/*
@ -221,12 +217,12 @@ message AdminMessage {
User set_owner = 32;
/*
* Set channels (using the new API).
* A special channel is the "primary channel".
* The other records are secondary channels.
* Note: only one channel can be marked as primary.
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
*/
* Set channels (using the new API).
* A special channel is the "primary channel".
* The other records are secondary channels.
* Note: only one channel can be marked as primary.
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
*/
Channel set_channel = 33;
/*
@ -254,7 +250,7 @@ message AdminMessage {
* This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
*/
bool begin_edit_settings = 64;
/*
* Commits an open transaction for any edits made to config, module config, owner, and channel settings
*/
@ -321,12 +317,12 @@ message HamParameters {
string short_name = 4;
}
/*
/*
* Response envelope for node_remote_hardware_pins
*/
message NodeRemoteHardwarePinsResponse {
/*
/*
* Nodes and their respective remote hardware GPIO pins
*/
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1;
}
}

Wyświetl plik

@ -2,16 +2,15 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "AppOnlyProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/channel.proto";
import "meshtastic/config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "AppOnlyProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* This is the most compact possible representation for a set of channels.
* It includes only one PRIMARY channel (which must be first) and
@ -20,7 +19,6 @@ import "meshtastic/config.proto";
* This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
*/
message ChannelSet {
/*
* Channel list with settings
*/

Wyświetl plik

@ -2,17 +2,16 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "CannedMessageConfigProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "CannedMessageConfigProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* Canned message module configuration.
*/
message CannedMessageModuleConfig {
/*
* Predefined messages for canned message module separated by '|' characters.
*/

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "ChannelProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ChannelProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
@ -26,7 +26,6 @@ option swift_prefix = "";
* explain how remote settings and remote gpio are managed as an example
*/
message ChannelSettings {
/*
* Deprecated in favor of LoraConfig.channel_num
*/
@ -88,7 +87,6 @@ message ChannelSettings {
* A pair of a channel number, mode and the (sharable) settings for that channel
*/
message Channel {
/*
* How this channel is being used (or not).
* Note: this field is an enum to give us options for the future.
@ -101,7 +99,6 @@ message Channel {
* (but any number of SECONDARY channels can't be sent received on that common frequency)
*/
enum Role {
/*
* This channel is not in use right now
*/

Wyświetl plik

@ -2,15 +2,14 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "ClientOnlyProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/localonly.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ClientOnlyProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* This abstraction is used to contain any configuration for provisioning a node on any client.
* It is useful for importing and exporting configurations.
@ -40,4 +39,4 @@ message DeviceProfile {
* The ModuleConfig of the node
*/
optional LocalModuleConfig module_config = 5;
}
}

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "ConfigProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ConfigProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
message Config {
@ -17,39 +17,38 @@ message Config {
* Defines the device's role on the Mesh network
*/
enum Role {
/*
* Client device role
*/
CLIENT = 0;
/*
* Client Mute device role
* Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh.
*/
CLIENT_MUTE = 1;
/*
* Router device role.
* Mesh packets will prefer to be routed over this node. This node will not be used by client apps.
* Mesh packets will prefer to be routed over this node. This node will not be used by client apps.
* The wifi/ble radios and the oled screen will be put to sleep.
* This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh.
*/
ROUTER = 2;
/*
* Router Client device role
* Mesh packets will prefer to be routed over this node. The Router Client can be used as both a Router and an app connected Client.
*/
ROUTER_CLIENT = 3;
ROUTER_CLIENT = 3;
/*
* Repeater device role
* Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry
* or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate.
* or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate.
*/
REPEATER = 4;
/*
* Tracker device role
* Position Mesh packets will be prioritized higher and sent more frequently by default.
@ -153,60 +152,60 @@ message Config {
* Required for compilation
*/
UNSET = 0x0000;
/*
* Include an altitude value (if available)
*/
ALTITUDE = 0x0001;
ALTITUDE = 0x0001;
/*
* Altitude value is MSL
*/
ALTITUDE_MSL = 0x0002;
ALTITUDE_MSL = 0x0002;
/*
* Include geoidal separation
*/
GEOIDAL_SEPARATION = 0x0004;
GEOIDAL_SEPARATION = 0x0004;
/*
* Include the DOP value ; PDOP used by default, see below
*/
DOP = 0x0008;
DOP = 0x0008;
/*
* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP
*/
HVDOP = 0x0010;
HVDOP = 0x0010;
/*
* Include number of "satellites in view"
*/
SATINVIEW = 0x0020;
/*
* Include a sequence number incremented per packet
*/
SEQ_NO = 0x0040;
SEQ_NO = 0x0040;
/*
* Include positional timestamp (from GPS solution)
*/
TIMESTAMP = 0x0080;
/*
* Include positional heading
* Intended for use with vehicle not walking speeds
* walking speeds are likely to be error prone like the compass
*/
HEADING = 0x0100;
HEADING = 0x0100;
/*
* Include positional speed
* Intended for use with vehicle not walking speeds
* walking speeds are likely to be error prone like the compass
*/
SPEED = 0x0200;
SPEED = 0x0200;
}
/*
@ -238,7 +237,7 @@ message Config {
* or a very large value (maxint) to update only once at boot.
*/
uint32 gps_update_interval = 5;
/*
* How long should we try to get our position during each gps_update_interval attempt? (in seconds)
* Or if zero, use the default of 30 seconds.
@ -246,7 +245,7 @@ message Config {
* window.
*/
uint32 gps_attempt_time = 6;
/*
* Bit field of boolean configuration options for POSITION messages
* (bitwise OR of PositionFlags)
@ -257,12 +256,12 @@ message Config {
* (Re)define GPS_RX_PIN for your board.
*/
uint32 rx_gpio = 8;
/*
* (Re)define GPS_TX_PIN for your board.
*/
uint32 tx_gpio = 9;
/*
* The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled
*/
@ -279,7 +278,6 @@ message Config {
* See [Power Config](/docs/settings/config/power) for additional power config details.
*/
message PowerConfig {
/*
* If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in
* we should try to minimize power consumption as much as possible.
@ -310,12 +308,12 @@ message Config {
/*
* Mesh Super Deep Sleep Timeout Seconds
* While in Light Sleep if this value is exceeded we will lower into super deep sleep
* While in Light Sleep if this value is exceeded we will lower into super deep sleep
* for sds_secs (default 1 year) or a button press
* 0 for default of two hours, MAXUINT for disabled
*/
uint32 mesh_sds_timeout_secs = 5;
/*
* Super Deep Sleep Seconds
* While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep
@ -323,7 +321,7 @@ message Config {
* 0 for default of one year
*/
uint32 sds_secs = 6;
/*
* Light Sleep Seconds
* In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on
@ -331,21 +329,19 @@ message Config {
* 0 for default of 300
*/
uint32 ls_secs = 7;
/*
* Minimum Wake Seconds
* While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value
* 0 for default of 10 seconds
*/
uint32 min_wake_secs = 8;
}
/*
* Network Config
*/
message NetworkConfig {
enum AddressMode {
/*
* obtain ip address via DHCP
@ -384,7 +380,7 @@ message Config {
* Enable WiFi (disables Bluetooth)
*/
bool wifi_enabled = 1;
/*
* If set, this node will try to join the specified wifi network and
* acquire an address via DHCP
@ -430,7 +426,6 @@ message Config {
* How the GPS coordinates are displayed on the OLED screen.
*/
enum GpsCoordinateFormat {
/*
* GPS coordinates are displayed in the normal decimal degrees format:
* DD.DDDDDD DDD.DDDDDD
@ -473,7 +468,6 @@ message Config {
* Unit display preference
*/
enum DisplayUnits {
/*
* Metric (Default)
*/
@ -484,22 +478,21 @@ message Config {
*/
IMPERIAL = 1;
}
/*
* Override OLED outo detect with this if it fails.
*/
enum OledType {
/*
* Default / Auto
*/
OLED_AUTO = 0;
/*
* Default / Auto
*/
OLED_SSD1306 = 1;
/*
* Default / Auto
*/
@ -527,9 +520,9 @@ message Config {
* Potentially useful for devices without user buttons.
*/
uint32 auto_screen_carousel_secs = 3;
/*
* If this is set, the displayed compass will always point north. if unset, the old behaviour
* If this is set, the displayed compass will always point north. if unset, the old behaviour
* (top of display is heading direction) is used.
*/
bool compass_north_top = 4;
@ -543,7 +536,7 @@ message Config {
* Perferred display units
*/
DisplayUnits units = 6;
/*
* Override auto-detect in screen
*/
@ -554,12 +547,12 @@ message Config {
* Default. The old style for the 128x64 OLED screen
*/
DEFAULT = 0;
/*
* Rearrange display elements to cater for bicolor OLED displays
*/
TWOCOLOR = 1;
/*
* Same as TwoColor, but with inverted top bar. Not so good for Epaper displays
*/
@ -590,9 +583,7 @@ message Config {
* Lora Config
*/
message LoRaConfig {
enum RegionCode {
/*
* Region is not set
*/
@ -679,7 +670,6 @@ message Config {
* Note: these mappings must match ModemPreset Choice in the device code.
*/
enum ModemPreset {
/*
* Long Range - Fast
*/
@ -784,7 +774,7 @@ message Config {
* burn out the radio hardware)
* In most cases you should use zero here.
* Units are in dBm.
*/
*/
int32 tx_power = 10;
/*
@ -799,15 +789,15 @@ message Config {
uint32 channel_num = 11;
/*
* If true, duty cycle limits will be exceeded and thus you're possibly not following
* If true, duty cycle limits will be exceeded and thus you're possibly not following
* the local regulations if you're not a HAM.
* Has no effect if the duty cycle of the used region is 100%.
*/
bool override_duty_cycle = 12;
* Has no effect if the duty cycle of the used region is 100%.
*/
bool override_duty_cycle = 12;
/*
* If true, sets RX boosted gain mode on SX126X based radios
*/
*/
bool sx126x_rx_boosted_gain = 13;
/*
@ -825,11 +815,9 @@ message Config {
* in ignore_incoming will have packets they send dropped on receive (by router.cpp)
*/
repeated uint32 ignore_incoming = 103;
}
message BluetoothConfig {
enum PairingMode {
/*
* Device generates a random PIN that will be shown on the screen of the device for pairing
@ -861,14 +849,12 @@ message Config {
* Specified PIN for PairingMode.FixedPin
*/
uint32 fixed_pin = 3;
}
/*
* Payload Variant
*/
oneof payload_variant {
DeviceConfig device = 1;
PositionConfig position = 2;
PowerConfig power = 3;
@ -876,6 +862,5 @@ message Config {
DisplayConfig display = 5;
LoRaConfig lora = 6;
BluetoothConfig bluetooth = 7;
}
}

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "ConnStatusProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ConnStatusProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
message DeviceConnectionStatus {
@ -39,7 +39,7 @@ message WifiConnectionStatus {
NetworkConnectionStatus status = 1;
/*
* WiFi access point SSID
* WiFi access point SSID
*/
string ssid = 2;
@ -56,7 +56,7 @@ message EthernetConnectionStatus {
/*
* Connection status
*/
NetworkConnectionStatus status = 1;
NetworkConnectionStatus status = 1;
}
/*
@ -67,7 +67,7 @@ message NetworkConnectionStatus {
* IP address of device
*/
fixed32 ip_address = 1;
/*
* Whether the device has an active connection or not
*/
@ -107,7 +107,7 @@ message BluetoothConnectionStatus {
/*
* Serial connection status
*/
message SerialConnectionStatus {
message SerialConnectionStatus {
/*
* Serial baud rate
*/

Wyświetl plik

@ -2,17 +2,17 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "DeviceOnly";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/channel.proto";
import "meshtastic/localonly.proto";
import "meshtastic/mesh.proto";
import "meshtastic/module_config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "DeviceOnly";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* This message is never sent over the wire, but it is used for serializing DB
* state to flash in the device code
@ -21,7 +21,6 @@ import "meshtastic/module_config.proto";
* the receive queue and use the preferences store for the other stuff
*/
message DeviceState {
/*
* Read only settings/info about this node
*/
@ -84,7 +83,6 @@ message DeviceState {
* The on-disk saved channels
*/
message ChannelFile {
/*
* The channels our node knows about
*/
@ -102,7 +100,6 @@ message ChannelFile {
* TODO: REPLACE
*/
enum ScreenFonts {
/*
* TODO: REPLACE
*/
@ -124,7 +121,6 @@ enum ScreenFonts {
* show a secondary bootup screen with custom logo and text for 2.5 seconds.
*/
message OEMStore {
/*
* The Logo width in Px
*/
@ -170,7 +166,6 @@ message OEMStore {
* RemoteHardwarePins associated with a node
*/
message NodeRemoteHardwarePin {
/*
* The node_num exposing the available gpio pin
*/
@ -180,4 +175,4 @@ message NodeRemoteHardwarePin {
* The the available gpio pin for usage with RemoteHardware module
*/
RemoteHardwarePin pin = 2;
}
}

Wyświetl plik

@ -2,15 +2,15 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "LocalOnlyProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/config.proto";
import "meshtastic/module_config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "LocalOnlyProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* Protobuf structures common to apponly.proto and deviceonly.proto
* This is never sent over the wire, only for local use

Wyświetl plik

@ -2,12 +2,6 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "MeshProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/channel.proto";
import "meshtastic/config.proto";
import "meshtastic/module_config.proto";
@ -15,6 +9,12 @@ import "meshtastic/portnums.proto";
import "meshtastic/telemetry.proto";
import "meshtastic/xmodem.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "MeshProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* a gps position
*/
@ -48,7 +48,6 @@ message Position {
* How the location was acquired: manual, onboard GPS, external (EUD) GPS
*/
enum LocSource {
/*
* TODO: REPLACE
*/
@ -80,7 +79,6 @@ message Position {
* Default: same as location_source if present
*/
enum AltSource {
/*
* TODO: REPLACE
*/
@ -209,13 +207,12 @@ message Position {
}
/*
* Note: these enum names must EXACTLY match the string used in the device
* bin/build-all.sh script.
* Because they will be used to find firmware filenames in the android app for OTA updates.
* To match the old style filenames, _ is converted to -, p is converted to .
*/
* Note: these enum names must EXACTLY match the string used in the device
* bin/build-all.sh script.
* Because they will be used to find firmware filenames in the android app for OTA updates.
* To match the old style filenames, _ is converted to -, p is converted to .
*/
enum HardwareModel {
/*
* TODO: REPLACE
*/
@ -272,12 +269,12 @@ enum HardwareModel {
* Sadly they did not update anything on the silkscreen to identify this board
*/
HELTEC_V2_1 = 10;
/*
* Ancient heltec WiFi_Lora_32 board
*/
HELTEC_V1 = 11;
/*
* New T-BEAM with ESP32-S3 CPU
*/
@ -302,7 +299,7 @@ enum HardwareModel {
* TODO: REPLACE
*/
TLORA_T3_S3 = 16;
/*
* B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer
*/
@ -311,8 +308,8 @@ enum HardwareModel {
/*
* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station
*/
STATION_G1 = 25;
STATION_G1 = 25;
/*
* ---------------------------------------------------------------------------
* Less common/prototype boards listed here (needs one more byte over the air)
@ -364,7 +361,7 @@ enum HardwareModel {
* Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3
*/
DR_DEV = 41;
/*
* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/
*/
@ -379,17 +376,17 @@ enum HardwareModel {
* New Heltec Wireless Stick Lite with ESP32-S3 CPU
*/
HELTEC_WSL_V3 = 44;
/*
* New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU
*/
BETAFPV_2400_TX = 45;
/*
* BetaFPV ExpressLRS "Nano" TX Module 900MHz with ESP32 CPU
*/
BETAFPV_900_NANO_TX = 46;
/*
* ------------------------------------------------------------------------------------------------------------------------------------------
* Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
@ -421,7 +418,6 @@ enum HardwareModel {
* 0 through 3 - for future use
*/
message User {
/*
* A globally unique ID string for this user.
* In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>.
@ -467,7 +463,6 @@ message User {
* A message used in our Dynamic Source Routing protocol (RFC 4728 based)
*/
message RouteDiscovery {
/*
* The list of nodenums this packet has visited so far
*/
@ -478,13 +473,11 @@ message RouteDiscovery {
* A Routing control Data packet handled by the routing module
*/
message Routing {
/*
* A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide
* details on the type of failure).
*/
enum Error {
/*
* This message is not a failure
*/
@ -534,7 +527,7 @@ message Routing {
/*
* Cannot send currently because duty cycle regulations will be violated.
*/
DUTY_CYCLE_LIMIT = 9;
DUTY_CYCLE_LIMIT = 9;
/*
* The application layer service on the remote node received your request, but considered your request somehow invalid
@ -549,7 +542,6 @@ message Routing {
}
oneof variant {
/*
* A route request going from the requester
*/
@ -565,7 +557,6 @@ message Routing {
* in addition to ack.fail_id to provide details on the type of failure).
*/
Error error_reason = 3;
}
}
@ -575,15 +566,14 @@ message Routing {
* inside a radio packet (because from/to are broken out by the comms library)
*/
message Data {
/*
* Formerly named typ and of type Type
*/
PortNum portnum = 1;
/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
bytes payload = 2;
/*
@ -625,14 +615,12 @@ message Data {
* a message a heart or poop emoji.
*/
fixed32 emoji = 8;
}
/*
* Waypoint message, used to share arbitrary locations across the mesh
*/
message Waypoint {
/*
* Id of the waypoint
*/
@ -681,7 +669,6 @@ message Waypoint {
* The other fields are either not sent at all, or sent in the special 16 byte LORA header.
*/
message MeshPacket {
/*
* The priority of this message for sending.
* Higher priorities are sent first (when managing the transmit queue).
@ -703,7 +690,6 @@ message MeshPacket {
* And the transmission queue in the router object is now a priority queue.
*/
enum Priority {
/*
* Treated as Priority.DEFAULT
*/
@ -747,7 +733,6 @@ message MeshPacket {
* Identify if this is a delayed packet
*/
enum Delayed {
/*
* If unset, the message is being sent in real time.
*/
@ -799,7 +784,6 @@ message MeshPacket {
*/
oneof payload_variant {
/*
* TODO: REPLACE
*/
@ -876,14 +860,12 @@ message MeshPacket {
* Describe if this message is delayed
*/
Delayed delayed = 13;
}
/*
* Shared constants between device and phone
*/
enum Constants {
/*
* First enum must be zero, and we are just using this enum to
* pass int constants between two very different environments
@ -917,7 +899,6 @@ enum Constants {
* Full information about a node on the mesh
*/
message NodeInfo {
/*
* The node number
*/
@ -941,7 +922,7 @@ message NodeInfo {
float snr = 4;
/*
* TODO: REMOVE/INTEGRATE
* TODO: REMOVE/INTEGRATE
* Returns the last measured frequency error.
* The LoRa receiver estimates the frequency offset between the receiver
* center frequency and that of the received LoRa signal. This function
@ -980,7 +961,6 @@ message NodeInfo {
* local channel index we heard that node on. Only populated if its not the default channel.
*/
uint32 channel = 7;
}
/*
@ -990,7 +970,6 @@ message NodeInfo {
* and we'll try to help.
*/
enum CriticalErrorCode {
/*
* TODO: REPLACE
*/
@ -1059,7 +1038,6 @@ enum CriticalErrorCode {
* Sent to the phone in response to WantNodes.
*/
message MyNodeInfo {
/*
* Tells the phone what our node number is, default starting value is
* lowbyte of macaddr, but it will be fixed if that is already in use
@ -1147,7 +1125,7 @@ message MyNodeInfo {
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/
float channel_utilization = 15;
/*
* Percent of airtime for transmission used within the last hour.
*/
@ -1162,7 +1140,6 @@ message MyNodeInfo {
* and then extend as needed by emitting multiple records.
*/
message LogRecord {
/*
* Log levels, chosen to match python logging conventions.
*/
@ -1245,7 +1222,6 @@ message QueueStatus {
* at which point the next item in the FIFO will be populated.
*/
message FromRadio {
/*
* The packet id, used to allow the phone to request missing read packets from the FIFO,
* see our bluetooth docs
@ -1256,7 +1232,6 @@ message FromRadio {
* Log levels, chosen to match python logging conventions.
*/
oneof payload_variant {
/*
* Log levels, chosen to match python logging conventions.
*/
@ -1327,18 +1302,15 @@ message FromRadio {
}
}
/*
* Packets/commands to the radio will be written (reliably) to the toRadio characteristic.
* Once the write completes the phone can assume it is handled.
*/
message ToRadio {
/*
* Log levels, chosen to match python logging conventions.
*/
oneof payload_variant {
/*
* Send this packet on the mesh
*/
@ -1375,7 +1347,6 @@ message ToRadio {
* Compressed message payload
*/
message Compressed {
/*
* PortNum to determine the how to handle the compressed payload.
*/
@ -1388,42 +1359,42 @@ message Compressed {
}
/*
* Full info on edges for a single node
*/
* Full info on edges for a single node
*/
message NeighborInfo {
/*
* The node ID of the node sending info on its neighbors
*/
* The node ID of the node sending info on its neighbors
*/
uint32 node_id = 1;
/*
* Field to pass neighbor info for the next sending cycle
*/
* Field to pass neighbor info for the next sending cycle
*/
uint32 last_sent_by_id = 2;
/*
* The list of out edges from this node
*/
* The list of out edges from this node
*/
repeated Neighbor neighbors = 3;
}
/*
* A single edge in the mesh
*/
* A single edge in the mesh
*/
message Neighbor {
/*
* Node ID of neighbor
*/
* Node ID of neighbor
*/
uint32 node_id = 1;
/*
* SNR of last heard message
*/
* SNR of last heard message
*/
float snr = 2;
}
/*
* Device metadata response
*/
message DeviceMetadata {
message DeviceMetadata {
/*
* Device firmware version string
*/

Wyświetl plik

@ -2,26 +2,24 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "ModuleConfigProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ModuleConfigProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* Module Config
*/
message ModuleConfig {
/*
* MQTT Client Config
*/
message MQTTConfig {
/*
* If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as
* is_uplink_enabled or is_downlink_enabled.
*/
*/
bool enabled = 1;
/*
@ -73,7 +71,6 @@ message ModuleConfig {
* RemoteHardwareModule Config
*/
message RemoteHardwareConfig {
/*
* Whether the Module is enabled
*/
@ -94,21 +91,20 @@ message ModuleConfig {
* Audio Config for codec2 voice
*/
message AudioConfig {
/*
* Baudrate for codec2 voice
*/
enum Audio_Baud {
CODEC2_DEFAULT = 0;
CODEC2_3200 = 1;
CODEC2_2400 = 2;
CODEC2_1600 = 3;
CODEC2_1400 = 4;
CODEC2_1300 = 5;
CODEC2_1200 = 6;
CODEC2_3200 = 1;
CODEC2_2400 = 2;
CODEC2_1600 = 3;
CODEC2_1400 = 4;
CODEC2_1300 = 5;
CODEC2_1200 = 6;
CODEC2_700 = 7;
CODEC2_700B = 8;
};
CODEC2_700B = 8;
}
/*
* Whether Audio is enabled
@ -150,7 +146,6 @@ message ModuleConfig {
* Serial Config
*/
message SerialConfig {
/*
* TODO: REPLACE
*/
@ -171,7 +166,7 @@ message ModuleConfig {
BAUD_460800 = 13;
BAUD_576000 = 14;
BAUD_921600 = 15;
};
}
/*
* TODO: REPLACE
@ -182,7 +177,7 @@ message ModuleConfig {
PROTO = 2;
TEXTMSG = 3;
NMEA = 4;
};
}
/*
* Preferences for the SerialModule
@ -194,12 +189,12 @@ message ModuleConfig {
* TODO: REPLACE
*/
bool echo = 2;
/*
* TODO: REPLACE
*/
uint32 rxd = 3;
/*
* TODO: REPLACE
*/
@ -214,19 +209,17 @@ message ModuleConfig {
* TODO: REPLACE
*/
uint32 timeout = 6;
/*
* TODO: REPLACE
*/
Serial_Mode mode = 7;
}
/*
* External Notifications Config
*/
message ExternalNotificationConfig {
/*
* Enable the ExternalNotificationModule
*/
@ -321,22 +314,21 @@ message ModuleConfig {
* TODO: REPLACE
*/
bool heartbeat = 2;
/*
* TODO: REPLACE
*/
uint32 records = 3;
/*
* TODO: REPLACE
*/
uint32 history_return_max = 4;
/*
* TODO: REPLACE
*/
uint32 history_return_window = 5;
}
/*
@ -354,7 +346,7 @@ message ModuleConfig {
uint32 sender = 2;
/*
* Bool value indicating that this node should save a RangeTest.csv file.
* Bool value indicating that this node should save a RangeTest.csv file.
* ESP32 Only
*/
bool save = 3;
@ -364,7 +356,6 @@ message ModuleConfig {
* Configuration for both device and environment metrics
*/
message TelemetryConfig {
/*
* Interval in seconds of how often we should try to send our
* device metrics to the mesh
@ -411,47 +402,45 @@ message ModuleConfig {
* TODO: REPLACE
*/
message CannedMessageConfig {
/*
* TODO: REPLACE
*/
enum InputEventChar {
/*
* TODO: REPLACE
*/
NONE = 0;
NONE = 0;
/*
* TODO: REPLACE
*/
UP = 17;
UP = 17;
/*
* TODO: REPLACE
*/
DOWN = 18;
DOWN = 18;
/*
* TODO: REPLACE
*/
LEFT = 19;
LEFT = 19;
/*
* TODO: REPLACE
*/
RIGHT = 20;
RIGHT = 20;
/*
* '\n'
*/
SELECT = 10;
/*
* TODO: REPLACE
*/
BACK = 27;
BACK = 27;
/*
* TODO: REPLACE
*/
@ -467,48 +456,48 @@ message ModuleConfig {
* GPIO pin for rotary encoder A port.
*/
uint32 inputbroker_pin_a = 2;
/*
* GPIO pin for rotary encoder B port.
*/
uint32 inputbroker_pin_b = 3;
/*
* GPIO pin for rotary encoder Press port.
*/
uint32 inputbroker_pin_press = 4;
/*
* Generate input event on CW of this kind.
*/
InputEventChar inputbroker_event_cw = 5;
/*
* Generate input event on CCW of this kind.
*/
InputEventChar inputbroker_event_ccw = 6;
/*
* Generate input event on Press of this kind.
*/
InputEventChar inputbroker_event_press = 7;
/*
* Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker.
*/
bool updown1_enabled = 8;
/*
* Enable/disable CannedMessageModule.
*/
bool enabled = 9;
/*
* Input event origin accepted by the canned message module.
* Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any"
*/
string allow_input_source = 10;
/*
* CannedMessageModule also sends a bell character with the messages.
* ExternalNotificationModule can benefit from this feature.
@ -520,7 +509,6 @@ message ModuleConfig {
* TODO: REPLACE
*/
oneof payload_variant {
/*
* TODO: REPLACE
*/
@ -565,14 +553,13 @@ message ModuleConfig {
* TODO: REPLACE
*/
RemoteHardwareConfig remote_hardware = 9;
}
}
/*
* A GPIO pin definition for remote hardware module
*/
message RemoteHardwarePin {
message RemoteHardwarePin {
/*
* GPIO Pin number (must match Arduino)
*/

Wyświetl plik

@ -2,19 +2,18 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "MQTTProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";
import "meshtastic/mesh.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "MQTTProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
*/
message ServiceEnvelope {
/*
* The (probably encrypted) packet
*/

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "Portnums";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "Portnums";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
@ -23,7 +23,6 @@ option swift_prefix = "";
* This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
*/
enum PortNum {
/*
* Deprecated: do not use in new code (formerly called OPAQUE)
* A message sent from a device outside of the mesh, in a form the mesh does not understand
@ -129,10 +128,10 @@ enum PortNum {
ZPS_APP = 68;
/*
* Used to let multiple instances of Linux native applications communicate
* Used to let multiple instances of Linux native applications communicate
* as if they did using their LoRa chip.
* Maintained by GitHub user GUVWAF.
* Project files at https://github.com/GUVWAF/Meshtasticator
* Maintained by GitHub user GUVWAF.
* Project files at https://github.com/GUVWAF/Meshtasticator
*/
SIMULATOR_APP = 69;

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "RemoteHardware";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "RemoteHardware";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
@ -20,12 +20,10 @@ option swift_prefix = "";
* (a special channel once multichannel support is included?)
*/
message HardwareMessage {
/*
* TODO: REPLACE
*/
enum Type {
/*
* Unset/unused
*/

Wyświetl plik

@ -2,17 +2,16 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "RTTTLConfigProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "RTTTLConfigProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* Canned message module configuration.
*/
message RTTTLConfig {
/*
* Ringtone for PWM Buzzer in RTTTL Format.
*/

Wyświetl plik

@ -2,23 +2,21 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "StoreAndForwardProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "StoreAndForwardProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
* TODO: REPLACE
*/
message StoreAndForward {
/*
* 001 - 063 = From Router
* 064 - 127 = From Client
*/
enum RequestResponse {
/*
* Unset/unused
*/
@ -96,7 +94,6 @@ message StoreAndForward {
* TODO: REPLACE
*/
message Statistics {
/*
* Number of messages we have ever seen
*/
@ -147,7 +144,6 @@ message StoreAndForward {
* TODO: REPLACE
*/
message History {
/*
* Number of that will be sent to the client
*/
@ -168,7 +164,6 @@ message StoreAndForward {
* TODO: REPLACE
*/
message Heartbeat {
/*
* Number of that will be sent to the client
*/

Wyświetl plik

@ -2,10 +2,10 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "TelemetryProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "TelemetryProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
/*
@ -16,7 +16,7 @@ message DeviceMetrics {
* 0-100 (>100 means powered)
*/
uint32 battery_level = 1;
/*
* Voltage measured
*/
@ -26,7 +26,7 @@ message DeviceMetrics {
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/
float channel_utilization = 3;
/*
* Percent of airtime for transmission used within the last hour.
*/
@ -71,7 +71,7 @@ message EnvironmentMetrics {
/*
* Air quality metrics
*/
message AirQualityMetrics {
message AirQualityMetrics {
/*
* Concentration Units Standard PM1.0
*/
@ -165,76 +165,76 @@ message Telemetry {
}
/*
* Supported I2C Sensors for telemetry in Meshtastic
*/
* Supported I2C Sensors for telemetry in Meshtastic
*/
enum TelemetrySensorType {
/*
* No external telemetry sensor explicitly set
*/
* No external telemetry sensor explicitly set
*/
SENSOR_UNSET = 0;
/*
* High accuracy temperature, pressure, humidity
*/
* High accuracy temperature, pressure, humidity
*/
BME280 = 1;
/*
* High accuracy temperature, pressure, humidity, and air resistance
*/
* High accuracy temperature, pressure, humidity, and air resistance
*/
BME680 = 2;
/*
* Very high accuracy temperature
*/
* Very high accuracy temperature
*/
MCP9808 = 3;
/*
* Moderate accuracy current and voltage
*/
* Moderate accuracy current and voltage
*/
INA260 = 4;
/*
* Moderate accuracy current and voltage
*/
* Moderate accuracy current and voltage
*/
INA219 = 5;
/*
* High accuracy temperature and pressure
*/
* High accuracy temperature and pressure
*/
BMP280 = 6;
/*
* High accuracy temperature and humidity
*/
* High accuracy temperature and humidity
*/
SHTC3 = 7;
/*
* High accuracy pressure
*/
* High accuracy pressure
*/
LPS22 = 8;
/*
* 3-Axis magnetic sensor
*/
* 3-Axis magnetic sensor
*/
QMC6310 = 9;
/*
* 6-Axis inertial measurement sensor
*/
* 6-Axis inertial measurement sensor
*/
QMI8658 = 10;
/*
* 3-Axis magnetic sensor
*/
* 3-Axis magnetic sensor
*/
QMC5883L = 11;
/*
* High accuracy temperature and humidity
*/
* High accuracy temperature and humidity
*/
SHT31 = 12;
/*
* PM2.5 air quality sensor
*/
PMSA003I = 13;
};
}

Wyświetl plik

@ -2,21 +2,21 @@ syntax = "proto3";
package meshtastic;
option java_package = "com.geeksville.mesh";
option java_outer_classname = "XmodemProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "XmodemProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";
message XModem {
enum Control {
NUL = 0;
SOH = 1;
STX = 2;
EOT = 4;
ACK = 6;
NAK = 21;
CAN = 24;
NUL = 0;
SOH = 1;
STX = 2;
EOT = 4;
ACK = 6;
NAK = 21;
CAN = 24;
CTRLZ = 26;
}
@ -24,4 +24,4 @@ message XModem {
uint32 seq = 2;
uint32 crc16 = 3;
bytes buffer = 4;
}
}