Comments (9)
Hey there @gamecompiler!
This code is pretty experimental. One thing that I was relying on was that an ESP in AP mode would have capabilities to route messages to nodes connected to them (like a normal AP).
Given:
192.168.4.1 (AP)
192.168.4.2 (AP_STA) -> 192.168.4.1 (AP)
192.168.4.3 (AP_STA) -> 192.168.4.1 (AP)
One would think that 192.168.4.2
could exchange data with 192.168.4.3
because they are on the same "network" being served by the 192.168.4.1
. I have since learned that this is not possible (see this post). Basically, what that means is that this meshish
library (as it is written now) will never actually be that mesh like. What it is good for is auto configuring two ESP8266 to talk to each other (or even 3, 4, 5+, however the communication will always be secondary nodes to primary nodes and vice versa, never secondary node to secondary node through the primary node). If you need to connect 4 ESPs over a great distance (say, in a line one after another) it might be easier to manually assign each an SSID and have them in STA_AP
mode, each serving a network while simultaneously acting as a station to the next one's network. Would that work for your purposes? If not tell me a bit more about the purpose and limitations of your project? I am interested to think of a better way to write a mesh-like library for the ESPs. Have you seen the Arduino WiFiMesh library? Personally I really don't like it.
from meshish.
My goal is to "Mesh up" temperature sensor throwies so that they can reach my home wirelessly.
I live on a small Island, the problem is that in automn, the meadows are flodden. So i cant go to them and get the loggs or even do any maintance. So id thought it would be awesome to mesh up the sensors to a 20Km line of water distance.
Thanks for the Idea, id connected 5 esps now over STA_AP mode, if one gets a udp package, they become redirected to each other of the line, until every one has received the package.
But at this time all my esps are crashing after quick time, because sometimes the message identfycation checksum is transmitten wrong, which happens a lot.... The Buffer becomes flodden and the esps do a hard reset....
Yes id tryed the WiFiMesh library, i cant get it work, i really dont know why....
We should try to make a "real" mesh library,
im doing some research at this time, there needs sth to be done.....(Im wondering that almost no one asked for a real esp mesh library)
Sorry for my english.
from meshish.
Hey there,
Sorry for the late reply. I've had my focus elsewhere recently and have been doing a poor job keeping up with ESP related stuff. Glad to hear that you were able to get a solution working connecting 5 ESPs in STA_AP mode and forward the UDP packets. Any chance that your crashes have anything to do with the watchdog timer? If so, you can extend the watchdog timer time so that the ESPs won't hard reset during some long running custom code. But, if it really is a buffer overflow, that really blows and I'm not sure the best way to help you.
I agree that there needs to be a dedicated mesh solution for the ESPs. It seems like recently ESPRESSIF has actually built this into their firmware. Here is an "official" example of the ESPs acting in true mesh: https://github.com/espressif/ESP8266_LIGHT_WITH_MESH/wiki
The code seems to be used directly with their custom server app which sucks, but maybe there is something there to be played with.
Another approach, and one that a friend of mine (@bakercp) has been working on implementing is to use custom probe requests (a management frame in the 802.11 wireless spec) to advertise information from one node to many (in a broadcast type fashion) without those nodes actually having to be associated with one another in a AP/STA relationship. I know that the ability to broadcast custom probe requests is now possible in the new 1.4 Espressif SDK. Here is an example of a project that uses this style of packet injection: https://github.com/pulkin/esp8266-injection-example
Unfortunately right now this ESP mesh library isn't a priority for me, but if you happen to keep working on it or reach a major breakthrough, keep me in the loop and maybe I can provide some development.
Cheers!
And P.S. your English is awesome :)
from meshish.
If the amount of data to be sent is small (less than 100 bytes), one could definitely broadcast the management / probe packet. The packet can be captured by putting the ESP8266 into promiscuous mode.
The SDK also has the ability to send arbitrary data packets, but unfortunately, the data packets can't be captured in their entirety. Only their length can be observed! 😞
from meshish.
3 years later i know what problem id had ;) Yes, it was a problem with the watchdog timer. Id made an endless loop... . Last years i learned a lot about programming. Thank you very much for your support! It was fun connecting my complete island!
from meshish.
Hi there @gamecompiler, great to hear from you! Glad to hear you had success as well 😸.
I'd love to hear about your network! Did you end up using any of this code, or did you roll something yourself? How wide reaching is your network? I'd love to hear more.
from meshish.
Im sending you an email :)
from meshish.
Hi @gamecompiler, I am trying the HelloMesh example in Arduino IDE. I see that the communication happens, It seems like a data broadcast. I wanted to send data to a particular node, could you please help me guiding through this?
from meshish.
Currently i cant because ive have to learn for a lot of exams. Keep in mind that meshish isnt in the state that it can be used. You still need to route the data your self. Meshish is more a concept - not a solution.
You will have to implement your own routing algorithm.
from meshish.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshish.