From 7d05c8936f0018e2849745e427fabb69c92f51aa Mon Sep 17 00:00:00 2001 From: Joshua Pirihi Date: Mon, 20 Dec 2021 19:54:03 +1300 Subject: [PATCH 1/2] Add mqtt username and password to user preferences --- radioconfig.options | 5 ++++- radioconfig.proto | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/radioconfig.options b/radioconfig.options index 289b157..1a95b78 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -5,4 +5,7 @@ # Max of three ignored nodes for our testing *UserPreferences.ignore_incoming max_count:3 -*UserPreferences.mqtt_server max_size:32 \ No newline at end of file +*UserPreferences.mqtt_server max_size:32 +*UserPreferences.mqtt_username max_size:32 +*UserPreferences.mqtt_password max_size:32 + diff --git a/radioconfig.proto b/radioconfig.proto index c397d8b..369e92c 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -581,6 +581,14 @@ message RadioConfig { * */ uint32 hop_limit = 154; + + /* + * If set, will override the hardcoded mqtt credentials + * + */ + string mqtt_username = 155; + string mqtt_password = 156; + } UserPreferences preferences = 1; From 9d3e78a0db8c9353d8b04a8257eba92e235965e7 Mon Sep 17 00:00:00 2001 From: joshpirihi Date: Wed, 29 Dec 2021 06:29:03 +1300 Subject: [PATCH 2/2] Update radioconfig.proto with better documentation --- radioconfig.proto | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/radioconfig.proto b/radioconfig.proto index 369e92c..dce1120 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -583,10 +583,17 @@ message RadioConfig { uint32 hop_limit = 154; /* - * If set, will override the hardcoded mqtt credentials - * + * MQTT username to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default username */ string mqtt_username = 155; + + /* + * MQTT password to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default password + */ string mqtt_password = 156; }