Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.5 #553

Merged
merged 26 commits into from
Aug 17, 2024
Merged

2.5 #553

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
deb05e9
Remove dos-style formatting from telemetry.proto
jp-bennett Aug 13, 2024
eed2033
Short turbo preset
thebentern Aug 7, 2024
a3242bd
Add `optional` keywords to stuff that can be "truly zero" within mesh…
ianmcorvidae Aug 7, 2024
e9b8374
Adds public_key and private_key for PKI
jp-bennett Aug 5, 2024
bc465e6
Add the key used to PKI decrypt to MeshPacket
jp-bennett Aug 5, 2024
adb2ff2
Re-org some settings into a new SecurityConfig proto
jp-bennett Aug 7, 2024
ecc4d42
Also move device_logging_enabled from bluetooth to SecurityConfig
jp-bennett Aug 7, 2024
6cde2e2
Add SecurityConfig to Localonly
jp-bennett Aug 7, 2024
684d1fa
Add admin_channel_enabled to the security config
jp-bennett Aug 7, 2024
04a3b65
No default for you, Proto3
jp-bennett Aug 7, 2024
c979c1a
Update config.proto
garthvh Aug 8, 2024
d7ce4f3
Update config.proto
garthvh Aug 8, 2024
66a6d11
Add client notification fromradio message
thebentern Aug 8, 2024
000e9dc
Add SECURITY_CONFIG to admin.proto (#547)
jp-bennett Aug 11, 2024
1ff2e73
UserLite
thebentern Aug 11, 2024
f03121f
Add NONE_PKI error message
jp-bennett Aug 12, 2024
f007d1d
Rename NONE_PKI to PKI_FAILED
jp-bennett Aug 13, 2024
97fa345
Merge branch 'master' into 2.5
jp-bennett Aug 13, 2024
8b5b2fa
Add PKI_UNKNOWN_PUBKEY (#557)
jp-bennett Aug 14, 2024
06d7ca5
Adds Admin session_passkey to prevent replay of admin packets (#558)
jp-bennett Aug 15, 2024
ceb1170
Local device mesh stats
thebentern Aug 16, 2024
4eb4f42
Merge pull request #560 from meshtastic/stats
thebentern Aug 16, 2024
6a53f76
Set time only admin message
thebentern Aug 16, 2024
8ac99ee
Fixed
thebentern Aug 16, 2024
dfce613
Merge pull request #562 from meshtastic/set-time
thebentern Aug 16, 2024
59d035a
net
thebentern Aug 16, 2024
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
2 changes: 2 additions & 0 deletions meshtastic/admin.options
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*AdminMessage.payload_variant anonymous_oneof:true

*AdminMessage.session_passkey max_size:8

*AdminMessage.set_canned_message_module_messages max_size:201
*AdminMessage.get_canned_message_module_messages_response max_size:201
*AdminMessage.delete_file_request max_size:201
Expand Down
19 changes: 19 additions & 0 deletions meshtastic/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ option swift_prefix = "";
* (Prior to 1.2 these operations were done via special ToRadio operations)
*/
message AdminMessage {

/*
* The node generates this key and sends it with any get_x_response packets.
* The client MUST include the same key with any set_x commands. Key expires after 300 seconds.
* Prevents replay attacks for admin messages.
*/
bytes session_passkey = 101;

/*
* TODO: REPLACE
*/
Expand Down Expand Up @@ -58,6 +66,11 @@ message AdminMessage {
* TODO: REPLACE
*/
BLUETOOTH_CONFIG = 6;

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

/*
Expand Down Expand Up @@ -305,6 +318,12 @@ message AdminMessage {
*/
bool remove_fixed_position = 42;

/*
* Set time only on the node
* Convenience method to set the time on the node (as Net quality) without any other position data
*/
fixed32 set_time_only = 43;

/*
* Begins an edit transaction for config, module config, owner, and channel settings changes
* This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
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
70 changes: 65 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,56 @@ message Config {

/*
* Enables device (serial style logs) over Bluetooth
* Moved to SecurityConfig
*/
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 device_logging_enabled = 4;
bool admin_channel_enabled = 8;
}

/*
Expand All @@ -1021,5 +1080,6 @@ message Config {
DisplayConfig display = 5;
LoRaConfig lora = 6;
BluetoothConfig bluetooth = 7;
SecurityConfig security = 8;
}
}
5 changes: 5 additions & 0 deletions meshtastic/deviceonly.options
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@

*NodeInfoLite.channel int_size:8
*NodeInfoLite.hops_away int_size:8

*UserLite.long_name max_size:40
*UserLite.short_name max_size:5
*UserLite.public_key max_size:32 # public key
*UserLite.macaddr max_size:6 fixed_length:true
47 changes: 46 additions & 1 deletion meshtastic/deviceonly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "meshtastic/channel.proto";
import "meshtastic/localonly.proto";
import "meshtastic/mesh.proto";
import "meshtastic/telemetry.proto";
import "meshtastic/config.proto";
import "nanopb.proto";

option csharp_namespace = "Meshtastic.Protobufs";
Expand Down Expand Up @@ -51,6 +52,50 @@ message PositionLite {
Position.LocSource location_source = 5;
}

message UserLite {
/*
* This is the addr of the radio.
*/
bytes macaddr = 1 [deprecated = true];

/*
* A full name for this user, i.e. "Kevin Hester"
*/
string long_name = 2;

/*
* A VERY short name, ideally two characters.
* Suitable for a tiny OLED screen
*/
string short_name = 3;

/*
* TBEAM, HELTEC, etc...
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
* Apps will still need the string here for older builds
* (so OTA update can find the right image), but if the enum is available it will be used instead.
*/
HardwareModel hw_model = 4;

/*
* In some regions Ham radio operators have different bandwidth limitations than others.
* If this user is a licensed operator, set this flag.
* Also, "long_name" should be their licence number.
*/
bool is_licensed = 5;

/*
* Indicates that the user's role in the mesh
*/
Config.DeviceConfig.Role role = 6;

/*
* 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 = 7;
}

message NodeInfoLite {
/*
* The node number
Expand All @@ -60,7 +105,7 @@ message NodeInfoLite {
/*
* The user info for this node
*/
User user = 2;
UserLite 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.
Expand Down
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
Loading