Dynamic Host Configuration Protocol

group LWESP_DHCP

DHCP config.

Functions

lwespr_t lwesp_dhcp_set_config(uint8_t sta, uint8_t ap, uint8_t en, const lwesp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Configure DHCP settings for station or access point (or both)

Configuration changes will be saved in the NVS area of ESP device.

Parameters
  • sta[in] Set to 1 to affect station DHCP configuration, set to 0 to keep current setup

  • ap[in] Set to 1 to affect access point DHCP configuration, set to 0 to keep current setup

  • en[in] Set to 1 to enable DHCP, or 0 to disable (static IP)

  • evt_fn[in] Callback function called when command has finished. Set to NULL when not used

  • evt_arg[in] Custom argument for event callback function

  • blocking[in] Status whether command should be blocking or not

Returns

lwespOK on success, member of lwespr_t enumeration otherwise