Page 2 of 2

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Mon Dec 05, 2016 3:46 am
by martin_g
Thanks neocat for the great work!

Now I have a WiFi-Repeater running on an esp8266, actually an ESP-01.
I had some issues with the IP and TCP-checksums for modified packets in the uploaded version. Finally fixed it with the orgiginal code from RFC 1631. Also updated the DHCP server to distribute DNS server addresses other than the own AP address.

Now it connects as STA with my home WiFi and offers its own SSID as AP to other devices. Works as guest-WiFi or as range extender. Throughput ist just fine even with a laptop or a smartphone as client. I am just connected via it.

If anybody ist interested, ask me. Will clean it up and post it here.

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Fri Dec 09, 2016 7:54 am
by martin_g
Published the code at https://github.com/martin-ger/esp-open-lwip/tree/nat.

Added a full functional WiFi repeater (correctly: a WiFI NAT Router) at https://github.com/martin-ger/esp_wifi_repeater.

It is a proof of concept implementation of a WiFi NAT router on the esp8266. It can be used as range extender for an existing WiFi network. The esp acts as STA and as soft-AP and transparently forwards any IP traffic through it. As it uses NAT no routing entries are required neither on the network side nor on the connected stations. Stations are configured via DHCP in the 192.168.4.0/24 net and receive their DNS responder address from the existing WiFi network.

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Wed Jan 18, 2017 3:02 pm
by daiyinger
Thanks martin-ger for the great work!
I tried your binaries, is very nice
Now,I want to try to port it to ESP32, can i use nat change of ip.c in "https://github.com/martin-ger/esp-open-lwip/tree/nat" to get it?

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Sun Jan 22, 2017 5:17 pm
by martin_g
Yes, thing so. There is nothing specific for the EPS8266 chip in the code, as far as the NAT patches are concerned.

Have just pushed a version of the lib to https://github.com/martin-ger/esp-open-lwip. A little bit cleaner and with a header for the NAPT API.

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Mon Sep 25, 2017 6:41 pm
by fabiana.ferreira
Hello!
I have a project from college that is to implement a mesh network using NodeMCU's. I was advised to look up your project, because it may help me. I have a root node, which will be connected to a sensor and I need to pass this information through all the node to reach its destination. I tried to implement it, but I'm having problems with ESP running as SoftAP and Station at the same time. Do you think it could you help me?

Re: ESP8266 lwip IP_FORWARD/routing

Posted: Mon Aug 06, 2018 8:52 pm
by DanieliCy
Hi neocat your solution seems like something I've being search for quite a while thanks!
do you have an implementation example?