lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP/IP with PPP


From: Sylvain Rochet
Subject: Re: [lwip-users] TCP/IP with PPP
Date: Mon, 7 Oct 2013 18:32:08 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Dave,


On Mon, Oct 07, 2013 at 10:42:13PM +0700, Dave McLaughlin wrote:
> Hi all,
> 
> I am new to the group and new to the library and looking for a bit of
> advice.
> 
> I have a project to build a sensor interface with a GSM modem and I need to
> have the ability to connect via TCP/IP over PPP to the GPRS network.
> 
> The modem has built in TCP/IP as do a number of them these days but it is
> limited to 1 connection at a time and does not integrate with any TCP/IP
> stack in the processor firmware. I need to be able to have multiple
> connections at the same time. 
> 
> I am targeting a Cortex M4 processor from ST and looking to use the Coocox
> development software as I am familiar with this from another project.
> 
> Would the TCP/IP driver work with the likes of FreeRTOS and how easy is it
> to get it working?

This is the easiest part, FreeRTOS itself provide an example port for 
lwIP. [1]

Since you don't need the board-specific Ethernet port, then you only 
need the memory/thread/mutex/semaphore OS port, thus you can use any 
lwIP port for FreeRTOS and crush everything related to the Ethernet low 
level driver.


> Would you recommend any books on the subject or examples on any websites? I
> am not looking for a complete working solution, just the basics as I am keen
> to learn how this all connects together so would really like to do the main
> work myself but a few pointers along the way would speed up the process. :)

If you wish, you can try the lwIP ppp-new branch, which is a complete 
rework of the lwIP stack.

$ git clone -b ppp-new git://git.savannah.nongnu.org/lwip.git


You have to write a SIO port (i.e. serial port) for lwIP. The SIO port 
interface is described in lwip/src/include/lwip/sio.h and is, IMHO, 
pretty obvious.

There are a few examples in the lwip-contrib package:

$ git clone git://git.savannah.nongnu.org/lwip/lwip-contrib.git 
$ find -iname "sio.c"
./ports/unix/netif/sio.c
./ports/win32/sio.c
./ports/old/ecos/ecos/net/lwip_tcpip/current/src/ecos/sio.c


The new PPP interface is described in lwip/src/include/netif/ppp/ppp.h , 
this should be pretty self-explanatory (Well, I hope it is ;p), look for 
PUBLIC FUNCTIONS section


The following thread, which is exactly what you want to do, may help 
you:  http://lists.nongnu.org/archive/html/lwip-users/2013-06/msg00001.html


Hope it helps ! :)


Sylvain


[1] http://www.freertos.org/embeddedtcp.html

Attachment: signature.asc
Description: Digital signature


reply via email to

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