lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP/IP/PPP for bare-metal


From: Sylvain Rochet
Subject: Re: [lwip-users] TCP/IP/PPP for bare-metal
Date: Sun, 23 Aug 2015 16:33:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Ajay,

On Sun, Aug 23, 2015 at 09:15:02AM +0530, Ajay Garg wrote:
> 
> First of all, let me present the scenarios where we intend to run our code
> ::
> 
> a)
> Our client-application, deployed on a vanilla Linux-Desktop, using WIFI to
> communicate with a "normal" server running on a public IP-Address.
> 
> b)
> Our client-application, flashed on a micro-controller, which interfaces
> with a GPRS-module to communicate with the same "normal" server running on
> a public IP-Address.
> 
> 
> Following are the options ::

Most of that is *complete* nonsense for me.


For Linux based application, just use the standard socket 
datagram/stream API. Any other way is going to be very hard for your 
users: no routing table, bridging necessary, IP address will be 
different than the host, should probably need to run as root, netfilter 
rules will be harder to set up, overall poor performance, two DNS setup, 
DHCP setup is also going to be a pain.

Setting up a TCP/UDP session using lwIP (either with RAW, netconn or 
socket API) and Linux/BSD/libc Socket API is done in less than a hundred 
lines of code including buffers flow management and including all 
necessary checks. Wanting to share this codebase is only going to make 
things difficult with almost no value added.

The only choice you have to make is to use the embedded TCP/IP stack of 
your GPRS module or use lwIP with your GPRS module in PPP data mode. It 
almost only depends if you need lwIP features that are not handled by 
the embedded TCP/IP stack or if you are not confident with the embedded 
TCP/IP stack (i.e. you prefer using the less possible amount of code on 
the module).


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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