Anonymous
Not applicable
Feb 24, 2013
03:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 24, 2013
03:51 PM
[WICED-SDK-2.2.1]
What is the correct way to include the DHCP server code into an application?
1 Reply
Anonymous
Not applicable
Feb 24, 2013
03:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 24, 2013
03:56 PM
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_serverThen, 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.