2020-12-28 05:12:14 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-01-17 11:03:10 +00:00
|
|
|
package meshtastic;
|
|
|
|
|
|
|
|
import "meshtastic/channel.proto";
|
2023-01-31 14:47:09 +00:00
|
|
|
import "meshtastic/localonly.proto";
|
2023-01-17 11:03:10 +00:00
|
|
|
import "meshtastic/mesh.proto";
|
2023-06-07 14:46:37 +00:00
|
|
|
import "meshtastic/telemetry.proto";
|
2023-05-15 19:41:34 +00:00
|
|
|
import "meshtastic/module_config.proto";
|
2023-01-17 11:03:10 +00:00
|
|
|
|
2023-05-20 09:29:34 +00:00
|
|
|
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 = "";
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* This message is never sent over the wire, but it is used for serializing DB
|
|
|
|
* state to flash in the device code
|
|
|
|
* FIXME, since we write this each time we enter deep sleep (and have infinite
|
|
|
|
* flash) it would be better to use some sort of append only data structure for
|
|
|
|
* the receive queue and use the preferences store for the other stuff
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
message DeviceState {
|
2021-04-20 09:08:28 +00:00
|
|
|
/*
|
2021-11-30 19:45:01 +00:00
|
|
|
* Read only settings/info about this node
|
2021-04-20 09:08:28 +00:00
|
|
|
*/
|
2021-11-30 19:45:01 +00:00
|
|
|
MyNodeInfo my_node = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* My owner info
|
|
|
|
*/
|
|
|
|
User owner = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Received packets saved for delivery to the phone
|
|
|
|
*/
|
|
|
|
repeated MeshPacket receive_queue = 5;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A version integer used to invalidate old save files when we make
|
|
|
|
* incompatible changes This integer is set at build time and is private to
|
|
|
|
* NodeDB.cpp in the device code.
|
|
|
|
*/
|
|
|
|
uint32 version = 8;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We keep the last received text message (only) stored in the device flash,
|
|
|
|
* so we can show it on the screen.
|
|
|
|
* Might be null
|
|
|
|
*/
|
|
|
|
MeshPacket rx_text_message = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Used only during development.
|
|
|
|
* Indicates developer is testing and changes should never be saved to flash.
|
|
|
|
*/
|
|
|
|
bool no_save = 9;
|
|
|
|
|
|
|
|
/*
|
2023-03-05 12:30:24 +00:00
|
|
|
* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset.
|
2021-11-30 19:45:01 +00:00
|
|
|
*/
|
|
|
|
bool did_gps_reset = 11;
|
2022-01-19 01:39:38 +00:00
|
|
|
|
2023-05-01 12:09:47 +00:00
|
|
|
/*
|
|
|
|
* We keep the last received waypoint stored in the device flash,
|
|
|
|
* so we can show it on the screen.
|
|
|
|
* Might be null
|
|
|
|
*/
|
|
|
|
MeshPacket rx_waypoint = 12;
|
2023-05-15 13:03:42 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The mesh's nodes with their available gpio pins for RemoteHardware module
|
|
|
|
*/
|
2023-05-15 19:53:28 +00:00
|
|
|
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13;
|
2023-06-07 14:46:37 +00:00
|
|
|
|
|
|
|
/*
|
2023-06-28 00:07:49 +00:00
|
|
|
* New lite version of NodeDB to decrease memory footprint
|
2023-06-07 14:46:37 +00:00
|
|
|
*/
|
|
|
|
repeated NodeInfoLite node_db_lite = 14;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NodeInfoLite {
|
|
|
|
/*
|
|
|
|
* The node number
|
|
|
|
*/
|
|
|
|
uint32 num = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The user info for this node
|
|
|
|
*/
|
|
|
|
User user = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
|
|
|
|
* Position.time now indicates the last time we received a POSITION from that node.
|
|
|
|
*/
|
|
|
|
PositionLite position = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns the Signal-to-noise ratio (SNR) of the last received message,
|
|
|
|
* as measured by the receiver. Return SNR of the last received message in dB
|
|
|
|
*/
|
|
|
|
float snr = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set to indicate the last time we received a packet from this node
|
|
|
|
*/
|
|
|
|
fixed32 last_heard = 5;
|
|
|
|
/*
|
|
|
|
* The latest device metrics for the node.
|
|
|
|
*/
|
|
|
|
DeviceMetrics device_metrics = 6;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* local channel index we heard that node on. Only populated if its not the default channel.
|
|
|
|
*/
|
|
|
|
uint32 channel = 7;
|
2022-01-19 23:43:57 +00:00
|
|
|
}
|
2021-11-30 19:45:01 +00:00
|
|
|
|
2023-06-07 14:01:54 +00:00
|
|
|
/*
|
|
|
|
* Position with static location information only for NodeDBLite
|
|
|
|
*/
|
|
|
|
message PositionLite {
|
|
|
|
/*
|
|
|
|
* The new preferred location encoding, multiply by 1e-7 to get degrees
|
|
|
|
* in floating point
|
|
|
|
*/
|
|
|
|
sfixed32 latitude_i = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
sfixed32 longitude_i = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* In meters above MSL (but see issue #359)
|
|
|
|
*/
|
|
|
|
int32 altitude = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is usually not sent over the mesh (to save space), but it is sent
|
|
|
|
* from the phone so that the local device can set its RTC If it is sent over
|
|
|
|
* the mesh (because there are devices on the mesh without GPS), it will only
|
|
|
|
* be sent by devices which has a hardware GPS clock.
|
|
|
|
* seconds since 1970
|
|
|
|
*/
|
|
|
|
fixed32 time = 4;
|
2023-06-07 17:53:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
Position.LocSource location_source = 5;
|
2023-06-07 14:01:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-30 19:45:01 +00:00
|
|
|
/*
|
|
|
|
* The on-disk saved channels
|
|
|
|
*/
|
|
|
|
message ChannelFile {
|
|
|
|
/*
|
|
|
|
* The channels our node knows about
|
|
|
|
*/
|
|
|
|
repeated Channel channels = 1;
|
2022-06-15 14:40:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A version integer used to invalidate old save files when we make
|
|
|
|
* incompatible changes This integer is set at build time and is private to
|
|
|
|
* NodeDB.cpp in the device code.
|
|
|
|
*/
|
2022-06-15 14:42:55 +00:00
|
|
|
uint32 version = 2;
|
2021-11-30 19:45:01 +00:00
|
|
|
}
|
2022-04-18 16:13:52 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
enum ScreenFonts {
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
FONT_SMALL = 0;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
FONT_MEDIUM = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
FONT_LARGE = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This can be used for customizing the firmware distribution. If populated,
|
2023-03-05 12:30:24 +00:00
|
|
|
* show a secondary bootup screen with custom logo and text for 2.5 seconds.
|
2022-04-18 16:13:52 +00:00
|
|
|
*/
|
|
|
|
message OEMStore {
|
|
|
|
/*
|
|
|
|
* The Logo width in Px
|
|
|
|
*/
|
|
|
|
uint32 oem_icon_width = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The Logo height in Px
|
|
|
|
*/
|
|
|
|
uint32 oem_icon_height = 2;
|
|
|
|
|
|
|
|
/*
|
2023-03-05 12:30:24 +00:00
|
|
|
* The Logo in XBM bytechar format
|
2022-04-18 16:13:52 +00:00
|
|
|
*/
|
|
|
|
bytes oem_icon_bits = 3;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Use this font for the OEM text.
|
|
|
|
*/
|
|
|
|
ScreenFonts oem_font = 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Use this font for the OEM text.
|
|
|
|
*/
|
|
|
|
string oem_text = 5;
|
2022-10-19 09:28:30 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The default device encryption key, 16 or 32 byte
|
|
|
|
*/
|
|
|
|
bytes oem_aes_key = 6;
|
2023-01-31 14:47:09 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A Preset LocalConfig to apply during factory reset
|
|
|
|
*/
|
|
|
|
LocalConfig oem_local_config = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A Preset LocalModuleConfig to apply during factory reset
|
|
|
|
*/
|
|
|
|
LocalModuleConfig oem_local_module_config = 8;
|
2023-05-15 13:03:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* RemoteHardwarePins associated with a node
|
|
|
|
*/
|
|
|
|
message NodeRemoteHardwarePin {
|
|
|
|
/*
|
|
|
|
* The node_num exposing the available gpio pin
|
|
|
|
*/
|
|
|
|
uint32 node_num = 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The the available gpio pin for usage with RemoteHardware module
|
|
|
|
*/
|
|
|
|
RemoteHardwarePin pin = 2;
|
2023-06-07 14:01:54 +00:00
|
|
|
}
|