Browse Source
Remove WITH_ESPNOW_BRIDGE_SECRET definition from platformio.ini files and update documentation to use _prefs->bridge_secret
pull/831/head
João Brázio
8 months ago
No known key found for this signature in database
GPG Key ID: 56A1490716A324DD
21 changed files with
4 additions and
33 deletions
-
src/helpers/bridges/ESPNowBridge.h
-
variants/generic-e22/platformio.ini
-
variants/heltec_ct62/platformio.ini
-
variants/heltec_e213/platformio.ini
-
variants/heltec_e290/platformio.ini
-
variants/heltec_t190/platformio.ini
-
variants/heltec_tracker/platformio.ini
-
variants/heltec_v2/platformio.ini
-
variants/heltec_v3/platformio.ini
-
variants/heltec_v4/platformio.ini
-
variants/heltec_wireless_paper/platformio.ini
-
variants/lilygo_t3s3/platformio.ini
-
variants/lilygo_t3s3_sx1276/platformio.ini
-
variants/lilygo_tbeam_SX1262/platformio.ini
-
variants/lilygo_tbeam_SX1276/platformio.ini
-
variants/lilygo_tbeam_supreme_SX1262/platformio.ini
-
variants/lilygo_tlora_v2_1/platformio.ini
-
variants/meshadventurer/platformio.ini
-
variants/station_g2/platformio.ini
-
variants/tenstar_c3/platformio.ini
-
variants/xiao_s3_wio/platformio.ini
|
|
|
@ -6,10 +6,6 @@ |
|
|
|
|
|
|
|
#ifdef WITH_ESPNOW_BRIDGE |
|
|
|
|
|
|
|
#ifndef WITH_ESPNOW_BRIDGE_SECRET |
|
|
|
#error WITH_ESPNOW_BRIDGE_SECRET must be defined to use ESPNowBridge |
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Bridge implementation using ESP-NOW protocol for packet transport |
|
|
|
* |
|
|
|
@ -36,11 +32,11 @@ |
|
|
|
* |
|
|
|
* Configuration: |
|
|
|
* - Define WITH_ESPNOW_BRIDGE to enable this bridge |
|
|
|
* - Define WITH_ESPNOW_BRIDGE_SECRET with a string to set the network encryption key |
|
|
|
* - Define _prefs->bridge_secret with a string to set the network encryption key |
|
|
|
* |
|
|
|
* Network Isolation: |
|
|
|
* Multiple independent mesh networks can coexist by using different |
|
|
|
* WITH_ESPNOW_BRIDGE_SECRET values. Packets encrypted with a different key will |
|
|
|
* _prefs->bridge_secret values. Packets encrypted with a different key will |
|
|
|
* fail the checksum validation and be discarded. |
|
|
|
*/ |
|
|
|
class ESPNowBridge : public BridgeBase { |
|
|
|
@ -76,8 +72,8 @@ private: |
|
|
|
/**
|
|
|
|
* Performs XOR encryption/decryption of data |
|
|
|
* Used to isolate different mesh networks |
|
|
|
* |
|
|
|
* Uses WITH_ESPNOW_BRIDGE_SECRET as the key in a simple XOR operation. |
|
|
|
* |
|
|
|
* Uses _prefs->bridge_secret as the key in a simple XOR operation. |
|
|
|
* The same operation is used for both encryption and decryption. |
|
|
|
* While not cryptographically secure, it provides basic network isolation. |
|
|
|
* |
|
|
|
|
|
|
|
@ -87,7 +87,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
@ -154,7 +153,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
|
|
|
|
@ -80,7 +80,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_ct62.build_src_filter} |
|
|
|
|
|
|
|
@ -127,7 +127,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_E213_base.build_src_filter} |
|
|
|
|
|
|
|
@ -123,7 +123,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_E290_base.build_src_filter} |
|
|
|
|
|
|
|
@ -125,7 +125,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_T190_base.build_src_filter} |
|
|
|
|
|
|
|
@ -116,7 +116,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_tracker_base.build_src_filter} |
|
|
|
|
|
|
|
@ -75,7 +75,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_lora32_v2.build_src_filter} |
|
|
|
|
|
|
|
@ -83,7 +83,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter} |
|
|
|
@ -263,7 +262,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_lora32_v3.build_src_filter} |
|
|
|
|
|
|
|
@ -77,7 +77,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_lora32_v4.build_src_filter} |
|
|
|
|
|
|
|
@ -102,7 +102,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter} |
|
|
|
|
|
|
|
@ -86,7 +86,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${LilyGo_T3S3_sx1262.build_src_filter} |
|
|
|
|
|
|
|
@ -84,7 +84,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${LilyGo_T3S3_sx1276.build_src_filter} |
|
|
|
|
|
|
|
@ -105,7 +105,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${LilyGo_TBeam_SX1262.build_src_filter} |
|
|
|
|
|
|
|
@ -105,7 +105,6 @@ build_flags = |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D PERSISTANT_GPS=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${LilyGo_TBeam_SX1276.build_src_filter} |
|
|
|
|
|
|
|
@ -83,7 +83,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${T_Beam_S3_Supreme_SX1262.build_src_filter} |
|
|
|
|
|
|
|
@ -197,7 +197,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
; -D CORE_DEBUG_LEVEL=3 |
|
|
|
|
|
|
|
@ -96,7 +96,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
@ -166,7 +165,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
|
|
|
|
@ -76,7 +76,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Station_G2.build_src_filter} |
|
|
|
@ -139,7 +138,6 @@ build_flags = |
|
|
|
-D MESH_PACKET_LOGGING=1 |
|
|
|
-D SX126X_RX_BOOSTED_GAIN=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
build_src_filter = ${Station_G2.build_src_filter} |
|
|
|
+<helpers/bridges/ESPNowBridge.cpp> |
|
|
|
|
|
|
|
@ -86,7 +86,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
@ -153,7 +152,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
|
|
|
|
@ -78,7 +78,6 @@ build_flags = |
|
|
|
-D ADMIN_PASSWORD='"password"' |
|
|
|
-D MAX_NEIGHBOURS=8 |
|
|
|
-D WITH_ESPNOW_BRIDGE=1 |
|
|
|
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"' |
|
|
|
; -D MESH_PACKET_LOGGING=1 |
|
|
|
; -D MESH_DEBUG=1 |
|
|
|
lib_deps = |
|
|
|
|