ESP8266 Developer Zone The Official ESP8266 Forum 2016-07-05T16:02:49+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2340 2016-07-05T16:02:49+08:00 2016-07-05T16:02:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2340&p=7746#p7746 <![CDATA[Re: DHCP server started message?]]> in user_init() I have:

Code:

   if (wifi_station_get_auto_connect() != 0)
      wifi_station_set_auto_connect(0);

   // register "init done callback"
   system_init_done_cb(userInitDoneCb);
   // MANDATORY INITIALIZATION BLOCK END

   // disable WiFi
   wifi_set_opmode_current(NULL_MODE);
   // disable DHCP server
   wifi_softap_dhcps_stop();


in "init done callback" I have:

Code:

      ETS_UART_INTR_DISABLE();
      _bRes = wifi_set_opmode_current(SOFTAP_MODE);
      ETS_UART_INTR_ENABLE();
      // DHCP is automatically started, so it must be stopped
      wifi_softap_dhcps_stop(); /*

after setting wifi mode, dhcps stop() is called immediately. But message that DHCP is started still appears on debug output, before softAP IP address on if1 is set.

Is there something else missing to prevent autostarting DHCPS?

Statistics: Posted by FrenkR — Tue Jul 05, 2016 4:02 pm


]]>
2016-06-24T16:31:05+08:00 2016-06-24T16:31:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2340&p=7495#p7495 <![CDATA[Re: DHCP server started message?]]>
You can call wifi_softap_dhcps_stop in user_init.

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Fri Jun 24, 2016 4:31 pm


]]>
2016-06-23T22:50:48+08:00 2016-06-23T22:50:48+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2340&p=7485#p7485 <![CDATA[DHCP server started message?]]> when setting softAP mode, I am getting a message on debug interface as follows:

Code:

mode : softAP(1a:fe:34:d5:a2:9a)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100

It looks like DHCP server is somehow autostarted. Is there any way to disable auto-starting or do prevent starting it?
Rgds,
Frenk

Statistics: Posted by FrenkR — Thu Jun 23, 2016 10:50 pm


]]>