|
|
`painlessMesh` creates a mesh network that is independent from any other/wider network. If you want to get information from your mesh to the wider network a bridge is currently needed. There are a couple of options.
|
|
|
|
|
|
1. Have two devices communicate via the serial connection. One of them is a node to the mesh and the second one would be connected to the other network.
|
|
|
2. The repository contains an [example](https://gitlab.com/BlackEdder/painlessMesh/blob/master/examples/bridge/bridge.ino) on setting up a node that will try to connect to a server (on another network). That server will need to run a program that listens on the correct port and understand enough of the mesh protocol to communicate. A D program that can be run on the server is available [here](https://gitlab.com/BlackEdder/painlessMeshListener).
|
|
|
2. The repository contains an [example](https://gitlab.com/BlackEdder/painlessMesh/blob/master/examples/bridge/bridge.ino) on setting up a node that will try to connect to a server (on another network). That server will need to run a program that listens on the correct port and understand enough of the [mesh protocol](https://gitlab.com/BlackEdder/painlessMesh/wikis/mesh-protocol) to communicate. A D program that can be run on the server is available [here](https://gitlab.com/BlackEdder/painlessMeshListener).
|
|
|
- ESP8266s are limited to using the same channel on the AP and STA, because of this the above solution requires the mesh to be on the same channel as the other/wider network.
|
|
|
3. Similar to the solution above you can run a linux computer (raspberry pi) with the [easyMeshed library](https://github.com/BlackEdder/easyMesheD), which allows the raspberry pi to act like a end node. That node connects to the mesh and all other nodes on the mesh can send their data to the raspberry pi. This requires the raspberry pi to have two wifi devices though, one to connect to the mesh network, the other to the wider network.
|
|
|
4. Another possible solution is to have your bridge node run in AP only mode and use the other connection to translate it to a server. This option will take some careful programming though and there are some limitations that it is important to be aware of (listed [here](https://gitlab.com/BlackEdder/painlessMesh/wikis/connect-mode:-ap_only,-sta_only,-sta_ap-mode)). If anyone gets this to work reliably then please post some example code on the wiki or as an issue on gitlab. That way others can benefit from your work. |
|
|
\ No newline at end of file |