Skip to content

Commit e48f3a5

Browse files
committed
Remove WITH_ESPNOW_BRIDGE_SECRET definition from platformio.ini files and update documentation to use _prefs->bridge_secret
1 parent 8edcb46 commit e48f3a5

File tree

21 files changed

+4
-33
lines changed

21 files changed

+4
-33
lines changed

src/helpers/bridges/ESPNowBridge.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
#ifdef WITH_ESPNOW_BRIDGE
88

9-
#ifndef WITH_ESPNOW_BRIDGE_SECRET
10-
#error WITH_ESPNOW_BRIDGE_SECRET must be defined to use ESPNowBridge
11-
#endif
12-
139
/**
1410
* @brief Bridge implementation using ESP-NOW protocol for packet transport
1511
*
@@ -36,11 +32,11 @@
3632
*
3733
* Configuration:
3834
* - Define WITH_ESPNOW_BRIDGE to enable this bridge
39-
* - Define WITH_ESPNOW_BRIDGE_SECRET with a string to set the network encryption key
35+
* - Define _prefs->bridge_secret with a string to set the network encryption key
4036
*
4137
* Network Isolation:
4238
* Multiple independent mesh networks can coexist by using different
43-
* WITH_ESPNOW_BRIDGE_SECRET values. Packets encrypted with a different key will
39+
* _prefs->bridge_secret values. Packets encrypted with a different key will
4440
* fail the checksum validation and be discarded.
4541
*/
4642
class ESPNowBridge : public BridgeBase {
@@ -76,8 +72,8 @@ class ESPNowBridge : public BridgeBase {
7672
/**
7773
* Performs XOR encryption/decryption of data
7874
* Used to isolate different mesh networks
79-
*
80-
* Uses WITH_ESPNOW_BRIDGE_SECRET as the key in a simple XOR operation.
75+
*
76+
* Uses _prefs->bridge_secret as the key in a simple XOR operation.
8177
* The same operation is used for both encryption and decryption.
8278
* While not cryptographically secure, it provides basic network isolation.
8379
*

variants/generic-e22/platformio.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ build_flags =
8787
-D ADMIN_PASSWORD='"password"'
8888
-D MAX_NEIGHBOURS=8
8989
-D WITH_ESPNOW_BRIDGE=1
90-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
9190
; -D MESH_PACKET_LOGGING=1
9291
; -D MESH_DEBUG=1
9392
lib_deps =
@@ -154,7 +153,6 @@ build_flags =
154153
-D ADMIN_PASSWORD='"password"'
155154
-D MAX_NEIGHBOURS=8
156155
-D WITH_ESPNOW_BRIDGE=1
157-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
158156
; -D MESH_PACKET_LOGGING=1
159157
; -D MESH_DEBUG=1
160158
lib_deps =

variants/heltec_ct62/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ build_flags =
8080
-D ADMIN_PASSWORD='"password"'
8181
-D MAX_NEIGHBOURS=8
8282
-D WITH_ESPNOW_BRIDGE=1
83-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
8483
; -D MESH_PACKET_LOGGING=1
8584
; -D MESH_DEBUG=1
8685
build_src_filter = ${Heltec_ct62.build_src_filter}

variants/heltec_e213/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ build_flags =
127127
-D ADMIN_PASSWORD='"password"'
128128
-D MAX_NEIGHBOURS=8
129129
-D WITH_ESPNOW_BRIDGE=1
130-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
131130
; -D MESH_PACKET_LOGGING=1
132131
; -D MESH_DEBUG=1
133132
build_src_filter = ${Heltec_E213_base.build_src_filter}

variants/heltec_e290/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ build_flags =
123123
-D ADMIN_PASSWORD='"password"'
124124
-D MAX_NEIGHBOURS=8
125125
-D WITH_ESPNOW_BRIDGE=1
126-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
127126
; -D MESH_PACKET_LOGGING=1
128127
; -D MESH_DEBUG=1
129128
build_src_filter = ${Heltec_E290_base.build_src_filter}

variants/heltec_t190/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ build_flags =
125125
-D ADMIN_PASSWORD='"password"'
126126
-D MAX_NEIGHBOURS=8
127127
-D WITH_ESPNOW_BRIDGE=1
128-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
129128
; -D MESH_PACKET_LOGGING=1
130129
; -D MESH_DEBUG=1
131130
build_src_filter = ${Heltec_T190_base.build_src_filter}

variants/heltec_tracker/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ build_flags =
116116
-D ADMIN_PASSWORD='"password"'
117117
-D MAX_NEIGHBOURS=8
118118
-D WITH_ESPNOW_BRIDGE=1
119-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
120119
; -D MESH_PACKET_LOGGING=1
121120
; -D MESH_DEBUG=1
122121
build_src_filter = ${Heltec_tracker_base.build_src_filter}

variants/heltec_v2/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ build_flags =
7575
-D ADMIN_PASSWORD='"password"'
7676
-D MAX_NEIGHBOURS=8
7777
-D WITH_ESPNOW_BRIDGE=1
78-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
7978
; -D MESH_PACKET_LOGGING=1
8079
; -D MESH_DEBUG=1
8180
build_src_filter = ${Heltec_lora32_v2.build_src_filter}

variants/heltec_v3/platformio.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ build_flags =
8383
-D ADMIN_PASSWORD='"password"'
8484
-D MAX_NEIGHBOURS=8
8585
-D WITH_ESPNOW_BRIDGE=1
86-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
8786
; -D MESH_PACKET_LOGGING=1
8887
; -D MESH_DEBUG=1
8988
build_src_filter = ${Heltec_lora32_v3.build_src_filter}
@@ -263,7 +262,6 @@ build_flags =
263262
-D ADMIN_PASSWORD='"password"'
264263
-D MAX_NEIGHBOURS=8
265264
-D WITH_ESPNOW_BRIDGE=1
266-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
267265
; -D MESH_PACKET_LOGGING=1
268266
; -D MESH_DEBUG=1
269267
build_src_filter = ${Heltec_lora32_v3.build_src_filter}

variants/heltec_v4/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ build_flags =
7777
-D ADMIN_PASSWORD='"password"'
7878
-D MAX_NEIGHBOURS=8
7979
-D WITH_ESPNOW_BRIDGE=1
80-
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
8180
; -D MESH_PACKET_LOGGING=1
8281
; -D MESH_DEBUG=1
8382
build_src_filter = ${Heltec_lora32_v4.build_src_filter}

0 commit comments

Comments
 (0)