WiFi AP mode stability

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

WiFi AP mode stability

Postby DarkSide » Sat Jun 18, 2016 12:58 am

Using SDK 1.5.4

Have noticed that AP mode is unstable. Here is screenshot. "White" is my ESP8266 signal that is located near me.
Such behavior leads to situation when you can't connect to AP and AP is not shown in list of available access points on phone.
Sometimes this "silence" intervals are short, sometimes they can be for more than 10 seconds. But the interesting thing is that when any client is connected to AP, the signal became stable.

Code to initialize AP mode:

Code: Select all

LOCAL bool ICACHE_FLASH_ATTR setup_wifi_ap_mode()
{
   struct softap_config apconfig;
   if(wifi_softap_get_config(&apconfig))
   {
      wifi_set_opmode(SOFTAP_MODE);

      os_memset(apconfig.ssid, 0, sizeof(apconfig.ssid));
      os_memset(apconfig.password, 0, sizeof(apconfig.password));
      apconfig.ssid_len = os_sprintf(apconfig.ssid, _sys_cfg.ap_ssid);
      os_sprintf(apconfig.password, "%s", _sys_cfg.ap_pass);
      apconfig.authmode = _sys_cfg.ap_authmode;
      apconfig.ssid_hidden = _sys_cfg.ap_hidden;
      apconfig.channel = _sys_cfg.ap_channel;
      apconfig.max_connection = 4;
      apconfig.beacon_interval = 100;

      if(wifi_softap_set_config(&apconfig))
      {
         wifi_softap_dhcps_stop();

         struct ip_info ipinfo;
         wifi_get_ip_info(SOFTAP_IF, &ipinfo);

         char *ip = (char*) _sys_cfg.ap_ip;
         char *mask = (char*) _sys_cfg.ap_mask;
         char *gw = (char*) _sys_cfg.ap_gw;

         if (ip) ipinfo.ip.addr = ipaddr_addr(ip);
         if (mask) ipinfo.netmask.addr = ipaddr_addr(mask);
         if (gw) ipinfo.gw.addr = ipaddr_addr(gw);

         wifi_set_ip_info(SOFTAP_IF, &ipinfo);
         wifi_softap_dhcps_start();

         return true;
      }
   }

   return false;
}

_sys_cfg is my internal system config struct.
Attachments
Screenshot_2016-06-17-19-55-12.png

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: WiFi AP mode stability

Postby DarkSide » Thu Jun 30, 2016 3:48 pm

Any news?
I have noticed that this occurs simultaneously with messages in UART:

Code: Select all

chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0

This occurs even on SDK 1.5.4.1

UPD:
For me this behavior is reproduced on all channels except CH1. On channel 1 ESP works stable, on all other - bad.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: WiFi AP mode stability

Postby DarkSide » Tue Jul 19, 2016 3:35 pm

Probably same - viewtopic.php?f=7&t=1616

Who is online

Users browsing this forum: No registered users and 7 guests