Page 1 of 1

Routing/bridging

Posted: Sat Nov 14, 2015 12:34 am
by tomikpik
Hi, I would like to know whether the new ESP32 will be able to bridge wifi interfaces (softAP + station) or act as a router.
Thank you
Tom

Re: Routing/bridging

Posted: Sun Nov 15, 2015 7:37 am
by johnlee
yes, it supports soft-AP + station. but so does ESP8266, although ESP8266 is kinda limited in terms of resources for this application.

Re: Routing/bridging

Posted: Sun Nov 15, 2015 9:38 pm
by martinayotte
Hi John,
I think what Tomiktik ask is if there will be some real automatic bridging/routing between AP and STA at lower layer or even by the hardware, which ESP8266 can not do currently, at least with current SDKs. In such case, clients packets can be received by AP and re-directed to outside world, such internet, via the STA.

Re: Routing/bridging

Posted: Mon Nov 16, 2015 2:34 am
by johnlee
there are some improvements in ESP32 to simplify the way packets are handled. so with minimal software intervention, we might be able to handle a certain number of connections. and btw, we have an Ethernet port as well.

Re: Routing/bridging

Posted: Mon Nov 16, 2015 9:51 am
by rudi ;-)
johnlee wrote:..... and btw, we have an Ethernet port as well.
Hi john - this Core 108 is great base for the ESP32 - hope you spend many same functions/layers in the chip - there are infos about base / standards from tensilica on net like this
Image
Image
Image

i am so happy for 108 - this on 108 based ESP will rock the world again! :P

I know from developer letter, not all futures are supported ( no USB )
but this i think is not need if we have wireless.

I eagerly await the datasheet ... and I'm so excited :) what you have implanted.
I count the seconds ..

:D
best wishes
rudi ;-)

btw, found this on net:

White Paper 1:
http://ip.cadence.com/uploads/white_papers/Diamond...

White Paper 2:
http://ip.cadence.com/uploads/pdf/Diamond%20WP.pdf

108 Mini
http://ip.cadence.com/uploads/pdf/108Mini.pdf

Re: Routing/bridging

Posted: Fri Aug 10, 2018 10:28 am
by rudi ;-)
@ tomikpik
I dig up the cellar.
after few time and try#s, there comes perhabs a custom proof of concept with ETH and Wifi after the summer vacation.
still in tests and I am satisfied so far. I use it for a LAN to WIFI bridge.
best wishes
rudi ;-)

Re: Routing/bridging

Posted: Sat Dec 22, 2018 3:43 pm
by thayne
Can someone share here (provide links, code, etc.) the way that you use the ESP32 to bridge to LAN? Like you are talking about in this thread.

I have a SIM800L hooked to an ESP32 and want to use the data plan to send wifi from the ESP32 to another device.

What I need is to get the wifi into the ESP32 from the SIM800L. Then, from the ESP32 to other devices (weather station, "security" camera, food and water dispenser for cat, and his remote control mouse, etc).

I have the other devices finished. I just need help to get the sim data/wifi to the esp to share wifi to the others (like a router).

Thank you so much!

Re: Routing/bridging

Posted: Sat May 11, 2019 2:13 pm
by ThinkalVB
I am also searching for the same, ESP32 MDF has a similar feature and I guess it's possible to route a packet between AP and STA. I have never tried it before but I believe RAW sockets can get the thing done.
How ? is the question that requires to be answered - IF you find anything regarding this please let me know because I am also trying to do the same thing.

Re: Routing/bridging

Posted: Sat May 11, 2019 5:24 pm
by JayLogue
IP forwarding (but not ethernet bridging) is generally implemented at the IP layer. Thus no sockets (or raw endpoints) are involved.

ESP-IDF uses LwIP as its IP layer, which supports limited IP forwarding for both IPv4 and IPv6. The ESP-IDF version of LwIP has these features disabled, but they can be enabled by setting IP_FORWARD or LWIP_IPV6_FORWARD to 1 in lwipopts.h.

Since LwIP doesn't have a routing table, per se, forwarding can only happen between on-link subnets. E.g. a node connected to the ESP32's soft-AP could route packets to other nodes on the ESP32's WiFi station network.

Unfortunately, it appears that Expressif has added a hack to their version of LwIP that limits IP forwarding to broadcast addresses only (see here). I believe this could be overcome by redefining LWIP_HOOK_IP4_ROUTE_SRC.

Please be aware that enabling IP forwarding can have VERY SERIOUS consequences to network security. For example, if the ESP32's soft-AP has been configured to not require a password, and you connect your ESP32 to your home WiFi network, then anyone can talk to any of the devices on your network, just as if they had your WiFi password.

Also note that I have never tested any of the above on the ESP32 platform, so there may be other things required to make this work.

Re: Routing/bridging

Posted: Sat May 11, 2019 6:07 pm
by ThinkalVB
Thank you @JayLogue
I am trying to make a custom mesh network using ESP32 ( with custom routing technique specified in my final year thesis ). Not the MDF Ok
Can I make the same using Audrino core library if yes how? [ Using RAW sockets to receive UDP and TCP packets and resend them to other nodes according to the destination address ] (something like receive and then sends it again on the right path - I don't know if it's same as forwarding)

If not, how can I possibly achieve my objective?
Is there any other MCU in which the above-specified application is possible?