1 Reply Latest reply on Feb 24, 2013 3:56 PM by jasonrc
      • 1. Re: How do I include & use the DHCP server?
        There are several ways to use the DHCP server.

         

         

        Most ppl use the server indirectly when bringing up a softAP interface using the wiced_network_up() API.

         

        The <SDK>/Apps/snip/apsta application brings a softAP network interface up and starts a DHCP server as part of the network up call:

         

           wiced_network_up(WICED_AP_INTERFACE, WICED_USE_INTERNAL_DHCP_SERVER, &ap_ip_settings);
        

         

         

         

        If you want to directly call the server, then, just like other libraries you need to add the server to your application.mk makefile:

         

         

        $(NAME)_COMPONENTS += daemons/dhcp_server
        

         

         

        Then, in your application, you can call server functions directly:

         

        wiced_start_dhcp_server()
        wiced_stop_dhcp_server()
        

         

         

        The library starts giving out IP addresses using the current interface IP address + 1 and netmask.