Skip to content

WiFi Mesh Update 2.2 #6280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d20177a
- Add new ESP-NOW mesh backend.
aerlon Jul 10, 2019
235b02e
Merge branch 'master' into wifi_mesh_update_2.2
earlephilhower Jul 28, 2019
26e626d
Merge branch 'master' into wifi_mesh_update_2.2
aerlon Aug 10, 2019
5834c54
- Add broadcast functionality.
aerlon Aug 10, 2019
2576a09
Merge branch 'master' into wifi_mesh_update_2.2
aerlon Sep 17, 2019
86025c7
- Make each mesh backend use a unique NetworkInfo class and separate …
aerlon Sep 18, 2019
b0ef919
Merge branch 'master' into wifi_mesh_update_2.2
aerlon Oct 29, 2019
f8ec4f1
- Make connectionQueue(), latestTransmissionOutcomes() and latestTran…
aerlon Oct 31, 2019
7ca5a7e
Fix conflict with master branch.
aerlon Nov 1, 2019
8194197
Even better fix of conflict with master branch.
aerlon Nov 1, 2019
176f285
Fix space.
aerlon Nov 1, 2019
6b76368
- Add working FloodingMesh. Unencrypted broadcasts should work well, …
aerlon Nov 3, 2019
78812a7
- Add HelloTcpIp.ino example for the TcpIpMeshBackend.
aerlon Nov 3, 2019
afc88f2
- Improve HelloMesh.ino.
aerlon Nov 4, 2019
3132325
- Replace Crypto files with CryptoInterface which uses BearSSL as a c…
aerlon Nov 5, 2019
2fef67d
- Generalize CryptoInterface.
aerlon Nov 10, 2019
962a23d
- Make it possible to transfer Strings containing null values via ESP…
aerlon Dec 4, 2019
a49f047
- Move all Strings to flash and optimize String usage, saving 4-5 kB …
aerlon Dec 21, 2019
16801f3
- Rework ExpiringTimeTracker to be based on PolledTimeout.
aerlon Mar 5, 2020
1dcd4c4
- Fix even more merge conflicts.
aerlon Mar 5, 2020
548d702
Merge branch 'master' into wifi_mesh_update_2.2
aerlon Mar 5, 2020
a24b8d2
Merge branch 'master' into wifi_mesh_update_2.2
devyte Apr 17, 2020
effcc3a
- Make everything const by default.
aerlon Apr 29, 2020
e64125a
- Move globals to anonymous namespaces.
aerlon May 5, 2020
2ec2679
- Move all serialization code to separate Serializer namespace and fi…
aerlon May 10, 2020
d01e639
- Fix build error.
aerlon May 11, 2020
3f5495b
Merge branch 'master' into wifi_mesh_update_2.2
aerlon May 15, 2020
40e1f02
- Split most of the EspnowMeshBackend code into utility files and the…
aerlon May 15, 2020
595fb23
Merge branch 'master' into wifi_mesh_update_2.2
aerlon May 18, 2020
f059e57
- Use the new Crypto, TypeConversion and random() functionality added…
aerlon May 18, 2020
0516b30
- Fix Readme links.
aerlon May 18, 2020
fba4ac1
- Make most type definitions public instead of protected, to facilita…
aerlon Jun 5, 2020
5661ec0
Merge branch 'master' into wifi_mesh_update_2.2
aerlon Jun 5, 2020
40b39f3
- Polish README.md.
aerlon Jun 5, 2020
1d2b6b5
- Make HelloMesh.ino stylish.
aerlon Jun 5, 2020
66138a6
- Add protected getters for _forwardingBacklog and _macIgnoreList in …
aerlon Jun 6, 2020
48281fb
- Correct terminology in README.md.
aerlon Jun 9, 2020
0662274
Merge branch 'master' into wifi_mesh_update_2.2
earlephilhower Jun 21, 2020
2ae3f6f
- Update README.md.
aerlon Jul 10, 2020
628298c
- Polish README.md.
aerlon Jul 12, 2020
7fbf620
Merge branch 'master' into wifi_mesh_update_2.2
devyte Mar 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions libraries/ESP8266WiFiMesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ ESP8266 WiFi Mesh

A library for turning your ESP8266 into a mesh network node.

The library has been tested and works with Arduino core for ESP8266 version 2.3.0 (with default lwIP) and 2.4.2 or higher (with lwIP 1.4 and lwIP2).
The library has been tested and works with Arduino core for ESP8266 version 2.6.0 (with lwIP2). It may work with earlier and later core releases, but this has not been tested during development.

**Note:** This mesh library has been rewritten for core release 2.4.2. The old method signatures have been retained for compatibility purposes, but will be removed in core release 2.5.0. If you are still using these old method signatures please consider migrating to the new API shown in the `ESP8266WiFiMesh.h` source file.
**Note:** This mesh library has been rewritten for core release 2.6.0. The old method signatures have been retained for compatibility purposes, but will be removed in core release 3.0.0. If you are still using these old method signatures please consider migrating to the new API shown in the `EspnowMeshBackend.h` or `TcpIpMeshBackend.h` source files.

Usage
-----
Expand Down Expand Up @@ -48,13 +48,17 @@ ESP8266WiFiMesh(requestHandlerType requestHandler, responseHandlerType responseH

### Note

* This library can use static IP:s for the nodes to speed up connection times. To enable this, use the `setStaticIP` method after calling the `begin` method, as in the included example. Ensure that nodes connecting to the same AP have distinct static IP:s. Node IP:s need to be at the same subnet as the server gateway (192.168.4 for this library by default). It may also be worth noting that station gateway IP must match the IP for the server on the nodes, though this is the default setting for the library.
* This library can use static IP:s for the nodes to speed up connection times. To enable this, use the `setStaticIP` method after calling the `begin` method, as in the included example. When using static IP, the following is good to keep in mind:

At the moment static IP is a global setting, meaning that all ESP8266WiFiMesh instances on the same ESP8266 share the same static IP settings.
Ensure that nodes connecting to the same AP have distinct static IP:s.

* When Arduino core for ESP8266 version 2.4.2 or higher is used, there are optimizations available for WiFi scans and static IP use to reduce the time it takes for nodes to connect to each other. These optimizations are enabled by default. To take advantage of the static IP optimizations you also need to use lwIP2. The lwIP version can be changed in the Tools menu of Arduino IDE.
Node IP:s need to be at the same subnet as the server gateway (192.168.4 for this library by default).

Station gateway IP must match the IP for the server on the nodes. This is the default setting for the library.

If you are using a core version prior to 2.4.2 it is possible to disable the WiFi scan and static IP optimizations by commenting out the `ENABLE_STATIC_IP_OPTIMIZATION` and `ENABLE_WIFI_SCAN_OPTIMIZATION` defines in ESP8266WiFiMesh.h. Press Ctrl+K in the Arduino IDE while an example from the mesh library is opened, to open the library folder (or click "Show Sketch Folder" in the Sketch menu). ESP8266WiFiMesh.h can then be found at ESP8266WiFiMesh/src. Edit the file with any text editor.
Static IP is a global setting (for now), meaning that all ESP8266WiFiMesh instances on the same ESP8266 share the same static IP settings.

* When Arduino core for ESP8266 version 2.4.2 or higher is used, there are optimizations available for WiFi scans and static IP use to reduce the time it takes for nodes to connect to each other. These optimizations are enabled by default. To take advantage of the static IP optimizations you also need to use lwIP2. The lwIP version can be changed in the Tools menu of Arduino IDE.

* The WiFi scan optimization mentioned above works by making WiFi scans only search through the same WiFi channel as the ESP8266WiFiMesh instance is using. If you would like to scan all WiFi channels instead, set the `scanAllWiFiChannels` argument of the `attemptTransmission` method to `true`. Note that scanning all WiFi channels will slow down scans considerably and make it more likely that existing WiFi connections will break during scans. Also note that if the ESP8266 has an active AP, that AP will switch WiFi channel to match that of any other AP the ESP8266 connects to (compare next bullet point). This can make it impossible for other nodes to detect the AP if they are scanning the wrong WiFi channel. To remedy this, force the AP back on the original channel by using the `restartAP` method of the current AP controller once the ESP8266 has disconnected from the other AP. This would typically be done like so:

Expand Down
Loading