EVENT_STAMODE_DHCP_TIMEOUT

BarryP
Posts: 5
Joined: Tue Dec 23, 2014 6:53 pm

EVENT_STAMODE_DHCP_TIMEOUT

Postby BarryP » Tue Dec 08, 2015 4:44 am

Hi,
I see there is a new event EVENT_STAMODE_DHCP_TIMEOUT

Code: Select all

/*
 * It is listed in the enum
enum {
    EVENT_STAMODE_CONNECTED = 0,
    EVENT_STAMODE_DISCONNECTED,
    EVENT_STAMODE_AUTHMODE_CHANGE,
    EVENT_STAMODE_GOT_IP,
    EVENT_STAMODE_DHCP_TIMEOUT,
    EVENT_SOFTAPMODE_STACONNECTED,
   EVENT_SOFTAPMODE_STADISCONNECTED,
   EVENT_SOFTAPMODE_PROBEREQRECVED,
    EVENT_MAX
};
 *
 * but has no entry in the Event_Info_u ..  Event_StaMode_DHCP_Timeout_t perhaps ?
 */
typedef union {
   Event_StaMode_Connected_t         connected;
   Event_StaMode_Disconnected_t      disconnected;
   Event_StaMode_AuthMode_Change_t      auth_change;
   Event_StaMode_Got_IP_t            got_ip;
   Event_SoftAPMode_StaConnected_t      sta_connected;
   Event_SoftAPMode_StaDisconnected_t   sta_disconnected;
   Event_SoftAPMode_ProbeReqRecved_t   ap_probereqrecved;
} Event_Info_u;


Also , Can you tell me what the values for evt->event_info.disconnected.reason refer to ?
I can't find a reference to them in the programming guide documentation

Regards
Barry

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: EVENT_STAMODE_DHCP_TIMEOUT

Postby ESP_Faye » Wed Dec 09, 2015 4:47 pm

Hi,

EVENT_STAMODE_DHCP_TIMEOUT means that ESP8266 station can not get IP from the connected router till time out (which is set by wifi_station_dhcpc_set_maxtry).
It is provided for some special router.

If you get this event, you can call wifi_station_disconnect and wifi_station_connect to reconnect the router again, or retry more times.

Thanks for your interest in ESP8266 !

Who is online

Users browsing this forum: No registered users and 19 guests