From 5425767b0d664bf5a92dbc26e206c1b2eb2584ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:27:51 +0100 Subject: [PATCH 01/18] add proto for RemoteHardware. This can be extended later, enables for now. --- admin.proto | 5 +++++ localonly.proto | 5 +++++ module_config.proto | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/admin.proto b/admin.proto index 79a6687..873939b 100644 --- a/admin.proto +++ b/admin.proto @@ -105,6 +105,11 @@ message AdminMessage { * TODO: REPLACE */ AUDIO_CONFIG = 7; + + /* + * TODO: REPLACE + */ + REMOTEHARDWARE_CONFIG = 7; } /* diff --git a/localonly.proto b/localonly.proto index f4c1859..366ed02 100644 --- a/localonly.proto +++ b/localonly.proto @@ -100,6 +100,11 @@ message LocalModuleConfig { */ ModuleConfig.AudioConfig audio = 9; + /* + * The part of the config that is specific to the GPS module + */ + ModuleConfig.RemoteHardwareConfig remote_hardware = 10; + /* * 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/module_config.proto b/module_config.proto index c6e6cb0..4b4ad87 100644 --- a/module_config.proto +++ b/module_config.proto @@ -56,6 +56,17 @@ message ModuleConfig { bool json_enabled = 6; } + /* + * RemoteHardwareModule Config + */ + message RemoteHardwareConfig { + + /* + * Whether the Module is enabled + */ + bool enabled = 1; + } + /* * Audio Config for codec2 voice */ @@ -516,5 +527,10 @@ message ModuleConfig { */ AudioConfig audio = 8; + /* + * TODO: REPLACE + */ + RemoteHardwareConfig remote_hardware = 9; + } } From 7c7efe8cf5a95a23dcd2627aad468236fca99203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:34:40 +0100 Subject: [PATCH 02/18] fix dual enum --- admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.proto b/admin.proto index 873939b..53f1728 100644 --- a/admin.proto +++ b/admin.proto @@ -109,7 +109,7 @@ message AdminMessage { /* * TODO: REPLACE */ - REMOTEHARDWARE_CONFIG = 7; + REMOTEHARDWARE_CONFIG = 8; } /* From 9ba877271250f1a36a28432ee426a70affc841bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:35:22 +0100 Subject: [PATCH 03/18] Add Settings for Screen Layout --- config.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/config.proto b/config.proto index bfeb7a7..eafbdcd 100644 --- a/config.proto +++ b/config.proto @@ -466,6 +466,37 @@ message Config { * Override auto-detect in screen */ OledType oled = 7; + + enum DisplayMode { + /* + * Default. The old style for the 128x64 OLED screen + */ + DEFAULT = 0; + + /* + * Rearrange display elements to cater for bicolor OLED displays + */ + TWOCOLOR = 1; + + /* + * Same as TwoColor, but with inverted top bar. Not so good for Epaper displays + */ + INVERTED = 2; + + /* + * TFT Full Color Displays (not implemented yet) + */ + COLOR = 3; + } + /* + * Display Mode + */ + DisplayMode displaymode = 8; + + /* + * Print first line in pseudo-bold? FALSE is original style, TRUE is bold + */ + bool heading_bold = 9; } /* From a45968f9b4f84a3392230819da8b7daf83125d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:49:34 +0100 Subject: [PATCH 04/18] add ringtone storage as extra file --- admin.options | 3 +++ admin.proto | 15 +++++++++++++++ rtttl.options | 1 + rtttl.proto | 18 ++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 rtttl.options create mode 100644 rtttl.proto diff --git a/admin.options b/admin.options index 0873a92..1495a50 100644 --- a/admin.options +++ b/admin.options @@ -2,3 +2,6 @@ *AdminMessage.set_canned_message_module_messages max_size:201 *AdminMessage.get_canned_message_module_messages_response max_size:201 + +*AdminMessage.set_ringtone_message max_size:231 +*AdminMessage.get_ringtone_response max_size:231 diff --git a/admin.proto b/admin.proto index 53f1728..8b203d9 100644 --- a/admin.proto +++ b/admin.proto @@ -178,6 +178,16 @@ message AdminMessage { */ DeviceMetadata get_device_metadata_response = 13; + /* + * Get the Ringtone in the response to this message. + */ + bool get_ringtone_request = 14; + + /* + * Get the Ringtone in the response to this message. + */ + string get_ringtone_response = 15; + /* * Set the owner for this node */ @@ -207,6 +217,11 @@ message AdminMessage { */ string set_canned_message_module_messages = 36; + /* + * Set the ringtone for ExternalNotification. + */ + string set_ringtone_message = 37; + /* * 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) diff --git a/rtttl.options b/rtttl.options new file mode 100644 index 0000000..1ae0c2f --- /dev/null +++ b/rtttl.options @@ -0,0 +1 @@ +*RTTTLConfig.ringtone max_size:230 diff --git a/rtttl.proto b/rtttl.proto new file mode 100644 index 0000000..2655c10 --- /dev/null +++ b/rtttl.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +option java_package = "com.geeksville.mesh"; +option java_outer_classname = "RTTTLConfigProtos"; +option optimize_for = LITE_RUNTIME; +option go_package = "github.com/meshtastic/go/generated"; +option csharp_namespace = "Meshtastic.Protobufs"; + +/* + * Canned message module configuration. + */ +message RTTTLConfig { + + /* + * Ringtone for PWM Buzzer in RTTTL Format. + */ + string ringtone = 1; +} From d3f236f074fbe72fcc999520fbd5249135aff7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 29 Dec 2022 14:14:23 +0100 Subject: [PATCH 05/18] Update localonly.proto --- localonly.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localonly.proto b/localonly.proto index 366ed02..46c83d8 100644 --- a/localonly.proto +++ b/localonly.proto @@ -101,7 +101,7 @@ message LocalModuleConfig { ModuleConfig.AudioConfig audio = 9; /* - * The part of the config that is specific to the GPS module + * The part of the config that is specific to the Remote Hardware module */ ModuleConfig.RemoteHardwareConfig remote_hardware = 10; From e7f065b063bdf459cc809074cab0a6875ce8f2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 2 Jan 2023 16:58:06 +0100 Subject: [PATCH 06/18] Rename eth_mode->address_mode, it's also for WiFi Numerical values and struct stay the same. May need changes to the client code for setting/getting these --- config.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config.proto b/config.proto index eafbdcd..72a5867 100644 --- a/config.proto +++ b/config.proto @@ -273,7 +273,7 @@ message Config { */ message NetworkConfig { - enum EthMode { + enum AddressMode { /* * obtain ip address via DHCP */ @@ -312,7 +312,6 @@ message Config { */ bool wifi_enabled = 1; - /* * If set, this node will try to join the specified wifi network and * acquire an address via DHCP @@ -337,7 +336,7 @@ message Config { /* * acquire an address via DHCP or assign static */ - EthMode eth_mode = 7; + AddressMode address_mode = 7; /* * struct to keep static address From 3b0d871ca1e0f8a2ed823f0696e2d7cf31ed2ebd Mon Sep 17 00:00:00 2001 From: Pavel Boldin Date: Sat, 8 Oct 2022 02:51:42 +0300 Subject: [PATCH 07/18] FromRadio: add QueueStatus payload Send amount of available places in the queue as well as last allocation result. Signed-off-by: Pavel Boldin --- mesh.options | 4 ++++ mesh.proto | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/mesh.options b/mesh.options index 59f66bc..35c753b 100644 --- a/mesh.options +++ b/mesh.options @@ -26,6 +26,10 @@ *MeshPacket.hop_limit int_size:8 *MeshPacket.channel int_size:8 +*QueueStatus.res int_size:8 +*QueueStatus.free int_size:8 +*QueueStatus.maxlen int_size:8 + *ToRadio.payload_variant anonymous_oneof:true *FromRadio.payload_variant anonymous_oneof:true diff --git a/mesh.proto b/mesh.proto index 7a20594..735058d 100644 --- a/mesh.proto +++ b/mesh.proto @@ -1192,6 +1192,20 @@ message LogRecord { Level level = 4; } +message QueueStatus { + /* Last attempt to queue status, ErrorCode */ + int32 res = 1; + + /* Free entries in the outgoing queue */ + uint32 free = 2; + + /* Maximum entries in the outgoing queue */ + uint32 maxlen = 3; + + /* What was mesh packet id that generated this response? */ + uint32 mesh_packet_id = 4; +} + /* * Packets from the radio to the phone will appear on the fromRadio characteristic. * It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? @@ -1263,6 +1277,9 @@ message FromRadio { * One packet is sent for each channel */ Channel channel = 10; + + /* Queue status info */ + QueueStatus queueStatus = 11; } } From 54000b454ee7904f4a08d70f8b5f23a8e191238f Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sat, 7 Jan 2023 13:46:08 +0200 Subject: [PATCH 08/18] Add BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU https://betafpv.com/products/elrs-micro-tx-module --- mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mesh.proto b/mesh.proto index 735058d..5c932bc 100644 --- a/mesh.proto +++ b/mesh.proto @@ -371,6 +371,11 @@ enum HardwareModel { */ HELTEC_WSL_V3 = 44; + /* + * New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU + */ + BETAFPV_2400_TX = 45; + /* * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. */ From ad0e02b08210eec017fbfdd9b55ca06ac49c4e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 8 Jan 2023 18:22:22 +0100 Subject: [PATCH 09/18] Chunked File Transfer --- mesh.proto | 16 +++++++++++++++- xmodem.options | 6 ++++++ xmodem.proto | 26 ++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 xmodem.options create mode 100644 xmodem.proto diff --git a/mesh.proto b/mesh.proto index 5c932bc..e0e0815 100644 --- a/mesh.proto +++ b/mesh.proto @@ -9,6 +9,7 @@ import "config.proto"; import "module_config.proto"; import "portnums.proto"; import "telemetry.proto"; +import "xmodem.proto"; option java_outer_classname = "MeshProtos"; option csharp_namespace = "Meshtastic.Protobufs"; @@ -1283,8 +1284,15 @@ message FromRadio { */ Channel channel = 10; - /* Queue status info */ + /* + * Queue status info + */ QueueStatus queueStatus = 11; + + /* + * File Transfer Chunk + */ + XModem xmodemPacket = 12; } } @@ -1323,6 +1331,12 @@ message ToRadio { * (Sending this message is optional for clients) */ bool disconnect = 4; + + /* + * File Transfer Chunk + */ + + XModem xmodemPacket = 5; } } diff --git a/xmodem.options b/xmodem.options new file mode 100644 index 0000000..3593126 --- /dev/null +++ b/xmodem.options @@ -0,0 +1,6 @@ +# options for nanopb +# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options + +*XModem.buffer max_size:128 +*XModem.seq int_size:8 +*XModem.crc16 int_size:16 diff --git a/xmodem.proto b/xmodem.proto new file mode 100644 index 0000000..9cf787b --- /dev/null +++ b/xmodem.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +option java_package = "com.geeksville.mesh"; +option optimize_for = LITE_RUNTIME; +option go_package = "github.com/meshtastic/go/generated"; + +option java_outer_classname = "XmodemProtos"; +option csharp_namespace = "Meshtastic.Protobufs"; + +message XModem { + enum Control { + NUL = 0; + SOH = 1; + STX = 2; + EOT = 4; + ACK = 6; + NAK = 21; + CAN = 24; + CTRLZ = 26; + } + + Control control = 1; + uint32 seq = 2; + uint32 crc16 = 3; + bytes buffer = 4; +} \ No newline at end of file From 629a2615b136756fb1ef349aa7991095f653af71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 9 Jan 2023 15:04:24 +0100 Subject: [PATCH 10/18] avoid double takes --- mesh.proto | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mesh.proto b/mesh.proto index 79eb90f..213f592 100644 --- a/mesh.proto +++ b/mesh.proto @@ -372,11 +372,6 @@ enum HardwareModel { */ HELTEC_WSL_V3 = 44; - /* - * New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU - */ - BETAFPV_2400_TX = 45; - /* * New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU */ From bc8e9d8e87d8458aa080ff66cd0a225a4c02ebfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 9 Jan 2023 20:14:18 +0100 Subject: [PATCH 11/18] i am to lazy to handle the rollover in code. 8 MB filesize should be plenty... most MCUs only have 4 MB. --- xmodem.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmodem.options b/xmodem.options index 3593126..3af6125 100644 --- a/xmodem.options +++ b/xmodem.options @@ -2,5 +2,5 @@ # https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options *XModem.buffer max_size:128 -*XModem.seq int_size:8 +*XModem.seq int_size:16 *XModem.crc16 int_size:16 From de5906bab1ad923d9a1553765b4722ea40cbb706 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 10 Jan 2023 11:32:33 -0600 Subject: [PATCH 12/18] :poop: --- mesh.proto | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesh.proto b/mesh.proto index 213f592..4811597 100644 --- a/mesh.proto +++ b/mesh.proto @@ -648,11 +648,15 @@ message Waypoint { */ string name = 6; - /** + /* * Description of the waypoint - max 100 chars */ string description = 7; + /* + * Designator icon for the waypoint in the form of a unicode emoji + */ + fixed32 emoji = 8; } /* From 45288a320cea43a9bcaf36acf6df95736263e95a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 11 Jan 2023 12:16:00 -0600 Subject: [PATCH 13/18] Bump MQTTConfig.address to 64 bytes --- module_config.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module_config.options b/module_config.options index f7d3684..08068f3 100644 --- a/module_config.options +++ b/module_config.options @@ -1,6 +1,6 @@ *CannedMessageConfig.allow_input_source max_size:16 -*MQTTConfig.address max_size:32 +*MQTTConfig.address max_size:64 *MQTTConfig.username max_size:64 *MQTTConfig.password max_size:64 @@ -12,4 +12,4 @@ *ExternalNotificationConfig.output_vibra int_size:8 *ExternalNotificationConfig.output_buzzer int_size:8 -*ExternalNotificationConfig.nag_timeout int_size:16 \ No newline at end of file +*ExternalNotificationConfig.nag_timeout int_size:16 From b77767e1693121386c560234008395dca514d5a1 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 11 Jan 2023 18:01:47 -0600 Subject: [PATCH 14/18] Rename to icon --- mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh.proto b/mesh.proto index 4811597..7fde1ca 100644 --- a/mesh.proto +++ b/mesh.proto @@ -656,7 +656,7 @@ message Waypoint { /* * Designator icon for the waypoint in the form of a unicode emoji */ - fixed32 emoji = 8; + fixed32 icon = 8; } /* From 8989a8f0f696a9de26f0a3777cc6819380171184 Mon Sep 17 00:00:00 2001 From: thebentern Date: Thu, 12 Jan 2023 12:43:21 +0000 Subject: [PATCH 15/18] [create-pull-request] automated change --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 40e7926..7cf7734 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 0 -build = 13 +build = 14 From 0c8cd89e14a2e06fb0510ddac7455d4c1ba5b0e5 Mon Sep 17 00:00:00 2001 From: Krezalis Date: Thu, 12 Jan 2023 15:35:40 +0200 Subject: [PATCH 16/18] Add Ukraine Freq --- config.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config.proto b/config.proto index 72a5867..920a9dc 100644 --- a/config.proto +++ b/config.proto @@ -574,6 +574,16 @@ message Config { * WLAN Band */ LORA_24 = 13; + + /* + * Ukraine 433mhz + */ + UA_433 = 14; + + /* + * Ukraine 868mhz + */ + UA_868 = 15; } /* From 1c85c716a68cc556cdf4cf7d13b8fd43e1b34672 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 15 Jan 2023 17:50:21 -0600 Subject: [PATCH 17/18] Change locked to locked_to --- mesh.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mesh.proto b/mesh.proto index 7fde1ca..09a2792 100644 --- a/mesh.proto +++ b/mesh.proto @@ -639,9 +639,10 @@ message Waypoint { uint32 expire = 4; /* - * If true, only allow the original sender to update the waypoint. + * If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. + * If zero, the waypoint is open to be edited by any member of the mesh. */ - bool locked = 5; + fixed32 locked_to = 5; /* * Name of the waypoint - max 30 chars From b7e6b08b907120874a75ca70a3293f97d530ff9e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 15 Jan 2023 18:12:06 -0600 Subject: [PATCH 18/18] Update mesh.proto --- mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh.proto b/mesh.proto index 09a2792..f05ab10 100644 --- a/mesh.proto +++ b/mesh.proto @@ -642,7 +642,7 @@ message Waypoint { * If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. * If zero, the waypoint is open to be edited by any member of the mesh. */ - fixed32 locked_to = 5; + uint32 locked_to = 5; /* * Name of the waypoint - max 30 chars