From c1e179ecfd86c88deaf1140e7a9c6902b763cc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 17 Dec 2023 14:36:48 +0100 Subject: [PATCH] Add paxcounter protobuf and config --- meshtastic/admin.options | 1 - meshtastic/admin.proto | 5 +++++ meshtastic/localonly.proto | 5 +++++ meshtastic/module_config.proto | 22 ++++++++++++++++++++++ meshtastic/paxcount.proto | 29 +++++++++++++++++++++++++++++ meshtastic/portnums.proto | 6 ++++++ 6 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 meshtastic/paxcount.proto diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 1cd0ab4..9f646e5 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -6,7 +6,6 @@ *AdminMessage.set_ringtone_message max_size:231 *AdminMessage.get_ringtone_response max_size:231 - *HamParameters.call_sign max_size:8 *HamParameters.short_name max_size:6 *NodeRemoteHardwarePinsResponse.node_remote_hardware_pins max_count:16 \ No newline at end of file diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index a14cc0e..e0675b6 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -124,6 +124,11 @@ message AdminMessage { * TODO: REPLACE */ DETECTIONSENSOR_CONFIG = 11; + + /* + * TODO: REPLACE + */ + PAXCOUNTER_CONFIG = 12; } /* diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index 5f46f9a..9297dff 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -121,6 +121,11 @@ message LocalModuleConfig { */ ModuleConfig.DetectionSensorConfig detection_sensor = 13; + /* + * Paxcounter Config + */ + ModuleConfig.PaxcounterConfig paxcounter = 14; + /* * 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 diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index ee2fdaa..d55d2c3 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -214,6 +214,23 @@ message ModuleConfig { uint32 i2s_sck = 7; } + /* + * Config for the Paxcounter Module + */ + message PaxcounterConfig { + /* + * Enable the Paxcounter Module + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * metrics to the mesh + */ + + uint32 paxcounter_update_interval = 2; + } + /* * Serial Config */ @@ -713,6 +730,11 @@ message ModuleConfig { * TODO: REPLACE */ DetectionSensorConfig detection_sensor = 12; + + /* + * TODO: REPLACE + */ + PaxcounterConfig paxcounter = 13; } } diff --git a/meshtastic/paxcount.proto b/meshtastic/paxcount.proto new file mode 100644 index 0000000..47b2639 --- /dev/null +++ b/meshtastic/paxcount.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "PaxcountProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message Paxcount { + /* + * seen Wifi devices + */ + uint32 wifi = 1; + + /* + * Seen BLE devices + */ + uint32 ble = 2; + + /* + * Uptime in seconds + */ + uint32 uptime = 3; +} diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 598de93..cd6bced 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -118,6 +118,12 @@ enum PortNum { */ IP_TUNNEL_APP = 33; + /* + * Paxcounter lib included in the firmware + * ENCODING: protobuf + */ + PAXCOUNTER_APP = 34; + /* * Provides a hardware serial interface to send and receive from the Meshtastic network. * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic