lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] ESP8266 as WiFi to PPP Bridge


From: Wormsley, Jeffrey (Jeff)
Subject: Re: [lwip-users] ESP8266 as WiFi to PPP Bridge
Date: Thu, 26 Jan 2017 22:37:28 +0000

Thanks for the reply.  See comments below.

>> My thought was to use an ESP8266 module as a PPP server, use the Linux 
>> PPP client on the device, and use the ESP8266 as a bridge.
>> 
>> Or, is it possible to go the other way and use the ESP8266 as the 
>> client and the Linux device as the server?
>
> Both way are possible.

Ok.  Further research seems to indicate that the version of LwIP in these 
modules was customized to hook into their wireless engine (a binary blob and 
unchangeable) and that older version didn't have a working PPP host mode.  So 
it might be more practical to have the ESP8266 as a client as presumably that 
works.

> 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.

> You'll also have to wait for wifi module to be ready (dhcp, etc.) in order to 
> be able to set the remote IP address.

This might work out better having the ESP8266 as the client rather than the 
server, since I could delay making the connection to the PPP server until I had 
all of this in place.  It has the drawback of not being able to use the IP 
address assigned over WiFi as the IP address of the device, though.  However, 
in my application I may be able to use nothing but fixed IP addresses anyway.

> This is basically what cellular modems are doing when dialed using PPP.

I've used cellular modems this way, which is what made me think of this as a 
solution to my connectivity problem.

Thanks very much for your reply,
  Jeff.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]