Routing/bridging

tomikpik
Posts: 1
Joined: Sat Nov 14, 2015 12:31 am

Routing/bridging

Postby tomikpik » Sat Nov 14, 2015 12:34 am

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

johnlee
Posts: 34
Joined: Sun Nov 15, 2015 4:27 am

Re: Routing/bridging

Postby johnlee » Sun Nov 15, 2015 7:37 am

yes, it supports soft-AP + station. but so does ESP8266, although ESP8266 is kinda limited in terms of resources for this application.

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Routing/bridging

Postby martinayotte » Sun Nov 15, 2015 9:38 pm

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.

johnlee
Posts: 34
Joined: Sun Nov 15, 2015 4:27 am

Re: Routing/bridging

Postby johnlee » Mon Nov 16, 2015 2:34 am

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.

User avatar
rudi ;-)
Posts: 1731
Joined: Fri Nov 13, 2015 3:25 pm

Re: Routing/bridging

Postby rudi ;-) » Mon Nov 16, 2015 9:51 am

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
Attachments
61.jpg
61.jpg (3 KiB) Viewed 28020 times
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1731
Joined: Fri Nov 13, 2015 3:25 pm

Re: Routing/bridging

Postby rudi ;-) » Fri Aug 10, 2018 10:28 am

@ 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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

thayne
Posts: 2
Joined: Wed Dec 19, 2018 8:17 pm

Re: Routing/bridging

Postby thayne » Sat Dec 22, 2018 3:43 pm

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!

ThinkalVB
Posts: 13
Joined: Mon Apr 22, 2019 7:09 am

Re: Routing/bridging

Postby ThinkalVB » Sat May 11, 2019 2:13 pm

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.

JayLogue
Posts: 19
Joined: Sat Apr 21, 2018 4:44 pm

Re: Routing/bridging

Postby JayLogue » Sat May 11, 2019 5:24 pm

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.

ThinkalVB
Posts: 13
Joined: Mon Apr 22, 2019 7:09 am

Re: Routing/bridging

Postby ThinkalVB » Sat May 11, 2019 6:07 pm

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?

Who is online

Users browsing this forum: No registered users and 88 guests