Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What’s the news value of this? LWIP is the most popular embedded network stack and has been around for ages. It also is awful to use and riddled with undocumented issues (in my experience, anyway)


In my experience, it is a breeze to use. ~10 years ago, we managed to significantly cut down the cost of IP cameras by using lwIP with NuttX which allowed us to use a cheaper microcontroller instead of a more expensive chip that could run Linux.

Plugging in a new TCP congestion control scheme was also straightforward.


the stack itself is extremely solid and works perfectly with reasonable performance. the codebase is extremely stable and has not had major changes, nor significant bugs in ages.

the biggest problem with lwip is the documentation. you have doxygen API docs that tell you exactly what the interfaces are (and not much more than the reading the header filed does), you have a few pages of "how to ..." and higher level background. but often it's slightly bit rotted, subtly hasn't kept up with design changes. so it's difficult to learn - you effectively have to thoroughly read the code to get the big picture. and if you make a mistake in handling your application callbacks, you can easily leak buffers or create other problems. it's not "awful to use", it's actually very simple - once you understand it, which is seriously hampered by truly lacking documentation.

the second issue is that the SoC vendors inevitably pay some overseas contractor to do the port and MAC/PHY drivers and example code, just like another [1] comment describes. that's where a lot of the instability and bugs come in. it's not lwip, it's the port that sucks.

[1] https://news.ycombinator.com/item?id=41462602


My experience comes from actually writing the ports as opposed to using it in other places. I’ve gotten issues like the UDP checksum generation breaking in the raw API at higher speeds or DHCP packets managing to come out corrupted, and in both cases I fixed it by just replacing the code that’s responsible. I’m not claiming this is representative of anything in general however, these are all for somewhat esoteric networking analysis in an academic setting. It definitely works well when you just use it as intended on microcontrollers however and I’ve never had issues when I’m not doing awful things to it :)


what kind of undocumented issues have you run into, and what did you have to do to deal with them?



https://xkcd.com/1053/ (jinx)

It's allowed to repost "classic" stuff on HN as long as it isn't too frequent.


Fair enough, I’m not familiar with the rules.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: