ESP8266 Developer Zone The Official ESP8266 Forum 2016-11-25T14:01:55+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2595 2016-11-25T14:01:55+08:00 2016-11-25T14:01:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10658#p10658 <![CDATA[Re: SoftAP - incorrect SSID on start]]> Maybe this has something to do with open structures inside the SDK code. I will forward this issue to the firmware developers and get back with what they have to say!

Statistics: Posted by Guest — Fri Nov 25, 2016 2:01 pm


]]>
2016-11-16T20:57:54+08:00 2016-11-16T20:57:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10556#p10556 <![CDATA[Re: SoftAP - incorrect SSID on start]]>
I tried this code:

Code:

void ICACHE_FLASH_ATTR config_set_ap (void)
{
   struct softap_config apconfig;
   char *arg1 = "Espressif";
   char *arg2 = "password";

   wifi_set_opmode(STATIONAP_MODE);

   memset(apconfig.ssid, 0, sizeof(apconfig.ssid));
   memset(apconfig.password, 0, sizeof(apconfig.password));
   os_bzero(&apconfig, sizeof(struct softap_config));
   wifi_softap_get_config(&apconfig);
   os_strncpy(apconfig.ssid, arg1, sizeof(apconfig.ssid));
   os_strncpy(apconfig.password, arg2, sizeof(apconfig.password));
   apconfig.ssid_len = strlen(arg1);

   apconfig.authmode = AUTH_WPA2_PSK;
   apconfig.ssid_len = 9;
   apconfig.max_connection = 1;

   ETS_UART_INTR_DISABLE();
   wifi_softap_set_config(&apconfig);
   ETS_UART_INTR_ENABLE();
   system_restart();
}


Without an OS task.

After the command, the ESP does not appear again. So I reset the power. The SSID changed.

The flash memory addresses 0x3FE0B4 and 0x3FE0D4 have the new SSID and password.

I hope this information can help us.

Statistics: Posted by Guest — Wed Nov 16, 2016 8:57 pm


]]>
2016-11-16T19:23:04+08:00 2016-11-16T19:23:04+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10554#p10554 <![CDATA[Re: SoftAP - incorrect SSID on start]]>
I tried this code, without success.

Code:

void set_ap_config (os_event_t *e)
{
   struct softap_config ap;

   wifi_softap_get_config(&ap);

   os_memset(ap.ssid, 0, 32);
   os_memcpy(ap.ssid, "Espressif", 9);

   os_memset(ap.password, 0, 64);
   os_memcpy(ap.password, "password", 8);
   ap.authmode = AUTH_WPA2_PSK;
   
   ap.ssid_len = 8;
   ap.max_connection = 1;
   wifi_softap_set_config (&ap);
   system_restart();
}


void ICACHE_FLASH_ATTR config_set_ap (void)
{
   unsigned char res;
   os_event_t testQueue[1];

   res = wifi_set_opmode_current (0x02);

   system_os_task (set_ap_config, USER_TASK_PRIO_1, testQueue, 1);

}


After the command, the AP disappear and appear again with default SSID and without password.

Statistics: Posted by Guest — Wed Nov 16, 2016 7:23 pm


]]>
2016-11-15T16:12:52+08:00 2016-11-15T16:12:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10538#p10538 <![CDATA[Re: SoftAP - incorrect SSID on start]]> If even that does not work, please let me know what happens if you call system restart API after setting default AP properties. Does it reboot with proper AP name or still reboots with same default SSID?

Statistics: Posted by Guest — Tue Nov 15, 2016 4:12 pm


]]>
2016-11-15T02:36:49+08:00 2016-11-15T02:36:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10532#p10532 <![CDATA[Re: SoftAP - incorrect SSID on start]]>
I tried this code, without success.

Code:

void set_ap_config (os_event_t *e)
{
   struct softap_config ap;

   wifi_softap_get_config(&ap);

   os_memset(ap.ssid, 0, 32);
   os_memcpy(ap.ssid, "TST_ESP_", 8);
   
   ap.ssid_len = 8;
   ap.max_connection = 1;
   wifi_softap_set_config (&ap);
}


void ICACHE_FLASH_ATTR config_set_ap (void)
{
   unsigned char res;
   os_event_t testQueue[1];

   res = wifi_set_opmode_current (0x02);

   system_os_task (set_ap_config, USER_TASK_PRIO_1, testQueue, 1);

}


After the command, the AP disappear and appear again with same SSID initial.

I need to change the SSID, how I can do it?

Statistics: Posted by Guest — Tue Nov 15, 2016 2:36 am


]]>
2016-11-12T12:19:18+08:00 2016-11-12T12:19:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10513#p10513 <![CDATA[Re: SoftAP - incorrect SSID on start]]> http://iot-bits.com/articles/esp8266-so ... t-working/

This, or a complete system restart tends to work 100% of the time when changing config. Let me know if this helped!

Statistics: Posted by Guest — Sat Nov 12, 2016 12:19 pm


]]>
2016-11-11T17:53:08+08:00 2016-11-11T17:53:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=10509#p10509 <![CDATA[Re: SoftAP - incorrect SSID on start]]>
I have the same problem with SDK 1.5.4.
How I can fix it?

Statistics: Posted by Guest — Fri Nov 11, 2016 5:53 pm


]]>
2016-08-18T10:20:33+08:00 2016-08-18T10:20:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=8551#p8551 <![CDATA[Re: SoftAP - incorrect SSID on start]]> The user_init routine does:

wifi_set_opmode (STATION_MODE)
wifi_station_set_autoconnect (0)
wifi_set_macaddr (STATION_IF, xxx)
wifi_set_macaddr (SOFTAP_IF,xxxx)
wifi_set_opmode (STATION_MODE)

The rest of the in the function called by system_init_done_cb ()

Statistics: Posted by narayan — Thu Aug 18, 2016 10:20 am


]]>
2016-08-17T10:20:47+08:00 2016-08-17T10:20:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=8534#p8534 <![CDATA[Re: SoftAP - incorrect SSID on start]]>
Which SDK are you using?
Also, do you initialize these settings in user_main?

Statistics: Posted by Guest — Wed Aug 17, 2016 10:20 am


]]>
2016-08-17T07:16:56+08:00 2016-08-17T07:16:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2595&p=8529#p8529 <![CDATA[SoftAP - incorrect SSID on start]]> I set the SoftAP SSID to Zentri_xxx. However one in 3 to 1 in 5 times, the softap is started with ssid of ESP_xxxxxxx
Not only is this the case, but also I specify IP address of 10.10.10.1 and with DHCP service 10.10.10.x
However this changes to 192.168.4.x. This is not OK for our product, as the connecting server and web-pages
that are being served with the device expect to use 10.10.10.1.

We use:
wifi_softap_set_config_current ()
wifi_softap_dhcps_stop ()
wifi_set_opmode (SOFTAP_MODE)
/* I have better luck if I do this twice */
wifi_softap_set_config_current ()
wifi_softap_dhcps_stop ()
wifi_softap_set_dhcps_lease ()
wifi_softap_dhcps_start ()

This is a critical bug, please help.

Statistics: Posted by narayan — Wed Aug 17, 2016 7:16 am


]]>