ESP8266 Developer Zone The Official ESP8266 Forum 2015-06-18T11:35:50+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=615 2015-06-18T11:35:50+08:00 2015-06-18T11:35:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=615&p=2308#p2308 <![CDATA[Re: Setting up AP mode with sdk v1.1.2]]>
Thanks for your interest in ESP8266 !

Please refer to softAP configuration demo here http://bbs.espressif.com/viewtopic.php?f=21&t=227&p=834

Notice:

Code:

wifi_softap_get_config(&softap_config); // Get config first

is recommended to be called first.
Or you have to set value for every parameter in softap_config, for example, softap_config.beacon_interval and softap_config.ssid_len, otherwise they will be random value which may make ESP8266 softAP hardly to be connected.

Statistics: Posted by ESP_Faye — Thu Jun 18, 2015 11:35 am


]]>
2015-06-17T18:15:43+08:00 2015-06-17T18:15:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=615&p=2285#p2285 <![CDATA[Setting up AP mode with sdk v1.1.2]]>
I am trying to setup my ESP in SOFTAP mode and setting its SSID and password and also starting dhcp server. The code starts the ESP in SOFTAP mode and broadcasts its SSID, but when I try to connect to it, it does not connect to ESP. Am I missing something? Any pointers or fix to my code to make it working, so my phone can connect to the ESP in AP mode will be much appreciated.

Code:

void ICACHE_FLASH_ATTR
user_single_led_init(void)
{
   
   struct softap_config config;
   char ssid[32] = "MyESPinC";
   char password[33] = "AppleMBA";
   char macaddr[6];

   wifi_softap_get_config(&config);
   wifi_get_macaddr(SOFTAP_IF, macaddr);

   os_memset(config.ssid, 0, 32);
   os_memcpy(config.ssid, ssid, 32);
   os_memset(config.password, 0, sizeof(config.password));
   os_memcpy(config.password, password, os_strlen(password));
   config.authmode = AUTH_WPA_WPA2_PSK;

   wifi_softap_set_config(&config);

   wifi_set_opmode(STATIONAP_MODE);

   wifi_softap_dhcps_start();
}

Statistics: Posted by paritosharya007 — Wed Jun 17, 2015 6:15 pm


]]>