Disable DHCP_Server module, or exclude from build?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_108962310
Level 4
Level 4
10 likes received 10 likes given 5 likes given

I am working on a project that is using WICED SDK, and I am approaching the limit of what I can fit into the flash on my device. So I need to look for places that I can save space.

When building, I see that "DHCP_Server" is listed in the output, accounting for 1557 bytes of flash.
As far as I know, no DHCP server functions are being used throughout the code, and we are not using AP mode for the radio.

We are using some DHCP functions to set the DHCP client name for the wifi AP it connects to, but that's all.

Is there a way to remove the DHCP server component and get back that 1557 bytes?
I don't see any inclusions for that server in the platform or app make config files.

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hi,

If your application does not require AP mode for the radio, you can remove the DHCP server component and get back your much required 1557 bytes. To do so, first you have to figure out what are the cases where WICED_USE_INTERNAL_DHCP_SERVER is used. For each of those cases, you have to modify or negate the usage of Internal DHCP server module present in WICED. If you check through the building process, you will find out internal DHCP server is used to bring up IP layer on P2P interface. The network stack (by default NetX Duo) also uses internal DHCP server module in several components to bring up the softAP. You have to modify the contents  of WICED> Security> BESL> host > WICED> wiced_p2p.c. Likewise, you have to modify the contents of wiced_management.c (WICED>internal),  wiced_network.c, wiced_network_common.c so that internal DHCP server module is not used. After all these modifications, during building process, you should not see the DHCP server module acquiring 1557 bytes of memory.

flash_screenshot.JPG

View solution in original post

2 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hi,

If your application does not require AP mode for the radio, you can remove the DHCP server component and get back your much required 1557 bytes. To do so, first you have to figure out what are the cases where WICED_USE_INTERNAL_DHCP_SERVER is used. For each of those cases, you have to modify or negate the usage of Internal DHCP server module present in WICED. If you check through the building process, you will find out internal DHCP server is used to bring up IP layer on P2P interface. The network stack (by default NetX Duo) also uses internal DHCP server module in several components to bring up the softAP. You have to modify the contents  of WICED> Security> BESL> host > WICED> wiced_p2p.c. Likewise, you have to modify the contents of wiced_management.c (WICED>internal),  wiced_network.c, wiced_network_common.c so that internal DHCP server module is not used. After all these modifications, during building process, you should not see the DHCP server module acquiring 1557 bytes of memory.

flash_screenshot.JPG

Perfect. Looks like it works with just a few edits. Thanks.
Makes me wonder what other parts of BESL I could toss away

0 Likes