2 Replies Latest reply on Aug 27, 2017 12:15 PM by user_108962310

    Disable DHCP_Server module, or exclude from build?

    user_108962310

      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.

        • 1. Re: Disable DHCP_Server module, or exclude from build?
          RaktimR_11

          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

          2 of 2 people found this helpful
          • 2. Re: Disable DHCP_Server module, or exclude from build?
            user_108962310

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