[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] ESP8266 as WiFi to PPP Bridge
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] ESP8266 as WiFi to PPP Bridge |
Date: |
Wed, 15 Feb 2017 16:11:32 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Jeffrey,
On Thu, Jan 26, 2017 at 10:37:28PM +0000, Wormsley, Jeffrey (Jeff) wrote:
> >
> > But, long answer, you will have to change a little bit the PPP lwIP
> > stack to hook PPP IP input/output to bypass the IP stack, since you
> > don't need it (you want a L2-ish bridge).
> >
> > Basically, you need to change ip4_input/ip6_input called from ppp.c
> > to a function which send a properly formatted IPv4/IPv6 packet (+
> > Ethernet header ?) over your ESP8266. And you need to call ppp_input
> > with IPv4/IPv6 packets from your ESP8266, you'll have to prepend the
> > PPP header though.
>
> Is there a method that might work with less invasive changes? Maybe
> more of a router type interface than a bridge? Not sure I have the
> chops to tear into LwIP that deeply, especially one that has already
> been torn into for other reasons.
The main problem with IP routing is that you'll need to change the
routing table on the gateway facing your wifi module, which is probably
impossible in your case:
BOARD ------------------------------ PPP/WIFI ---------------------- GW
192.168.2.2/24 192.168.2.1/24 192.168.1.2/24 192.168.1.1/24
default via 192.168.2.1 default via 192.168.1.1 default via
x.x.x.x
192.168.2.0/24
via 192.168.1.2
Or you can try Ajay NAT support ;-)
Sylvain
signature.asc
Description: Digital signature
- Re: [lwip-users] ESP8266 as WiFi to PPP Bridge,
Sylvain Rochet <=