Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions meshtastic/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ message AdminMessage {
* TODO: REPLACE
*/
BLUETOOTH_CONFIG = 6;

/*
* TODO: REPLACE
*/
SECURITY_CONFIG = 7;
}

/*
Expand Down
4 changes: 4 additions & 0 deletions meshtastic/config.options
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
*LoRaConfig.channel_num int_size:16

*PowerConfig.device_battery_ina_address int_size:8

*SecurityConfig.public_key max_size:32
*SecurityConfig.private_key max_size:32
*SecurityConfig.admin_key max_size:32
80 changes: 75 additions & 5 deletions meshtastic/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ message Config {

/*
* Disabling this will disable the SerialConsole by not initilizing the StreamAPI
* Moved to SecurityConfig
*/
bool serial_enabled = 2;
bool serial_enabled = 2[deprecated = true];

/*
* 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.
* Moved to SecurityConfig
*/
bool debug_log_enabled = 3;
bool debug_log_enabled = 3[deprecated = true];

/*
* For boards without a hard wired button, this is the pin number that will be used
Expand Down Expand Up @@ -175,8 +177,9 @@ message Config {
/*
* If true, device is considered to be "managed" by a mesh administrator
* Clients should then limit available configuration and administrative options inside the user interface
* Moved to SecurityConfig
*/
bool is_managed = 9;
bool is_managed = 9[deprecated = true];

/*
* Disables the triple-press of user button to enable or disable GPS
Expand Down Expand Up @@ -825,8 +828,9 @@ message Config {

/*
* Very Long Range - Slow
* Deprecated in 2.5: Works only with txco and is unusably slow
*/
VERY_LONG_SLOW = 2;
VERY_LONG_SLOW = 2 [deprecated = true];

/*
* Medium Range - Slow
Expand All @@ -852,6 +856,13 @@ message Config {
* Long Range - Moderately Fast
*/
LONG_MODERATE = 7;

/*
* Short Range - Turbo
* This is the fastest preset and the only one with 500kHz bandwidth.
* It is not legal to use in all regions due to this wider bandwidth.
*/
SHORT_TURBO = 8;
}

/*
Expand Down Expand Up @@ -1006,8 +1017,66 @@ message Config {

/*
* Enables device (serial style logs) over Bluetooth
* Moved to SecurityConfig
*/
bool device_logging_enabled = 4;
bool device_logging_enabled = 4[deprecated = true];
}

message SecurityConfig {

/*
* The public key of the user's device.
* Sent out to other nodes on the mesh to allow them to compute a shared secret key.
*/
bytes public_key = 1;

/*
* The private key of the device.
* Used to create a shared key with a remote device.
*/
bytes private_key = 2;

/*
* The public key authorized to send admin messages to this node.
*/
bytes admin_key = 3;

/*
* If true, device is considered to be "managed" by a mesh administrator via admin messages
* Device is managed by a mesh administrator.
*/
bool is_managed = 4;

/*
* Serial Console over the Stream API."
*/
bool serial_enabled = 5;

/*
* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
* Output live debug logging over serial.
*/
bool debug_log_api_enabled = 6;

/*
* Enables device (serial style logs) over Bluetooth
*/
bool bluetooth_logging_enabled = 7;

/*
* Allow incoming device control over the insecure legacy admin channel.
*/
bool admin_channel_enabled = 8;

/*
* If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe
*/
bool pki_uplink_enabled = 9;

/*
* If true, messages seen on the internet will be forwarded to the local mesh.
*/
bool pki_downlink_enabled = 10;
}

/*
Expand All @@ -1021,5 +1090,6 @@ message Config {
DisplayConfig display = 5;
LoRaConfig lora = 6;
BluetoothConfig bluetooth = 7;
SecurityConfig security = 8;
}
}
5 changes: 5 additions & 0 deletions meshtastic/localonly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ message LocalConfig {
* NodeDB.cpp in the device code.
*/
uint32 version = 8;

/*
* The part of the config that is specific to Security settings
*/
Config.SecurityConfig security = 9;
}

message LocalModuleConfig {
Expand Down
3 changes: 3 additions & 0 deletions meshtastic/mesh.options
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

*macaddr max_size:6 fixed_length:true # macaddrs
*id max_size:16 # node id strings
*public_key max_size:32 # public key

*User.long_name max_size:40
*User.short_name max_size:5
Expand Down Expand Up @@ -45,6 +46,8 @@

*FileInfo.file_name max_size:228

*ClientNotification.message max_size:400

# MyMessage.name max_size:40
# or fixed_length or fixed_count, or max_count

Expand Down
66 changes: 57 additions & 9 deletions meshtastic/mesh.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ message Position {
* The new preferred location encoding, multiply by 1e-7 to get degrees
* in floating point
*/
sfixed32 latitude_i = 1;
optional sfixed32 latitude_i = 1;

/*
* TODO: REPLACE
*/
sfixed32 longitude_i = 2;
optional sfixed32 longitude_i = 2;

/*
* In meters above MSL (but see issue #359)
*/
int32 altitude = 3;
optional int32 altitude = 3;

/*
* This is usually not sent over the mesh (to save space), but it is sent
Expand Down Expand Up @@ -122,12 +122,12 @@ message Position {
/*
* HAE altitude in meters - can be used instead of MSL altitude
*/
sint32 altitude_hae = 9;
optional sint32 altitude_hae = 9;

/*
* Geoidal separation in meters
*/
sint32 altitude_geoidal_separation = 10;
optional sint32 altitude_geoidal_separation = 10;

/*
* Horizontal, Vertical and Position Dilution of Precision, in 1/100 units
Expand Down Expand Up @@ -163,12 +163,12 @@ message Position {
* - "yaw" indicates a relative rotation about the vertical axis
* TODO: REMOVE/INTEGRATE
*/
uint32 ground_speed = 15;
optional uint32 ground_speed = 15;

/*
* TODO: REPLACE
*/
uint32 ground_track = 16;
optional uint32 ground_track = 16;

/*
* GPS fix quality (from NMEA GxGGA statement or similar)
Expand Down Expand Up @@ -665,6 +665,12 @@ message User {
* Indicates that the user's role in the mesh
*/
Config.DeviceConfig.Role role = 7;

/*
* The public key of the user's device.
* This is sent out to other nodes on the mesh to allow them to compute a shared secret key.
*/
bytes public_key = 8;
}

/*
Expand Down Expand Up @@ -837,12 +843,12 @@ message Waypoint {
/*
* latitude_i
*/
sfixed32 latitude_i = 2;
optional sfixed32 latitude_i = 2;

/*
* longitude_i
*/
sfixed32 longitude_i = 3;
optional sfixed32 longitude_i = 3;

/*
* Time the waypoint is to expire (epoch)
Expand Down Expand Up @@ -1105,6 +1111,16 @@ message MeshPacket {
* When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled.
*/
uint32 hop_start = 15;

/*
* Records the public key the packet was encrypted with, if applicable.
*/
bytes public_key = 16;

/*
* Indicates whether the packet was en/decrypted using PKI
*/
bool pki_encrypted = 17;
}

/*
Expand Down Expand Up @@ -1508,9 +1524,41 @@ message FromRadio {
* File system manifest messages
*/
FileInfo fileInfo = 15;

/*
* Notification message to the client
*/
ClientNotification clientNotification = 16;
}
}

/*
* A notification message from the device to the client
* To be used for important messages that should to be displayed to the user
* in the form of push notifications or validation messages when saving
* invalid configuration.
*/
message ClientNotification {
/*
* The id of the packet we're notifying in response to
*/
optional uint32 reply_id = 1;

/*
* Seconds since 1970 - or 0 for unknown/unset
*/
fixed32 time = 2;

/*
* The level type of notification
*/
LogRecord.Level level = 3;
/*
* The message body of the notification
*/
string message = 4;
}

/*
* Individual File info for the device
*/
Expand Down
1 change: 1 addition & 0 deletions meshtastic/module_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ message ModuleConfig {
* Works as a sort of status heartbeat for peace of mind
*/
uint32 state_broadcast_secs = 3;

/*
* Send ASCII bell with alert message
* Useful for triggering ext. notification on bell
Expand Down
Loading