You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replace Crypto files with CryptoInterface which uses BearSSL as a cryptographic backend.
- Move cryptographic functions from JsonTranslator to CryptoInterface.
- Make AP activation separate from FloodingMesh::begin().
- Fix English bug.
- Improve comments.
Copy file name to clipboardExpand all lines: libraries/ESP8266WiFiMesh/examples/HelloEspnow/HelloEspnow.ino
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -242,14 +242,14 @@ void setup() {
242
242
243
243
int32_t timeOfLastScan = -10000;
244
244
voidloop() {
245
-
// The performEspnowMaintainance() method performs all the background operations for the EspnowMeshBackend.
245
+
// The performEspnowMaintenance() method performs all the background operations for the EspnowMeshBackend.
246
246
// It is recommended to place it in the beginning of the loop(), unless there is a need to put it elsewhere.
247
247
// Among other things, the method cleans up old Espnow log entries (freeing up RAM) and sends the responses you provide to Espnow requests.
248
248
// Note that depending on the amount of responses to send and their length, this method can take tens or even hundreds of milliseconds to complete.
249
-
// More intense transmission activity and less frequent calls to performEspnowMaintainance will likely cause the method to take longer to complete, so plan accordingly.
249
+
// More intense transmission activity and less frequent calls to performEspnowMaintenance will likely cause the method to take longer to complete, so plan accordingly.
250
250
251
-
//Should not be used inside responseHandler, requestHandler, networkFilter or broadcastFilter callbacks since performEspnowMaintainance() can alter the ESP-NOW state.
252
-
EspnowMeshBackend::performEspnowMaintainance();
251
+
//Should not be used inside responseHandler, requestHandler, networkFilter or broadcastFilter callbacks since performEspnowMaintenance() can alter the ESP-NOW state.
252
+
EspnowMeshBackend::performEspnowMaintenance();
253
253
254
254
if (millis() - timeOfLastScan > 10000) { // Give other nodes some time to connect between data transfers.
// Wait for response. espnowDelay continuously calls performEspnowMaintainance() so we will respond to ESP-NOW request while waiting.
264
-
// Should not be used inside responseHandler, requestHandler, networkFilter or broadcastFilter callbacks since performEspnowMaintainance() can alter the ESP-NOW state.
263
+
// Wait for response. espnowDelay continuously calls performEspnowMaintenance() so we will respond to ESP-NOW request while waiting.
264
+
// Should not be used inside responseHandler, requestHandler, networkFilter or broadcastFilter callbacks since performEspnowMaintenance() can alter the ESP-NOW state.
265
265
espnowDelay(100);
266
266
267
267
// One way to check how attemptTransmission worked out
Copy file name to clipboardExpand all lines: libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,10 @@
1
+
/**
2
+
This example makes every node broadcast their AP MAC to the rest of the network during the first 28 seconds, as long as the node thinks it has the highest AP MAC in the network.
3
+
Once 28 seconds have passed, the node that has the highest AP MAC will start broadcasting benchmark messages, which will allow you to see how many messages are lost at the other nodes.
4
+
If you have an onboard LED on your ESP8266 it is recommended that you change the useLED variable below to true.
5
+
That way you will get instant confirmation of the mesh communication without checking the Serial Monitor.
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
137
-
digitalWrite(LED_BUILTIN, LOW); // Turn LED on (LED is active low)
145
+
digitalWrite(LED_BUILTIN, LOW); // Turn LED on (LED_BUILTIN is active low)
138
146
}
139
147
140
148
floodingMeshDelay(5000); // Give some time for user to start the nodes
@@ -146,12 +154,12 @@ void loop() {
146
154
staticuint32_t benchmarkCount = 0;
147
155
staticuint32_t loopStart = millis();
148
156
149
-
// The floodingMeshDelay() method performs all the background operations for the FloodingMesh (via FloodingMesh::performMeshMaintainance()).
157
+
// The floodingMeshDelay() method performs all the background operations for the FloodingMesh (via FloodingMesh::performMeshMaintenance()).
150
158
// It is recommended to place one of these methods in the beginning of the loop(), unless there is a need to put them elsewhere.
151
159
// Among other things, the method cleans up old ESP-NOW log entries (freeing up RAM) and forwards received mesh messages.
152
160
// Note that depending on the amount of messages to forward and their length, this method can take tens or even hundreds of milliseconds to complete.
153
-
// More intense transmission activity and less frequent calls to performMeshMaintainance will likely cause the method to take longer to complete, so plan accordingly.
154
-
// The maintainance methods should not be used inside the meshMessageHandler callback, since they can alter the mesh node state. The framework will alert you during runtime if you make this mistake.
161
+
// More intense transmission activity and less frequent calls to performMeshMaintenance will likely cause the method to take longer to complete, so plan accordingly.
162
+
// The maintenance methods should not be used inside the meshMessageHandler callback, since they can alter the mesh node state. The framework will alert you during runtime if you make this mistake.
155
163
floodingMeshDelay(1);
156
164
157
165
// If you wish to transmit only to a single node, try using one of the following methods (requires the node to be within range and know the MAC of the recipient):
0 commit comments