What is the recommend way to customize lwIP settings using ESP-IDF?

axellin
Posts: 48
Joined: Mon Sep 17, 2018 9:09 am

What is the recommend way to customize lwIP settings using ESP-IDF?

Postby axellin » Tue Jan 07, 2020 6:34 am

The idf.py menuconfig does not expose all lwIP settings.
I'd like to enable some settings that are not display on menuconfig.
e.g. To set LCP_ECHOINTERVAL, LCP_MAXECHOFAILS, etc.
I'd prefer to customize the lwipopts.h in my application rather than modify
esp-idf directly. But I'm not sure how to do it.

ESP_Angus
Posts: 2072
Joined: Sun May 08, 2016 4:11 am

Re: What is the recommend way to customize lwIP settings using ESP-IDF?

Postby ESP_Angus » Tue Jan 07, 2020 7:10 am

Hi axellin,

Officially we only support changing the settings which are exposed in menuconfig, as that's what we've tested.

To modify other settings you'll need to modify lwip (and you'll be in "unsupported" territory with a modified ESP-IDF). You can do this by editing it directly, or you can copy the whole lwip component into a "components" directory inside your project directory (ie projectdir/components/lwip/...), and it will override the component found in the IDF source.

That said, I think we can probably add configuration items to tweak these PPP settings via menuconfig. Is there anything else you'd like to be able to customize?

Angus

axellin
Posts: 48
Joined: Mon Sep 17, 2018 9:09 am

Re: What is the recommend way to customize lwIP settings using ESP-IDF?

Postby axellin » Tue Jan 07, 2020 7:18 am

Hi Angus,
I think modify the lwip source in IDF is not a good way.
I have different applications to build but just some of the applications need to add additional changes of lwIP settings.
I think it's better if the build system can take a optional lwipopts.h from application to override the default one.
This is more flexible to customize settings. (Just a suggestion)

Who is online

Users browsing this forum: Majestic-12 [Bot], tabulous and 55 guests