warp-more-hardware / esp32-firmware

TinkerForge WARP software for more hardware
14 stars 1 forks source link

Implement Mesh networking #11

Closed bs-github closed 1 year ago

bs-github commented 1 year ago

I'd like to have mesh networking for the ESP32 WiFi. Less infrastructure is less maintenance and a lower investment in the first place. Therefore I'd like to have the capability of a bunch of WARP chargers to form a WiFi mesh network and utilise that to do load management.

The solution I'd like I'd like to have the ESP32 run in AP+STA mode and build a WiFi MESH to form a load management setup that spans a bigger area easily. https://www.espressif.com/en/products/sdks/esp-wifi-mesh/overview

Alternatives More hardware. I.e. WiFi access points. Obviously possible, but not desirable.

Additional context The ESP32 in Access point mode by default can have only 4 WiFi clients. This limit can be upped to 10 at compile time. That is not enough and does not scale in two dimensions.

  1. Number of WIFI devices obviously. If, in addition to multiple WARP chargers, mobile devices as clients to access the web ui come into play, 4-10 is surely enough for one charger, but not a load management setup.
  2. Geographical expanse. The WiFi range of the ESP32 is limited and a parking lot can easily span a larger area and therefore extending the WiFi coverage would be a big plus as well.
bs-github commented 1 year ago

There might be an issue with access to the web interface of a particular member of the mesh network.

I'm not sure how exactly the MESH works, but we need to make sure that the user is still able to select one particular box and connect to it to access the web user interface of that particular box.

Or maybe mdns just works?

michelepagot commented 1 year ago

Some reading:

Some repo to check:

michelepagot commented 1 year ago

How many nodes will be part of the MESH?

The MESH should connect all charging stations in a decent parking lot. Take care that most of the time the limiting factor is the maximum current that the the park lot electrical grid could handle: so number of nodes is limited by the max available power in the park lot.

Why do we need the MESH?

To extend the Wifi coverage. The most important service to use this extended connectivity is the ChargeManager server. Ease, less or no needed configuration (hopefully) as well, especially to build the Charge manager group.

How much code changes we can have in the original source base?

As few as possible in existing modules and code, we are free to add more modules. The changes should keep possible and easy to merge the code in the upstream project. From this point of view the two candidates MESH lib has some problems to take in account:

What can we scarify on each node?

Maybe we do not need the web interface on each node, maybe we can think about preconfigure the FW for each device in the park lot taking care, in advance, about its role (charger, CM server).

Which kind of connectivity we expect on each node in the mesh?

Do we need each node to have an IP? Do we need each node to be able to serve its web interface? Do we need each node to expose an AP to let a user to connect to each of them from its device?

michelepagot commented 1 year ago

PainlessMesh vs ESP-WIFI-MESH

PainlessMesh

Example project mesh-mash/painlessmesh

Pro:

Cons:

ESP-WIFI-MESH

Example project mesh-mash/esp-wifi-mesh

Pro:

Cons:

bs-github commented 1 year ago

We concluded, that this is not worth the effort for now.

PainlessMesh needs to much changes in the TinkerForge firmware architecture, and
ESP-WIFI-MESH might work in that regard, but is not supported by PlatformIO.

Reinventing the wheel (starting from scratch) is not a viable option as well.