on_sys_dhcp_failure Event

Function:

Informs of the failure to procure configuration parameters from the DHCP server.

Declaration:

on_sys_dhcp_failure(interface as pl_sock_interfaces)

See Also:

wln.autodhcp, wln.dhcp


Part

Description

interface

Network interface on which the DHCP client has failed:

  • 1 — PL_SOCK_INTERFACE_NET: Ethernet (net.) interface
  • 2 — PL_SOCK_INTERFACE_WLN: Wi-Fi (wln.) interface

Details

This event handler is fired every time DHCP fails to obtain an IP address.

On the WM2000 and the WS1102, TiOS' internal DHCP process will request a lease three times before reporting that it failed. The backoff time (i.e., the delay between lease requests) for the first three retries is 2, 4, and 8 seconds, respectively, meaning the first notification of failure will occur after approximately 14 seconds.

The backoff time for the second round of retries is 16, 32, and 64 seconds, respectively, meaning the second notification of failure will occur about 112 seconds after the first on_sys_dhcp_failure event is generated.

Subsequent retries have a backoff time of 60 seconds, resulting in a 180-second period between on_sys_dhcp_failure events.



on_sys_dhcp_failure Event

Details