Experiences with (free) embedded TCP / IP stacks? [closed]
Asked Answered
G

8

37

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.

Gratulate answered 21/7, 2009 at 16:45 Comment(0)
C
18

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.

Chlorella answered 29/7, 2009 at 12:30 Comment(2)
You can get uIP to do more than 3kbit/s. I had it going at > 100kByte/s, but it required substantial tweaking. uIP is good if you are code limited, but it is extremely bare bones.Domoniquedomph
My implementation is currently running at close to 245kbits/sec, and that is w/o absolutely no tweaks to the underlying layer. All I ensured was that the outgoing frames were all as close to 1500 bytes as possible, and the send calls were blocking.Ishmaelite
S
11

+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.

Slaughter answered 22/7, 2009 at 18:23 Comment(1)
Also, with LwIP you can most likely undefine the features you won't be using to save on code footprint.Brain
C
8

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).

Couthie answered 22/7, 2009 at 0:34 Comment(0)
C
3

+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

Cutworm answered 27/7, 2009 at 14:23 Comment(0)
G
3

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.

Guessrope answered 27/7, 2009 at 21:1 Comment(0)
R
1

You can try the open-source FNET TCP/IP stack.

Rosewater answered 2/10, 2012 at 14:13 Comment(1)
This really isn't an answer to his question. Mention of an additional stack would have been better done as a comment.Immovable
M
0

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.

Misconduct answered 1/4, 2010 at 15:58 Comment(0)
S
0

I have used Interniche on FreeRTOS. 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.

Subdue answered 31/8, 2010 at 4:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.