2022-05-01 04:41:22 +00:00
|
|
|
syntax = "proto3";
|
2022-05-01 19:22:54 +00:00
|
|
|
import "telemetry.proto";
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
option java_package = "com.geeksville.mesh";
|
|
|
|
option java_outer_classname = "ConfigProtos";
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
|
|
option go_package = "github.com/meshtastic/gomeshproto";
|
|
|
|
|
|
|
|
message Config {
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message DeviceConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message GpsConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message PowerConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message WiFiConfig {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If set, this node will try to join the specified wifi network and
|
|
|
|
* acquire an address via DHCP
|
|
|
|
*/
|
2022-05-02 00:19:54 +00:00
|
|
|
string wifi_ssid = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-02 00:19:54 +00:00
|
|
|
/*
|
|
|
|
* If set, will be use to authenticate to the named wifi
|
|
|
|
*/
|
|
|
|
string wifi_password = 2;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-02 00:19:54 +00:00
|
|
|
/*
|
|
|
|
* If set, the node will operate as an AP (and DHCP server), otherwise it
|
|
|
|
* will be a station
|
|
|
|
*/
|
|
|
|
bool wifi_ap_mode = 3;
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message DisplayConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message LoRaConfig {
|
|
|
|
|
2022-05-07 03:32:29 +00:00
|
|
|
/*
|
|
|
|
* If zero then, use default max legal continuous power (ie. something that won't
|
|
|
|
* burn out the radio hardware)
|
|
|
|
* In most cases you should use zero here.
|
|
|
|
* Units are in dBm.
|
|
|
|
*/
|
|
|
|
int32 tx_power = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Standard predefined channel settings
|
|
|
|
* Note: these mappings must match ModemConfigChoice in the device code.
|
|
|
|
*/
|
|
|
|
enum ModemConfig {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
VLongSlow = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
LongSlow = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
LongFast = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
MidSlow = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
MidFast = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
ShortSlow = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
ShortFast = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Note: This is the 'old' mechanism for specifying channel parameters.
|
|
|
|
* Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH.
|
|
|
|
* As a heuristic: If bandwidth is specified, do not use modem_config.
|
|
|
|
* Because protobufs take ZERO space when the value is zero this works out nicely.
|
|
|
|
* This value is replaced by bandwidth/spread_factor/coding_rate.
|
|
|
|
* If you'd like to experiment with other options add them to MeshRadio.cpp in the device code.
|
|
|
|
*/
|
|
|
|
ModemConfig modem_config = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Bandwidth in MHz
|
|
|
|
* Certain bandwidth numbers are 'special' and will be converted to the
|
|
|
|
* appropriate floating point value: 31 -> 31.25MHz
|
|
|
|
*/
|
|
|
|
uint32 bandwidth = 6;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A number from 7 to 12.
|
|
|
|
* Indicates number of chirps per symbol as 1<<spread_factor.
|
|
|
|
*/
|
|
|
|
uint32 spread_factor = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The denominator of the coding rate.
|
|
|
|
* ie for 4/8, the value is 8. 5/8 the value is 5.
|
|
|
|
*/
|
|
|
|
uint32 coding_rate = 8;
|
|
|
|
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message ModuleConfig {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message MQTTConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message SerialConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message ExternalNotificationConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message StoreForwardConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message RangeTestConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-05-01 19:22:54 +00:00
|
|
|
* Configuration for both device and environment metrics
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
|
|
|
message TelemetryConfig {
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
|
|
|
* Interval in seconds of how often we should try to send our
|
|
|
|
* device measurements to the mesh
|
|
|
|
*/
|
|
|
|
uint32 device_update_interval = 1;
|
|
|
|
/*
|
|
|
|
* Interval in seconds of how often we should try to send our
|
|
|
|
* environment measurements to the mesh
|
|
|
|
*/
|
|
|
|
uint32 environment_update_interval = 2;
|
|
|
|
/*
|
|
|
|
* Preferences for the Telemetry Module (Environment)
|
|
|
|
* Enable/Disable the telemetry measurement module measurement collection
|
|
|
|
*/
|
|
|
|
bool environment_measurement_enabled = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Enable/Disable the telemetry measurement module on-device display
|
|
|
|
*/
|
|
|
|
bool environment_screen_enabled = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Sometimes sensor reads can fail.
|
|
|
|
* If this happens, we will retry a configurable number of attempts,
|
|
|
|
* each attempt will be delayed by the minimum required refresh rate for that sensor
|
|
|
|
*/
|
|
|
|
uint32 environment_read_error_count_threshold = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Sometimes we can end up with more than read_error_count_threshold failures.
|
|
|
|
* In this case, we will stop trying to read from the sensor for a while.
|
|
|
|
* Wait this long until trying to read from the sensor again
|
|
|
|
*/
|
|
|
|
uint32 environment_recovery_interval = 6;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We'll always read the sensor in Celsius, but sometimes we might want to
|
|
|
|
* display the results in Fahrenheit as a "user preference".
|
|
|
|
*/
|
|
|
|
bool environment_display_fahrenheit = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Specify the sensor type
|
|
|
|
*/
|
|
|
|
TelemetrySensorType environment_sensor_type = 8;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
|
|
|
* Specify the peferred GPIO Pin for sensor readings
|
|
|
|
*/
|
|
|
|
uint32 environment_sensor_pin = 9;
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message CannedMessageConfig {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
oneof payloadVariant {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
MQTTConfig mqtt_config = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
SerialConfig serial_config = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
ExternalNotificationConfig external_notification_config = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
StoreForwardConfig store_forward_config = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
RangeTestConfig range_test_config = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
TelemetryConfig telemetry_config = 6;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
CannedMessageConfig canned_message_config = 7;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
oneof payloadVariant {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
DeviceConfig device_config = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
GpsConfig gps_config = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
PowerConfig power_config = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
WiFiConfig wifi_config = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
DisplayConfig display_config = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
LoRaConfig lora_config = 6;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
ModuleConfig module_config = 7;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|