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: Mark Lakata
Subject: Re: [lwip-users] TCP/IP with PPP
Date: Mon, 07 Oct 2013 09:50:46 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Be sure *not* to use the ST-written driver code for lwIP for their STM32F4xx demo boards.   It is buggy.   If you can't find any better code, go ahead and try it, but apply the patches mentioned in this discussion group under the "STM32 RBUS (Receive Buffer Unavailable) bit set after debugger break" subject.

You will have to have a good knowledge of your GPRS modem, all the silly AT commands and the provider's quirks.  I found that all my troubles have been with modem configuration and dropping connections (with AT&T and Verizon).   I have not had any trouble with the lwip code on the "ppp-new" branch of lwip (cf Sylvain's email below).

-Mark


On 10/7/2013 9:32 AM, Sylvain Rochet wrote:
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


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


reply via email to

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