From 34a944553f1776d2a57a3c8a61cdae05d3d7df02 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 16 Feb 2023 09:02:32 -0600 Subject: [PATCH 1/4] Add metadata to fromradio --- meshtastic/mesh.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index d4bcd6b..85e02e7 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -14,6 +14,7 @@ import "meshtastic/module_config.proto"; import "meshtastic/portnums.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/xmodem.proto"; +import "meshtastic/device_metadata.proto"; /* * a gps position @@ -1304,6 +1305,11 @@ message FromRadio { * File Transfer Chunk */ XModem xmodemPacket = 12; + + /* + * Device metadata message + */ + DeviceMetadata metadata = 13; } } From 6cbbf01d139054cbf16fdc9d37323a16343f7df7 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 16 Feb 2023 09:13:48 -0600 Subject: [PATCH 2/4] Move metadata into mesh.proto --- meshtastic/device_metadata.options | 1 - meshtastic/device_metadata.proto | 62 ------------------------------ meshtastic/mesh.options | 4 +- meshtastic/mesh.proto | 52 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 64 deletions(-) delete mode 100644 meshtastic/device_metadata.options delete mode 100644 meshtastic/device_metadata.proto diff --git a/meshtastic/device_metadata.options b/meshtastic/device_metadata.options deleted file mode 100644 index d1c7f95..0000000 --- a/meshtastic/device_metadata.options +++ /dev/null @@ -1 +0,0 @@ -*DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/device_metadata.proto b/meshtastic/device_metadata.proto deleted file mode 100644 index 59ab00a..0000000 --- a/meshtastic/device_metadata.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package meshtastic; - -option java_package = "com.geeksville.mesh"; -option java_outer_classname = "DeviceMetadataProtos"; -option go_package = "github.com/meshtastic/go/generated"; -option csharp_namespace = "Meshtastic.Protobufs"; -option swift_prefix = ""; - -import "meshtastic/config.proto"; -import "meshtastic/mesh.proto"; - -/* - * Device metadata response - */ -message DeviceMetadata { - /* - * Device firmware version string - */ - string firmware_version = 1; - - /* - * Device state version - */ - uint32 device_state_version = 2; - - /* - * Indicates whether the device can shutdown CPU natively or via power management chip - */ - bool canShutdown = 3; - - /* - * Indicates that the device has native wifi capability - */ - bool hasWifi = 4; - - /* - * Indicates that the device has native bluetooth capability - */ - bool hasBluetooth = 5; - - /* - * Indicates that the device has an ethernet peripheral - */ - bool hasEthernet = 6; - - /* - * Indicates that the device's role in the mesh - */ - Config.DeviceConfig.Role role = 7; - - /* - * Indicates the device's current enabled position flags - */ - uint32 position_flags = 8; - - /* - * Device hardware model - */ - HardwareModel hw_model = 9; -} diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 35c753b..eb4b02b 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -47,4 +47,6 @@ *Compressed.data max_size:237 *Waypoint.name max_size:30 -*Waypoint.description max_size:100 \ No newline at end of file +*Waypoint.description max_size:100 + +*DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 85e02e7..3d35f40 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -15,6 +15,8 @@ import "meshtastic/portnums.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/xmodem.proto"; import "meshtastic/device_metadata.proto"; +import "meshtastic/role.proto"; + /* * a gps position @@ -1372,3 +1374,53 @@ message Compressed { */ bytes data = 2; } + +/* + * Device metadata response + */ + message DeviceMetadata { + /* + * Device firmware version string + */ + string firmware_version = 1; + + /* + * Device state version + */ + uint32 device_state_version = 2; + + /* + * Indicates whether the device can shutdown CPU natively or via power management chip + */ + bool canShutdown = 3; + + /* + * Indicates that the device has native wifi capability + */ + bool hasWifi = 4; + + /* + * Indicates that the device has native bluetooth capability + */ + bool hasBluetooth = 5; + + /* + * Indicates that the device has an ethernet peripheral + */ + bool hasEthernet = 6; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 7; + + /* + * Indicates the device's current enabled position flags + */ + uint32 position_flags = 8; + + /* + * Device hardware model + */ + HardwareModel hw_model = 9; +} \ No newline at end of file From cf4466a7d204af35d052b326d1f87fe839f88d25 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 16 Feb 2023 09:15:23 -0600 Subject: [PATCH 3/4] Forgot to remove references --- meshtastic/mesh.proto | 3 --- 1 file changed, 3 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 3d35f40..8f93cf3 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -14,9 +14,6 @@ import "meshtastic/module_config.proto"; import "meshtastic/portnums.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/xmodem.proto"; -import "meshtastic/device_metadata.proto"; -import "meshtastic/role.proto"; - /* * a gps position From 8882edf8abf065a037f15cc9fcf82c14456164a2 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 16 Feb 2023 09:17:40 -0600 Subject: [PATCH 4/4] Remove import --- meshtastic/admin.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 05c975a..184700a 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -10,7 +10,6 @@ option swift_prefix = ""; import "meshtastic/channel.proto"; import "meshtastic/config.proto"; -import "meshtastic/device_metadata.proto"; import "meshtastic/mesh.proto"; import "meshtastic/module_config.proto"; import "meshtastic/connection_status.proto";