ESP8266 as a Router
Posted:
Fri Aug 21, 2015 4:45 pm
by Brannon Dorsey
I'm trying to use an ESP (with the Arduino IDE) as a basic router to facilitate communications between multiple devices. I'm running the WiFiAccessPoint example (I've also tried with custom code). The access point is working correctly as is its DHCP server as any device that I connect to the AP is assigned an IP address. Each device that I connect can also connect to the test server running on the ESP. My issue is that multiple devices cannot connect to each other [b]through[/b] the ESP. I.e., if both my phone and laptop are connected to the ESP's AP, and my computer is running a webserver on an open port, my phone cannot connect to it (nor even ping it via the command line). Perhaps the WiFi Arduino WiFi module does not actually package the functionality to route messages from two or more connected clients. If this is the case are there any examples in Arduino code (or simply with the ESP SDK) that provide this basic routing functionality?
Re: ESP8266 as a Router
Posted:
Sat Aug 22, 2015 10:50 am
by Mmiscool
I too am interested in this.
Re: ESP8266 as a Router
Posted:
Tue Aug 25, 2015 12:05 pm
by h4rm0n1c
Not to be impolite, but Routers are irrelevant in the proposed scenario, what you are looking for is a Switch.
Routers are for connecting two separate networks, allowing for traffic to flow between devices on both, e.g: Your local network and the Internet.
Switches are for connecting two separate devices on the same network, usually when you have more than two devices in your network, most home routers with more than one LAN port actually have a switching chip built into them, it usually gets bridged to the wireless radio too if the router has a wireless access point built in.
Really, what this comes down to is:
Does Espressif expose enough Layer 2 functionality in the SDK to make this work?
Does the ESP8266 have the resources to do this, along with whatever application one might want to run on the module?
Remember, the frames the ESP8266 receives will have to be buffered and then sent to the appropriate MAC address, this takes memory and CPU, the more traffic on your network, the higher the resource usage, even if it is possible you might find you have nothing left to run your program!
You might just be better off picking up a cheapo WR-703N, they can take DD-WRT.
Re: ESP8266 as a Router
Posted:
Tue Aug 25, 2015 2:01 pm
by martinayotte
There is also DominioIO which is quite affordable.
(I'm hoping to receive some in the next few days)