From c81d090464ca9d69bda47f4ad4835650082bd93f Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 29 Jan 2021 10:14:36 +0800 Subject: [PATCH 1/8] someone added storerequest app? --- proto | 2 +- src/mesh/generated/deviceonly.pb.h | 2 +- src/mesh/generated/mesh.pb.h | 40 +++++++++++++++++++++++------- src/mesh/generated/portnums.pb.h | 1 + 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/proto b/proto index 855da8701..c9ad10d7e 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 855da8701edbb19818069ad8545d5b9f030bb33f +Subproject commit c9ad10d7e2f7f465dc477e98d6ec9d3b7059336c diff --git a/src/mesh/generated/deviceonly.pb.h b/src/mesh/generated/deviceonly.pb.h index c3e556669..a6388af96 100644 --- a/src/mesh/generated/deviceonly.pb.h +++ b/src/mesh/generated/deviceonly.pb.h @@ -80,7 +80,7 @@ extern const pb_msgdesc_t DeviceState_msg; #define DeviceState_fields &DeviceState_msg /* Maximum encoded size of messages (where known) */ -#define DeviceState_size 6206 +#define DeviceState_size 6239 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/mesh.pb.h b/src/mesh/generated/mesh.pb.h index 50ae14a6a..a13d7de56 100644 --- a/src/mesh/generated/mesh.pb.h +++ b/src/mesh/generated/mesh.pb.h @@ -57,6 +57,7 @@ typedef enum _ChargeCurrent { typedef enum _GpsOperation { GpsOperation_GpsOpUnset = 0, + GpsOperation_GpsOpStationary = 1, GpsOperation_GpsOpMobile = 2, GpsOperation_GpsOpTimeOnly = 3, GpsOperation_GpsOpDisabled = 4 @@ -183,6 +184,13 @@ typedef struct _RadioConfig_UserPreferences { uint32_t serialplugin_rxd; uint32_t serialplugin_txd; uint32_t serialplugin_timeout; + uint32_t serialplugin_mode; + bool ext_notification_plugin_enabled; + uint32_t ext_notification_plugin_output_ms; + uint32_t ext_notification_plugin_output; + bool ext_notification_plugin_active; + bool ext_notification_plugin_alert_message; + bool ext_notification_plugin_alert_bell; } RadioConfig_UserPreferences; typedef struct _RouteDiscovery { @@ -305,8 +313,8 @@ typedef struct _ToRadio { #define _LocationSharing_ARRAYSIZE ((LocationSharing)(LocationSharing_LocDisabled+1)) #define _CriticalErrorCode_MIN CriticalErrorCode_None -#define _CriticalErrorCode_MAX CriticalErrorCode_InvalidRadioSetting -#define _CriticalErrorCode_ARRAYSIZE ((CriticalErrorCode)(CriticalErrorCode_InvalidRadioSetting+1)) +#define _CriticalErrorCode_MAX CriticalErrorCode_TransmitFailed +#define _CriticalErrorCode_ARRAYSIZE ((CriticalErrorCode)(CriticalErrorCode_TransmitFailed+1)) #define _ChannelSettings_ModemConfig_MIN ChannelSettings_ModemConfig_Bw125Cr45Sf128 #define _ChannelSettings_ModemConfig_MAX ChannelSettings_ModemConfig_Bw125Cr48Sf4096 @@ -330,7 +338,7 @@ extern "C" { #define MeshPacket_init_default {0, 0, 0, {SubPacket_init_default}, 0, 0, 0, 0, 0, 0} #define ChannelSettings_init_default {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, "", 0, 0, 0, 0, 0, 0, 0} #define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default, false, ChannelSettings_init_default} -#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0} +#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #define NodeInfo_init_default {0, false, User_init_default, false, Position_init_default, 0, 0} #define MyNodeInfo_init_default {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0} #define LogRecord_init_default {"", 0, "", _LogRecord_Level_MIN} @@ -344,7 +352,7 @@ extern "C" { #define MeshPacket_init_zero {0, 0, 0, {SubPacket_init_zero}, 0, 0, 0, 0, 0, 0} #define ChannelSettings_init_zero {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, "", 0, 0, 0, 0, 0, 0, 0} #define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero, false, ChannelSettings_init_zero} -#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0} +#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #define NodeInfo_init_zero {0, false, User_init_zero, false, Position_init_zero, 0, 0} #define MyNodeInfo_init_zero {0, 0, 0, "", "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0} #define LogRecord_init_zero {"", 0, "", _LogRecord_Level_MIN} @@ -418,6 +426,13 @@ extern "C" { #define RadioConfig_UserPreferences_serialplugin_rxd_tag 122 #define RadioConfig_UserPreferences_serialplugin_txd_tag 123 #define RadioConfig_UserPreferences_serialplugin_timeout_tag 124 +#define RadioConfig_UserPreferences_serialplugin_mode_tag 125 +#define RadioConfig_UserPreferences_ext_notification_plugin_enabled_tag 126 +#define RadioConfig_UserPreferences_ext_notification_plugin_output_ms_tag 127 +#define RadioConfig_UserPreferences_ext_notification_plugin_output_tag 128 +#define RadioConfig_UserPreferences_ext_notification_plugin_active_tag 129 +#define RadioConfig_UserPreferences_ext_notification_plugin_alert_message_tag 130 +#define RadioConfig_UserPreferences_ext_notification_plugin_alert_bell_tag 131 #define RouteDiscovery_route_tag 2 #define User_id_tag 1 #define User_long_name_tag 2 @@ -585,7 +600,14 @@ X(a, STATIC, SINGULAR, BOOL, serialplugin_enabled, 120) \ X(a, STATIC, SINGULAR, BOOL, serialplugin_echo, 121) \ X(a, STATIC, SINGULAR, UINT32, serialplugin_rxd, 122) \ X(a, STATIC, SINGULAR, UINT32, serialplugin_txd, 123) \ -X(a, STATIC, SINGULAR, UINT32, serialplugin_timeout, 124) +X(a, STATIC, SINGULAR, UINT32, serialplugin_timeout, 124) \ +X(a, STATIC, SINGULAR, UINT32, serialplugin_mode, 125) \ +X(a, STATIC, SINGULAR, BOOL, ext_notification_plugin_enabled, 126) \ +X(a, STATIC, SINGULAR, UINT32, ext_notification_plugin_output_ms, 127) \ +X(a, STATIC, SINGULAR, UINT32, ext_notification_plugin_output, 128) \ +X(a, STATIC, SINGULAR, BOOL, ext_notification_plugin_active, 129) \ +X(a, STATIC, SINGULAR, BOOL, ext_notification_plugin_alert_message, 130) \ +X(a, STATIC, SINGULAR, BOOL, ext_notification_plugin_alert_bell, 131) #define RadioConfig_UserPreferences_CALLBACK NULL #define RadioConfig_UserPreferences_DEFAULT NULL @@ -697,13 +719,13 @@ extern const pb_msgdesc_t ToRadio_msg; #define SubPacket_size 275 #define MeshPacket_size 320 #define ChannelSettings_size 95 -#define RadioConfig_size 349 -#define RadioConfig_UserPreferences_size 249 +#define RadioConfig_size 382 +#define RadioConfig_UserPreferences_size 282 #define NodeInfo_size 132 #define MyNodeInfo_size 106 #define LogRecord_size 81 -#define FromRadio_size 358 -#define ToRadio_size 353 +#define FromRadio_size 391 +#define ToRadio_size 386 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/portnums.pb.h b/src/mesh/generated/portnums.pb.h index 91c988fdc..99df1222d 100644 --- a/src/mesh/generated/portnums.pb.h +++ b/src/mesh/generated/portnums.pb.h @@ -19,6 +19,7 @@ typedef enum _PortNum { PortNum_REPLY_APP = 32, PortNum_IP_TUNNEL_APP = 33, PortNum_SERIAL_APP = 64, + PortNum_STORE_REQUEST_APP = 65, PortNum_PRIVATE_APP = 256, PortNum_ATAK_FORWARDER = 257 } PortNum; From 7f077258400ce081c6eff6dd99c78e64ffee3927 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 29 Jan 2021 10:15:48 +0800 Subject: [PATCH 2/8] make improperly sized AES128/256 keys non fatal, instead pad with zeros Fixes rebooting the board if someone specifies an invalid key --- src/mesh/NodeDB.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 42ce71ea7..ea79e6ccb 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -180,10 +180,14 @@ bool NodeDB::resetRadioConfig() channelSettings.psk.size = 1; } - // Convert the short single byte variants of psk into variant that can be used more generally + memset(activePSK, 0, sizeof(activePSK)); // In case the user provided a short key, we want to pad the rest with zeros memcpy(activePSK, channelSettings.psk.bytes, channelSettings.psk.size); activePSKSize = channelSettings.psk.size; - if (activePSKSize == 1) { + if(activePSKSize == 0) + DEBUG_MSG("Warning: User disabled encryption\n"); + else if (activePSKSize == 1) { + // Convert the short single byte variants of psk into variant that can be used more generally + uint8_t pskIndex = activePSK[0]; DEBUG_MSG("Expanding short PSK #%d\n", pskIndex); if (pskIndex == 0) @@ -195,6 +199,16 @@ bool NodeDB::resetRadioConfig() uint8_t *last = activePSK + sizeof(defaultpsk) - 1; *last = *last + pskIndex - 1; // index of 1 means no change vs defaultPSK } + } else if(activePSKSize < 16) { + // Error! The user specified only the first few bits of an AES128 key. So by convention we just pad the rest of the key + // with zeros + DEBUG_MSG("Warning: User provided a too short AES128 key - padding\n"); + activePSKSize = 16; + } else if(activePSKSize < 32 && activePSKSize != 16) { + // Error! The user specified only the first few bits of an AES256 key. So by convention we just pad the rest of the key + // with zeros + DEBUG_MSG("Warning: User provided a too short AES256 key - padding\n"); + activePSKSize = 32; } // Tell our crypto engine about the psk From c6f34c59b4c91247a869d1c6a394218000fb5e86 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 29 Jan 2021 13:26:08 +0800 Subject: [PATCH 3/8] Update to logo by @thepoweroftwo --- .gitmodules | 3 ++ bin/gen-images.sh | 19 +++++++++++ {images => deprecated}/icon-18dp.png | Bin {images => deprecated}/icon-24px.svg | 0 {images => deprecated}/icon.png | Bin design | 1 + images/genfiles.sh | 11 ------ src/graphics/img/icon.xbm | 49 ++++++++++----------------- 8 files changed, 41 insertions(+), 42 deletions(-) create mode 100755 bin/gen-images.sh rename {images => deprecated}/icon-18dp.png (100%) rename {images => deprecated}/icon-24px.svg (100%) rename {images => deprecated}/icon.png (100%) create mode 160000 design delete mode 100755 images/genfiles.sh diff --git a/.gitmodules b/.gitmodules index 785c573a4..4f9bb6b77 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "sdk-nrfxlib"] path = sdk-nrfxlib url = https://github.com/nrfconnect/sdk-nrfxlib.git +[submodule "design"] + path = design + url = https://github.com/meshtastic/meshtastic-design.git diff --git a/bin/gen-images.sh b/bin/gen-images.sh new file mode 100755 index 000000000..c4335718e --- /dev/null +++ b/bin/gen-images.sh @@ -0,0 +1,19 @@ + + +set -e + +# regen the design bins first +cd design +bin/generate-pngs.sh +cd .. + +# assumes 50 wide, 28 high +convert design/logo/png/Mesh_Logo_Black_Small.png -background white -alpha Background src/graphics/img/icon.xbm + +inkscape --batch-process -o images/compass.png -w 48 -h 48 images/location_searching-24px.svg +convert compass.png -background white -alpha Background src/graphics/img/compass.xbm + +inkscape --batch-process -o images/face.png -w 13 -h 13 images/face-24px.svg + +inkscape --batch-process -o images/pin.png -w 13 -h 13 images/room-24px.svg +convert pin.png -background white -alpha Background src/graphics/img/pin.xbm diff --git a/images/icon-18dp.png b/deprecated/icon-18dp.png similarity index 100% rename from images/icon-18dp.png rename to deprecated/icon-18dp.png diff --git a/images/icon-24px.svg b/deprecated/icon-24px.svg similarity index 100% rename from images/icon-24px.svg rename to deprecated/icon-24px.svg diff --git a/images/icon.png b/deprecated/icon.png similarity index 100% rename from images/icon.png rename to deprecated/icon.png diff --git a/design b/design new file mode 160000 index 000000000..73ba05cee --- /dev/null +++ b/design @@ -0,0 +1 @@ +Subproject commit 73ba05ceef8beff81eb546a0b9e8ecad03a1216d diff --git a/images/genfiles.sh b/images/genfiles.sh deleted file mode 100755 index bc14f6e8e..000000000 --- a/images/genfiles.sh +++ /dev/null @@ -1,11 +0,0 @@ -# using height of 50 to have 14 pixels beneath icon for text -inkscape -z -e icon.png -w 50 -h 50 icon-24px.svg -convert icon.png -background white -alpha Background ../src/icon.xbm - -inkscape -z -e compass.png -w 48 -h 48 location_searching-24px.svg -convert compass.png -background white -alpha Background ../src/compass.xbm - -inkscape -z -e face.png -w 13 -h 13 face-24px.svg - -inkscape -z -e pin.png -w 13 -h 13 room-24px.svg -convert pin.png -background white -alpha Background ../src/pin.xbm diff --git a/src/graphics/img/icon.xbm b/src/graphics/img/icon.xbm index d7394c8e7..2b698e4c9 100644 --- a/src/graphics/img/icon.xbm +++ b/src/graphics/img/icon.xbm @@ -1,33 +1,20 @@ #define icon_width 50 -#define icon_height 50 +#define icon_height 28 static char icon_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, - 0xFF, 0x07, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, - 0xF0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x00, - 0x00, 0x00, 0xFE, 0x0F, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xFF, 0x03, 0x00, - 0xFF, 0x03, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xFC, 0x07, 0x00, 0xC0, 0x3F, - 0xE0, 0x1F, 0xF0, 0x0F, 0x00, 0xC0, 0x1F, 0xFC, 0xFF, 0xE0, 0x0F, 0x00, - 0xE0, 0x0F, 0xFF, 0xFF, 0xC3, 0x1F, 0x00, 0xF0, 0x87, 0xFF, 0xFF, 0x87, - 0x3F, 0x00, 0xF0, 0xC3, 0xFF, 0xFF, 0x0F, 0x3F, 0x00, 0xF8, 0xE3, 0x7F, - 0xF8, 0x1F, 0x7F, 0x00, 0xF8, 0xF1, 0x0F, 0xC0, 0x3F, 0x7E, 0x00, 0xF8, - 0xF1, 0x07, 0x80, 0x3F, 0x7E, 0x00, 0xFC, 0xF8, 0x03, 0x00, 0x7F, 0xFC, - 0x00, 0xFC, 0xF8, 0x81, 0x07, 0x7E, 0xFC, 0x00, 0x7C, 0xF8, 0xE0, 0x1F, - 0x7C, 0xF8, 0x00, 0x7C, 0xFC, 0xF0, 0x3F, 0xFC, 0xF8, 0x00, 0x7C, 0xFC, - 0xF0, 0x3F, 0xFC, 0xF8, 0x00, 0x7C, 0x7C, 0xF8, 0x7F, 0xF8, 0xF8, 0x00, - 0x7C, 0x7C, 0xF8, 0x7F, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, - 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFC, 0x03, 0x00, - 0x00, 0x00, 0x80, 0x7F, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, }; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x80, 0x07, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x1F, + 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0x00, 0x00, 0x00, + 0xE0, 0x0F, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x07, 0xF0, 0x3F, 0x00, + 0x00, 0x00, 0xF8, 0x03, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0xFC, + 0x7F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0xFE, 0x00, 0x00, 0x00, 0xFE, + 0x00, 0xFE, 0xFC, 0x01, 0x00, 0x00, 0xFE, 0x00, 0x7F, 0xFC, 0x01, 0x00, + 0x00, 0x7F, 0x00, 0x3F, 0xF8, 0x03, 0x00, 0x80, 0x3F, 0x80, 0x3F, 0xF0, + 0x07, 0x00, 0x80, 0x3F, 0xC0, 0x1F, 0xF0, 0x07, 0x00, 0xC0, 0x1F, 0xC0, + 0x0F, 0xE0, 0x0F, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0xC0, 0x1F, 0x00, 0xE0, + 0x0F, 0xF0, 0x07, 0x80, 0x1F, 0x00, 0xF0, 0x07, 0xF8, 0x03, 0x80, 0x3F, + 0x00, 0xF8, 0x03, 0xF8, 0x03, 0x00, 0x7F, 0x00, 0xFC, 0x03, 0xFC, 0x01, + 0x00, 0x7E, 0x00, 0xFC, 0x01, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0xFE, 0x00, + 0xFE, 0x00, 0x00, 0xFC, 0x01, 0x7E, 0x00, 0x7F, 0x00, 0x00, 0xF8, 0x01, + 0x7E, 0x00, 0x3E, 0x00, 0x00, 0xF8, 0x01, 0x38, 0x00, 0x3C, 0x00, 0x00, + 0x70, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; From c0e2ec8decf4df3d5d01d5a2b5e14cf293ff9442 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 30 Jan 2021 21:23:03 +0800 Subject: [PATCH 4/8] 1.1.34 --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 556f3f840..dd592ccf0 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 1 minor = 1 -build = 33 +build = 34 From 5df08410e78c38782578bd7dce20346dfba7bb4e Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 30 Jan 2021 09:39:40 -0800 Subject: [PATCH 5/8] Create SerialPlugin.md --- docs/software/plugins/SerialPlugin.md | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/software/plugins/SerialPlugin.md diff --git a/docs/software/plugins/SerialPlugin.md b/docs/software/plugins/SerialPlugin.md new file mode 100644 index 000000000..bce84653c --- /dev/null +++ b/docs/software/plugins/SerialPlugin.md @@ -0,0 +1,40 @@ +# SerialPlugin + +A simple interface to send messages over the mesh network by sending strings +over a serial port. + +Default is to use RX GPIO 16 and TX GPIO 17. + + +# Basic Usage: + + 1) Enable the plugin by setting serialplugin_enabled to 1. + 2) Set the pins (serialplugin_rxd / serialplugin_rxd) for your preferred RX and TX GPIO pins. + On tbeam, recommend to use: + RXD 35 + TXD 15 + 3) Set serialplugin_timeout to the amount of time to wait before we consider + your packet as "done". + 4) (Optional) In SerialPlugin.h set the port to PortNum_TEXT_MESSAGE_APP if you want to + send messages to/from the general text message channel. + 5) Connect to your device over the serial interface at 38400 8N1. + 6) Send a packet up to 240 bytes in length. This will get relayed over the mesh network. + 7) (Optional) Set serialplugin_echo to 1 and any message you send out will be echoed back + to your device. + +# TODO (in this order): + +* Define a verbose RX mode to report on mesh and packet infomration. + - This won't happen any time soon. + +# Known Problems + + * Until the plugin is initilized by the startup sequence, the TX pin is in a floating + state. Device connected to that pin may see this as "noise". + * Will not work on NRF and the Linux device targets. + +# Need help? + +Need help with this plugin? Post your question on the Meshtastic Discourse: + +https://meshtastic.discourse.group From 133a7ff166a1216e612c31e3bae8ef0aef374537 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 30 Jan 2021 09:46:26 -0800 Subject: [PATCH 6/8] Added more notes. --- .../software/plugins/ExternalNotificationPlugin.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/software/plugins/ExternalNotificationPlugin.md b/docs/software/plugins/ExternalNotificationPlugin.md index 2afb52d42..dda95e4c4 100644 --- a/docs/software/plugins/ExternalNotificationPlugin.md +++ b/docs/software/plugins/ExternalNotificationPlugin.md @@ -1,4 +1,4 @@ -Documentation for ExternalNotification Plugin +The ExternalNotification Plugin will allow you to connect a speaker, LED or other device to notify you when a message has been received from the mesh network. # Configuration @@ -44,9 +44,9 @@ These are the settings that can be configured. For basic usage, start with: ext_notification_plugin_enabled = 1 - ext_notification_plugin_alert_message = 1 + ext_notification_plugin_alert_message = 1 -Depending on how your external configured is configured, you may need to set the active state to true. +Depending on how your external cirtcuit configured is configured, you may need to set the active state to true. ext_notification_plugin_active = 1 @@ -54,11 +54,19 @@ Depending on how your external configured is configured, you may need to set the Be mindful of the max current sink and source of the esp32 GPIO. The easiest devices to interface with would be either an LED or Active Buzzer. +Ideas for external hardware: + +* LED +* Active Buzzer +* Flame thrower +* Strobe Light +* Siren # Known Problems * This won't directly support an passive (normal) speaker as it does not generate any audio wave forms. * This currently only supports the esp32. Other targets may be possible, I just don't have to test with. +* This plugin only monitors text messages. We won't trigger on any other packet types. # Need more help? From 092af0f9f9b48272a367bb0062ff62fa88b4b7ae Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 30 Jan 2021 09:50:19 -0800 Subject: [PATCH 7/8] Update to doc to add info on the bell character --- docs/software/plugins/ExternalNotificationPlugin.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/software/plugins/ExternalNotificationPlugin.md b/docs/software/plugins/ExternalNotificationPlugin.md index dda95e4c4..de9f33ad5 100644 --- a/docs/software/plugins/ExternalNotificationPlugin.md +++ b/docs/software/plugins/ExternalNotificationPlugin.md @@ -49,6 +49,18 @@ For basic usage, start with: Depending on how your external cirtcuit configured is configured, you may need to set the active state to true. ext_notification_plugin_active = 1 + +## Alert Types + +We support being alerted on two events: + +1) Incoming Text Message + +2) Incoming Text Message that contains the ascii bell character. At present, only the Python API can send an ascii bell character, but more support may be added in the future. + +### Bell Character + +The bell character is ASCII 0x07. Include 0x07 anywhere in the text message and with ext_notification_plugin_alert_bell enabled, we will issue an external notification. # External Hardware From 48b38ed94bd16872b64a957d01f21df88d078464 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 30 Jan 2021 17:21:54 -0800 Subject: [PATCH 8/8] Update documentation --- docs/software/plugins/ExternalNotificationPlugin.md | 2 ++ docs/software/plugins/SerialPlugin.md | 2 +- docs/software/plugins/StoreRequestPlugin.md | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 docs/software/plugins/StoreRequestPlugin.md diff --git a/docs/software/plugins/ExternalNotificationPlugin.md b/docs/software/plugins/ExternalNotificationPlugin.md index de9f33ad5..c0814b6c3 100644 --- a/docs/software/plugins/ExternalNotificationPlugin.md +++ b/docs/software/plugins/ExternalNotificationPlugin.md @@ -1,3 +1,5 @@ +# About + The ExternalNotification Plugin will allow you to connect a speaker, LED or other device to notify you when a message has been received from the mesh network. # Configuration diff --git a/docs/software/plugins/SerialPlugin.md b/docs/software/plugins/SerialPlugin.md index bce84653c..acd777e35 100644 --- a/docs/software/plugins/SerialPlugin.md +++ b/docs/software/plugins/SerialPlugin.md @@ -1,4 +1,4 @@ -# SerialPlugin +# About A simple interface to send messages over the mesh network by sending strings over a serial port. diff --git a/docs/software/plugins/StoreRequestPlugin.md b/docs/software/plugins/StoreRequestPlugin.md new file mode 100644 index 000000000..239a00de8 --- /dev/null +++ b/docs/software/plugins/StoreRequestPlugin.md @@ -0,0 +1,6 @@ +# About + + + +# Running notes +