views:

1281

answers:

8

Does anyone have especially good (or bad) experiences with any of the following embedded TCP / IP stacks?

My needs are for a solid, easy-to-port stack. Code size isn't terribly important, performance is relatively important, but ease of use & porting is very important.

The system will probably use an RTOS, that hasn't been decided, but in my experience most stacks can be used with or without an RTOS. Most likely the platform will be an ARM variant (ARM7 or CM3 in all likelihood).

Not too concerned about bolting the stack to the Ethernet driver, so that isn't a big priority in the selection.

I'm not terribly interested in extracting a stack out of an OS, such as Linux, RTEMS, etc.

I'm also not interested in commercial offerings such as Interniche, Micrium, etc...

The stack doesn't need all sorts of bells & whistles, doesn't need IPv6, and I don't need any stuff on top of it (web servers, FTP servers, etc..) In fact it's possible that I'll only use UDP, although I can envision a couple scenarios where TCP would be preferable.

Experiences with other stacks I've missed are of course also very much of interest.

Thanks for your time & input.

+3  A: 

lwIP

I worked on a project with a 3G modem where we needed a UDP/IP stack (no TCP) on top of PPP. We narrowed down to uIP and lwIP. We picked lwIP in the end because it had PPP already (uIP doesn't), and we had enough RAM to spare.

Our particular project didn't use an RTOS, and lwIP was fine to use without an RTOS.

I wasn't directly involved in porting the lwIP code, although I worked on the modem driver to interface with it. My impression was that the porting took a couple of weeks to get everything going smoothly, for our engineer who had previous TCP/IP experience. The lwIP code has been hacked by many people, and consequently has some rough edges (e.g. someone threw in a lone malloc() somewhere) but it worked for us after a little tweaking. We tested it with an independent validation suite.

In summary, it was "suitably functional" for our UDP/IP and PPP needs (but I can't comment on its TCP capabilities).

Craig McQueen
Awesome, thanks for your input...
Dan
Glad to be a help.
Craig McQueen
+5  A: 

+1 for lwIP.

We used this successfully on a project a few years back and found it to be generally very reliable. We found and fixed a few issues (generally corner cases within the TCP code) which we submitted back to the project, and even though the project has moved on quite a bit since then we didn't generally find it lacking in any features.

As you suspect it will work with or without an RTOS. It took about a week to get running on our system with an RTOS, which included changes we had to make to support an unusual DSP compiler. As you're probably using GCC on ARM you can avoid any of that effort.

It does contain many more features than you require, but if your requirements change a few years down the line then you'll be better off having started out with a more substantial stack.

ukembedded
+1  A: 

+1 for lwIP.

It is included in the Luminary Micros (now TI) Serial to Ethernet reference design with some added capabilities (some sort of "server side scripting" and cgi) working on bare metal (without RTOS).

It is rock solid and very performant with only 32KB or RAM.

Regards

PFM

PFM
+1  A: 

I am pleased with lwip on the Stellaris Cortex-M3.

StellarisWare for the LM3S6965 eval board includes the enet_lwip demo. This is a small web server running over lwip which is running over bare metal -- no FreeRTOS in this case. The system is driven by the timer and Ethernet interrupts. It was pretty easy to rip out the web server and drop in my app. I did not have to become an lwip expert to get this running the first time.

Later I realized that my app was intrinsically up-call driven. At first, it had a sockets-to-upcall gasket. I replaced that layer with a much simpler one that translates lwip native upcalls to the app's upcalls, and optioned out lwip's socket API. This saved more flash and RAM space, and made the whole thing faster and simpler. With a little tweaking I got it running on the S2E board using 52K flash and 30K RAM.

Jonathan Engdahl
+2  A: 

I've used both uIP and lwIP extensively.

uIP

  • Great if youre only wanting something basic like a bootloader
  • Small footprint.
  • Uses polling so we've never got over 3kbit with it :-(
  • No DHCP 'out of the box'
  • Poor UDP support

lwIP

  • Fully interrupt driven so much faster (~ x10)
  • Includes DHCP with failover AutoIP
  • UDP with multicast
  • Plus more

EDIT:
And we've never used either with an RTOS as there has never been a need.

Tim
A: 

I've used the Microchip TCP/IP stack. I've been very happy with it. It was very easy to implement, lots of demo code/tutorials available, and has support for a lot of protocols HTTP, tFTP, SMTP, SNTP, etc. A point that doesn't match your requirements however is that it is not easily portable to another architecture. In fact I think the license for the stack explicitly forbids this because Microchip wants you to run the stack only using their hardware the PIC18, PIC24, and PIC32. There is however an external Ethernet controller they sell that they will allow you to use certain portions of this stack with their ENC28J60.

mjh2007
A: 

Hi Dan, what was the winner finally? Do you have any good suggestion//feedback for other people that have basically the same requirements?

I also got the choice to use the Keil TCP/IP stack, since it's the toolchain that I use.

Comments from others are also welcome. Thanks

FMarion

Francois Marion
A: 

I have used interniche on RTOS. It's a full-fledged stack and supports quite a few features. Since you are looking for a non-commercial version, my vote is on lwIP.

yaGsd