ESP8266 Developer Zone The Official ESP8266 Forum 2017-03-24T13:18:41+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=3313 2017-03-24T13:18:41+08:00 2017-03-24T13:18:41+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3313&p=11554#p11554 <![CDATA[Re: Get DNS Server IP]]>

Code:

void wifi_handle_event_cb(System_Event_t *evt)
{
   os_printf("event %x\n", evt->event);
   switch (evt->event) {
       case EVENT_STAMODE_GOT_IP:
          os_printf("ip:" IPSTR ",mask:" IPSTR ",gw:" IPSTR,
                     IP2STR(&evt->event_info.got_ip.ip),
                     IP2STR(&evt->event_info.got_ip.mask),
                     IP2STR(&evt->event_info.got_ip.gw));
          os_printf("\n");
          break;
       default:
          break;
   }
}
void user_init(void)
{
    // TODO: add your own code here....
    wifi_set_event_handler_cb(wifi_handle_event_cb);
}

Statistics: Posted by Her Mary — Fri Mar 24, 2017 1:18 pm


]]>
2017-02-01T22:23:40+08:00 2017-02-01T22:23:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3313&p=11217#p11217 <![CDATA[Get DNS Server IP]]> Statistics: Posted by guruschmuru — Wed Feb 01, 2017 10:23 pm


]]>