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: Sylvain Rochet
Subject: Re: [lwip-users] ESP8266 as WiFi to PPP Bridge
Date: Thu, 26 Jan 2017 23:23:19 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Jeffrey,


On Thu, Jan 26, 2017 at 06:25:48PM +0000, Wormsley, Jeffrey (Jeff) wrote:
> 
> Is it possible to use an ESP8266 as a WiFi to PPP bridge?

Short answer: yes, since ESP8266 can host your application :-)


> I have a device whose hardware is fixed, but is Linux based and has 
> LAN and two serial ports, no USB host.  I need to have a very 
> inexpensive way to get this device onto a WiFi network, so an Ethernet 
> to WiFi bridge is out of the question (unless someone knows where I 
> can get one for under $5).
> 
> I know LWIP is available for the device, although it is my 
> understanding it is an older version and somewhat modified.
> 
> 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.


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.

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 is basically what cellular modems are doing when dialed using PPP.


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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