Remove WITH_ESPNOW_BRIDGE_SECRET definition from platformio.ini files and update documentation to use _prefs->bridge_secret

This commit is contained in:
João Brázio 2025-10-03 00:23:09 +01:00
parent 8edcb46a28
commit e48f3a58ae
No known key found for this signature in database
GPG key ID: 56A1490716A324DD
21 changed files with 4 additions and 33 deletions

View file

@ -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.
*

View file

@ -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 =

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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

View file

@ -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 =

View file

@ -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>

View file

@ -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 =

View file

@ -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 =