2022-05-01 04:41:22 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
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 {
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Configuration
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
|
|
|
message DeviceConfig {
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* Defines the device's role on the Mesh network
|
|
|
|
*/
|
|
|
|
enum Role {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Client device role
|
|
|
|
*/
|
|
|
|
Client = 0;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Client Mute device role
|
|
|
|
* Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh.
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
ClientMute = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Router device role.
|
2022-06-20 17:47:30 +00:00
|
|
|
* 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.
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
Router = 2;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* 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.
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
RouterClient = 3;
|
|
|
|
|
|
|
|
}
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* Sets the role of node
|
|
|
|
*/
|
|
|
|
Role role = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* If set, this will disable the SerialConsole by not initilizing the StreamAPI
|
|
|
|
*/
|
|
|
|
bool serial_disabled = 2;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* This setting is never saved to disk, but if set, all device settings will be returned to factory defaults.
|
|
|
|
*/
|
|
|
|
bool factory_reset = 3;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
|
|
|
* Set this to true to leave the debug log outputting even when API is active.
|
|
|
|
*/
|
|
|
|
bool debug_log_enabled = 4;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-11 08:29:36 +00:00
|
|
|
/*
|
|
|
|
* NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org`
|
|
|
|
*/
|
|
|
|
string ntp_server = 5;
|
|
|
|
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Position Config
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
message PositionConfig {
|
|
|
|
/*
|
|
|
|
* Bit field of boolean configuration options, indicating which optional
|
|
|
|
* fields to include when assembling POSITION messages
|
|
|
|
* Longitude and latitude are always included (also time if GPS-synced)
|
|
|
|
* NOTE: the more fields are included, the larger the message will be -
|
|
|
|
* leading to longer airtime and a higher risk of packet loss
|
|
|
|
*/
|
|
|
|
enum PositionFlags {
|
|
|
|
/*
|
|
|
|
* Required for compilation
|
|
|
|
*/
|
|
|
|
POS_UNDEFINED = 0x0000;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Include an altitude value (if available)
|
|
|
|
*/
|
|
|
|
POS_ALTITUDE = 0x0001;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Altitude value is MSL
|
|
|
|
*/
|
|
|
|
POS_ALT_MSL = 0x0002;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Include geoidal separation
|
|
|
|
*/
|
|
|
|
POS_GEO_SEP = 0x0004;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Include the DOP value ; PDOP used by default, see below
|
|
|
|
*/
|
|
|
|
POS_DOP = 0x0008;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP
|
|
|
|
*/
|
|
|
|
POS_HVDOP = 0x0010;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Include number of "satellites in view"
|
|
|
|
*/
|
2022-05-13 00:40:46 +00:00
|
|
|
POS_SATINVIEW = 0x0020;
|
2022-05-07 07:48:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Include a sequence number incremented per packet
|
|
|
|
*/
|
2022-05-13 00:40:46 +00:00
|
|
|
POS_SEQ_NOS = 0x0040;
|
2022-05-07 07:48:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Include positional timestamp (from GPS solution)
|
|
|
|
*/
|
2022-05-13 00:40:46 +00:00
|
|
|
POS_TIMESTAMP = 0x0080;
|
2022-06-18 03:09:09 +00:00
|
|
|
|
2022-06-18 01:44:42 +00:00
|
|
|
/*
|
2022-06-18 04:12:31 +00:00
|
|
|
* Include positional heading
|
2022-06-19 16:59:12 +00:00
|
|
|
* Intended for use with vehicle not walking speeds
|
2022-06-18 04:12:31 +00:00
|
|
|
* walking speeds are likely to be error prone like the compass
|
2022-06-18 03:09:38 +00:00
|
|
|
*/
|
2022-06-18 03:46:01 +00:00
|
|
|
POS_HEADING = 0x0100;
|
2022-06-18 03:09:09 +00:00
|
|
|
|
2022-06-18 01:44:42 +00:00
|
|
|
/*
|
2022-06-18 04:12:31 +00:00
|
|
|
* Include positional speed
|
2022-06-19 16:59:12 +00:00
|
|
|
* Intended for use with vehicle not walking speeds
|
2022-06-18 04:12:31 +00:00
|
|
|
* walking speeds are likely to be error prone like the compass
|
2022-06-18 01:44:42 +00:00
|
|
|
*/
|
2022-06-18 03:46:01 +00:00
|
|
|
POS_SPEED = 0x0200;
|
2022-05-07 07:48:51 +00:00
|
|
|
}
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* We should send our position this often (but only if it has changed significantly)
|
|
|
|
* Defaults to 15 minutes
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
uint32 position_broadcast_secs = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-02 00:19:54 +00:00
|
|
|
/*
|
2022-05-21 18:47:04 +00:00
|
|
|
* Disable adaptive position braoadcast, which is now the default.
|
2022-05-02 00:19:54 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
bool position_broadcast_smart_disabled = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If set, this node is at a fixed position.
|
|
|
|
* We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node.
|
|
|
|
* The lat/lon/alt can be set by an internal GPS or with the help of the app.
|
|
|
|
*/
|
|
|
|
bool fixed_position = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Should the GPS be disabled for this node?
|
|
|
|
*/
|
|
|
|
bool gps_disabled = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* How often should we try to get GPS position (in seconds)
|
|
|
|
* or zero for the default of once every 30 seconds
|
|
|
|
* or a very large value (maxint) to update only once at boot.
|
|
|
|
*/
|
|
|
|
uint32 gps_update_interval = 6;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-02 00:19:54 +00:00
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* 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.
|
|
|
|
* If we don't get a new gps fix in that time, the gps will be put into sleep until the next gps_update_rate
|
|
|
|
* window.
|
|
|
|
*/
|
|
|
|
uint32 gps_attempt_time = 7;
|
2022-08-06 05:52:04 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* Bit field of boolean configuration options for POSITION messages
|
|
|
|
* (bitwise OR of PositionFlags)
|
|
|
|
*/
|
|
|
|
uint32 position_flags = 10;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Power Config\
|
|
|
|
* See [power management](/docs/software/other/power) for additional power management state machine option details.
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
message PowerConfig {
|
2022-05-07 03:32:29 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Sets the charge control current of devices with a battery charger that can be configured
|
|
|
|
* **TBEAM 1.1 Only**
|
2022-05-07 03:32:29 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
enum ChargeCurrent {
|
|
|
|
|
|
|
|
MAUnset = 0;
|
|
|
|
MA100 = 1;
|
|
|
|
MA190 = 2;
|
|
|
|
MA280 = 3;
|
|
|
|
MA360 = 4;
|
|
|
|
MA450 = 5;
|
|
|
|
MA550 = 6;
|
|
|
|
MA630 = 7;
|
|
|
|
MA700 = 8;
|
|
|
|
MA780 = 9;
|
|
|
|
MA880 = 10;
|
|
|
|
MA960 = 11;
|
|
|
|
MA1000 = 12;
|
|
|
|
MA1080 = 13;
|
|
|
|
MA1160 = 14;
|
|
|
|
MA1240 = 15;
|
|
|
|
MA1320 = 16;
|
2022-05-07 03:32:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* Sets the current of the battery charger
|
2022-06-14 23:42:04 +00:00
|
|
|
* TBEAM 1.1 Only
|
2022-05-07 03:32:29 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
ChargeCurrent charge_current = 1;
|
2022-05-07 03:32:29 +00:00
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* 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.
|
|
|
|
* YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case).
|
2022-06-20 17:47:30 +00:00
|
|
|
* Advanced Option
|
2022-05-07 03:32:29 +00:00
|
|
|
*/
|
2022-06-12 20:23:18 +00:00
|
|
|
bool is_power_saving = 2;
|
2022-05-07 03:32:29 +00:00
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* If non-zero, the device will fully power off this many seconds after external power is removed.
|
|
|
|
*/
|
|
|
|
uint32 on_battery_shutdown_after_secs = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k)
|
|
|
|
* Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation.
|
2022-06-20 17:47:30 +00:00
|
|
|
* Should be set to floating point value between 2 and 4
|
|
|
|
* Fixes issues on Heltec v2
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
float adc_multiplier_override = 6;
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Wait Bluetooth Seconds
|
2022-06-20 17:47:30 +00:00
|
|
|
* The number of seconds for to wait before turning off BLE in No Bluetooth states
|
2022-05-07 07:48:51 +00:00
|
|
|
* 0 for default of 1 minute
|
|
|
|
*/
|
|
|
|
uint32 wait_bluetooth_secs = 7;
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Mesh Super Deep Sleep Timeout Seconds
|
|
|
|
* 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
|
2022-05-07 07:48:51 +00:00
|
|
|
* 0 for default of two hours, MAXUINT for disabled
|
|
|
|
*/
|
|
|
|
uint32 mesh_sds_timeout_secs = 9;
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Super Deep Sleep Seconds
|
|
|
|
* While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep
|
|
|
|
* for this value (default 1 year) or a button press
|
2022-05-07 07:48:51 +00:00
|
|
|
* 0 for default of one year
|
|
|
|
*/
|
|
|
|
uint32 sds_secs = 10;
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* Light Sleep Seconds
|
|
|
|
* In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on
|
|
|
|
* ESP32 Only
|
2022-06-18 04:12:31 +00:00
|
|
|
* 0 for default of 300
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
uint32 ls_secs = 11;
|
|
|
|
|
|
|
|
/*
|
2022-06-14 23:42:04 +00:00
|
|
|
* 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
|
2022-05-07 07:48:51 +00:00
|
|
|
* 0 for default of 10 seconds
|
2022-05-07 03:32:29 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
uint32 min_wake_secs = 12;
|
2022-05-07 03:32:29 +00:00
|
|
|
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-06-20 18:03:33 +00:00
|
|
|
* WiFi Config
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
message WiFiConfig {
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-08-06 05:59:58 +00:00
|
|
|
enum WiFiMode {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Disables WiFi (re-enables Bluetooth)
|
|
|
|
*/
|
2022-08-06 06:35:06 +00:00
|
|
|
Disabled = 0;
|
2022-08-06 05:59:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This mode is used to connect to an external WiFi network
|
|
|
|
*/
|
|
|
|
Client = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* In this mode the node will operate as an AP (and DHCP server)
|
|
|
|
*/
|
|
|
|
AccessPoint = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If set, the node AP will broadcast as a hidden SSID
|
|
|
|
*/
|
|
|
|
AccessPointHidden = 3;
|
|
|
|
}
|
|
|
|
|
2022-05-01 04:41:22 +00:00
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* If set, this node will try to join the specified wifi network and
|
|
|
|
* acquire an address via DHCP
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-08-06 05:59:58 +00:00
|
|
|
WiFiMode mode = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-08-06 05:59:58 +00:00
|
|
|
* If set, this node will try to join the specified wifi network and
|
|
|
|
* acquire an address via DHCP
|
2022-08-04 08:11:18 +00:00
|
|
|
*/
|
2022-08-06 05:59:58 +00:00
|
|
|
string ssid = 2;
|
2022-05-22 00:03:09 +00:00
|
|
|
|
|
|
|
/*
|
2022-08-06 05:59:58 +00:00
|
|
|
* If set, will be use to authenticate to the named wifi
|
2022-08-04 08:11:18 +00:00
|
|
|
*/
|
2022-08-06 05:59:58 +00:00
|
|
|
string psk = 3;
|
2022-05-07 07:48:51 +00:00
|
|
|
}
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
message DisplayConfig {
|
2022-05-01 04:41:22 +00:00
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* How the GPS coordinates are displayed on the OLED screen.
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
enum GpsCoordinateFormat {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GPS coordinates are displayed in the normal decimal degrees format:
|
|
|
|
* DD.DDDDDD DDD.DDDDDD
|
|
|
|
*/
|
|
|
|
GpsFormatDec = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GPS coordinates are displayed in the degrees minutes seconds format:
|
|
|
|
* DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant
|
|
|
|
*/
|
|
|
|
GpsFormatDMS = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Universal Transverse Mercator format:
|
2022-05-07 07:48:51 +00:00
|
|
|
* ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing
|
|
|
|
*/
|
|
|
|
GpsFormatUTM = 2;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Military Grid Reference System format:
|
2022-05-07 07:48:51 +00:00
|
|
|
* ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square,
|
|
|
|
* E is easting, N is northing
|
|
|
|
*/
|
|
|
|
GpsFormatMGRS = 3;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Open Location Code (aka Plus Codes).
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
GpsFormatOLC = 4;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Ordnance Survey Grid Reference (the National Grid System of the UK).
|
|
|
|
* Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square,
|
|
|
|
* E is the easting, N is the northing
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
GpsFormatOSGR = 5;
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Number of seconds the screen stays on after pressing the user button or receiving a message
|
|
|
|
* 0 for default of one minute MAXUINT for always on
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
uint32 screen_on_secs = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* How the GPS coordinates are formatted on the OLED screen.
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
GpsCoordinateFormat gps_format = 2;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds.
|
|
|
|
* Potentially useful for devices without user buttons.
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
uint32 auto_screen_carousel_secs = 3;
|
2022-08-06 05:52:04 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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;
|
2022-05-07 07:48:51 +00:00
|
|
|
}
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Lora Config
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
message LoRaConfig {
|
2022-06-20 17:47:30 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
enum RegionCode {
|
|
|
|
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Region is not set
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
Unset = 0;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* United States
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
US = 1;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* European Union 433mhz
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
EU433 = 2;
|
|
|
|
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* European Union 433mhz
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
EU868 = 3;
|
|
|
|
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* China
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
CN = 4;
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Japan
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
JP = 5;
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Australia / New Zealand
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
ANZ = 6;
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Korea
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
KR = 7;
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Taiwan
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
TW = 8;
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Russia
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
RU = 9;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-01 19:22:54 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* India
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
IN = 10;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* New Zealand 865mhz
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
NZ865 = 11;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
2022-05-07 07:48:51 +00:00
|
|
|
/*
|
2022-06-20 17:47:30 +00:00
|
|
|
* Thailand
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
TH = 12;
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-05-07 07:48:51 +00:00
|
|
|
* Standard predefined channel settings
|
2022-05-07 09:28:54 +00:00
|
|
|
* Note: these mappings must match ModemPreset Choice in the device code.
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 09:11:01 +00:00
|
|
|
enum ModemPreset {
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Long Range - Fast
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-27 18:44:07 +00:00
|
|
|
LongFast = 0;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Long Range - Slow
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
LongSlow = 1;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Very Long Range - Slow
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-27 18:44:07 +00:00
|
|
|
VLongSlow = 2;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Medium Range - Slow
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-06-22 02:05:55 +00:00
|
|
|
MedSlow = 3;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Medium Range - Fast
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-06-22 02:05:55 +00:00
|
|
|
MedFast = 4;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Short Range - Slow
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
ShortSlow = 5;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Short Range - Fast
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
2022-05-07 07:48:51 +00:00
|
|
|
ShortFast = 6;
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
2022-05-07 07:48:51 +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;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2022-05-07 09:28:54 +00:00
|
|
|
ModemPreset modem_preset = 2;
|
2022-05-07 07:48:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Bandwidth in MHz
|
|
|
|
* Certain bandwidth numbers are 'special' and will be converted to the
|
|
|
|
* appropriate floating point value: 31 -> 31.25MHz
|
|
|
|
*/
|
|
|
|
uint32 bandwidth = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A number from 7 to 12.
|
|
|
|
* Indicates number of chirps per symbol as 1<<spread_factor.
|
|
|
|
*/
|
|
|
|
uint32 spread_factor = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The denominator of the coding rate.
|
|
|
|
* ie for 4/8, the value is 8. 5/8 the value is 5.
|
|
|
|
*/
|
|
|
|
uint32 coding_rate = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This parameter is for advanced users with advanced test equipment, we do not recommend most users use it.
|
|
|
|
* A frequency offset that is added to to the calculated band center frequency.
|
|
|
|
* Used to correct for crystal calibration errors.
|
|
|
|
*/
|
|
|
|
float frequency_offset = 6;
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* The region code for the radio (US, CN, EU433, etc...)
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
RegionCode region = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Overrides HOPS_RELIABLE and sets the maximum number of hops. This can't be greater than 7.
|
2022-06-20 17:55:03 +00:00
|
|
|
* 0 for default of 3
|
2022-05-07 07:48:51 +00:00
|
|
|
*/
|
|
|
|
uint32 hop_limit = 8;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests.
|
|
|
|
* Defaults to false
|
|
|
|
*/
|
|
|
|
bool tx_disabled = 9;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For testing it is useful sometimes to force a node to never listen to
|
|
|
|
* particular other nodes (simulating radio out of range). All nodenums listed
|
|
|
|
* in ignore_incoming will have packets they send droped on receive (by router.cpp)
|
|
|
|
*/
|
|
|
|
repeated uint32 ignore_incoming = 103;
|
|
|
|
|
2022-05-01 04:41:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-06-20 17:55:03 +00:00
|
|
|
* Payload Variant
|
2022-05-01 04:41:22 +00:00
|
|
|
*/
|
|
|
|
oneof payloadVariant {
|
|
|
|
|
2022-05-07 09:11:01 +00:00
|
|
|
DeviceConfig device = 1;
|
|
|
|
PositionConfig position = 2;
|
|
|
|
PowerConfig power = 3;
|
|
|
|
WiFiConfig wifi = 4;
|
|
|
|
DisplayConfig display = 5;
|
|
|
|
LoRaConfig lora = 6;
|
2022-05-01 04:41:22 +00:00
|
|
|
|
|
|
|
}
|
2022-05-27 18:44:07 +00:00
|
|
|
}
|