lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Opinions on using lwIP for making application GPRS-chip


From: Ajay Garg
Subject: Re: [lwip-users] Opinions on using lwIP for making application GPRS-chipset-agnostic
Date: Fri, 21 Aug 2015 19:07:48 +0530

Thanks a ton Sylvain ... you rock !!!!
I am now confident enough to get my hands dirty with the code, since logically the pieces seem to be fitting in ....

Thanks a ton again, I will go through the documentation, and let you know for sure how things go ..


Thanks and Regards,
Ajay

On Fri, Aug 21, 2015 at 7:03 PM, Sylvain Rochet <address@hidden> wrote:
Hi Ajay,

On Fri, Aug 21, 2015 at 06:35:18PM +0530, Ajay Garg wrote:
> On Fri, Aug 21, 2015 at 5:46 PM, Sergio R. Caprile <address@hidden>
> wrote:
>
> > What I would do, if I were in your shoes, is to write my app for lwIP,
> > and then either use PPP for those TCP/IP capable GPRS modules
>
> You mean even if we use lwIP, we would be dependent on the TCP/IP (stack)
> of the GPRS module?
> That would defeat the purpose of using lwIP at the first place.
>
> I am sure I am having a massive misunderstanding ..

No, once your GPRS modem is in PPP data mode, lwIP take care of all
the PPP/IP stuff.


> > and a
> > layer-2 interface (netif) for the other ones.
> > This way, your app is always the same and you only change code for what
> > is below layer-3. You'll have to write your own netif, though.
> > lwIP is a TCP/IP stack which communicates to "the outside world" via
> > interfaces called "netif". Basically you can run it on top of everything
> > where you can write a netif for.

I don't understand why Sergio is proposing that, lwIP embeds a full
featured PPP stack and all GPRS modems I know are able to do PPP.


> I went through http://lwip.wikia.com/wiki/PPP
>
> We majorly need to code the "read" and "write" methods, right?
> In our case, if we are interfacing the GPRS-module with the
> Micro-controller via UART, then this would mean simply reading-from /
> writing-to UART, right?

Right! :)


> Also, one another question (this is majorly due to my lack of understanding
> of nitty-gritties of the protocols) ::
>
> For using TCP/IP/PPP/Serial, we simply have to bring the GPRS-Module into
> "Connect OK" mode (by using primitive AT commands). Thereafter, we need to
> switch the GPRS-module into "data mode" and then leave it to lwIP to set up
> the TCP/IP contexts, and later allow the usage of sockets.
>
> Is my understanding of the algorithm (at a broader level) correct?

That's correct. You don't even need to switch your GPRS to data mode,
once "CONNECT OK\r" is sent your modem already switched to data mode and
you should initiate the PPP session.


The most up to date PPP documentation is embedded into the doc directory
of lwIP sources:
  http://git.savannah.gnu.org/cgit/lwip.git/tree/doc/ppp.txt

If anything is missing or unclear, told me and I will try to improve it.


Sylvain

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



--
Regards,
Ajay

reply via email to

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