Problems running softAP -SDK 1.4.0 [SOLVED]

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Problems running softAP -SDK 1.4.0 [SOLVED]

Postby PeteW » Tue Oct 20, 2015 9:55 pm

Hello all,

I have problems when configuring ESP8266 as AP - I used code from the demo http://bbs.espressif.com/viewtopic.php?f=31&t=227 with small modifications:
  1. I set mode to softAP only

    Code: Select all

    wifi_set_opmode(SOFTAP_MODE);
  2. Instead of loading previous configuration with wifi_softap_get_config(&config); I set all parameters manually

    Code: Select all

    user_set_softap_config(void) {
       struct softap_config config;
       
       os_memset(config.ssid, 0, 32);
       os_memset(config.password, 0, 64);
       
       os_memcpy(config.ssid, "ESP8266", 7);
       os_memcpy(config.password, "12345678", 8);
       config.ssid_len = 0;
       config.channel = 1;
       config.authmode = AUTH_WPA2_PSK;
       config.ssid_hidden = 0;
       config.max_connection = 4;
       config.beacon_interval = 100;
       
       wifi_softap_set_config(&config);// Set ESP8266 softap config
    }


If I set channel to 11 where our AP is running everything working fine.
If I set channel to any other from 1 to 13 I can not connect to ESP8266 AP and I am getting following messages on UART:

Code: Select all

chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
.... and so on


I'm not sure if the problem is after upgrading to SDK 1.4.0 because till now I've worked in mixed softAP+station and when station is activated it forces softAP channel to our AP channel and then everything working as expected.

Any help will be appreciated!
Last edited by PeteW on Thu Oct 22, 2015 2:54 pm, edited 1 time in total.

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Re: Problems running softAP -SDK 1.4.0

Postby PeteW » Wed Oct 21, 2015 2:32 pm

Update: I did same test with SDK 1.3.0 and everything works fine. The problem is definitely SDK 1.4.0 related

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: Problems running softAP -SDK 1.4.0

Postby ESP_Faye » Wed Oct 21, 2015 3:14 pm

Hi,

I tried your test code, our mobile phone and PC can connect to ESP8266 softAP successfully..

Can you provide your test bin ?

I will download it and have a try.

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Re: Problems running softAP -SDK 1.4.0

Postby PeteW » Wed Oct 21, 2015 8:45 pm

Here is complete source I used to test and reproduce the problem. In folder bin/upgrade are binaries I'm using. They are complied using following command:

Code: Select all

make clean
make COMPILE=gcc SPI_SIZE_MAP=3 BOOT=new APP=1
make clean
make COMPILE=gcc SPI_SIZE_MAP=3 BOOT=new APP=2


Resulting firmware is flashed using:

Code: Select all

esptool/esptool.py --baud 576000 write_flash 0x00000 bin/boot_v1.2.bin 0x01000 bin/upgrade/user1.2048.new.3.bin 0x81000 bin/upgrade/user2.2048.new.3.bin 0x1FC000 bin/esp_init_data_default.bin 0x1FE000 bin/blank.bin --flash_size 16m


In UART console I'm seeing following:

Code: Select all

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

INIT: Done

chg_A3:-180
chg_A3:0
add 1
aid 1
station: 0c:84:dc:8d:4c:ad join, AID = 1
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180
chg_A3:0
chg_A3:-180


The laptop I'm using is running Win 8.1 and connection is briefly established but immediately disconnected. I did not have time to type ping command :?

Hope this info will help to reproduce the problem at your site.
Attachments
esp_iot_sdk_v1.4.0.zip
Complete source and binaries
(3.94 MiB) Downloaded 193 times

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Re: Problems running softAP -SDK 1.4.0

Postby PeteW » Wed Oct 21, 2015 8:46 pm

By the way what is the meaning of chg_A3 message?

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Re: Problems running softAP -SDK 1.4.0

Postby PeteW » Wed Oct 21, 2015 8:51 pm

Forgot to remind to set channel (in my case 1) to free one (not used by other AP) before running the example!

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: Problems running softAP -SDK 1.4.0

Postby ESP_Faye » Thu Oct 22, 2015 2:17 pm

Hi,

We optimized our softAP, please have a try with the attachment.

Thanks for your interest in ESP8266 !
Attachments
esp_iot_sdk_v1.4.1_pre2_15_10_22.zip
(1010.72 KiB) Downloaded 273 times

User avatar
PeteW
Posts: 6
Joined: Fri Mar 27, 2015 6:42 pm

Re: Problems running softAP -SDK 1.4.0

Postby PeteW » Thu Oct 22, 2015 2:54 pm

It is working fine! :D No more chg_A3 messages appeared in the UART console.

Thank you!

BlackHole
Posts: 3
Joined: Mon Jul 27, 2015 10:28 am

Re: Problems running softAP -SDK 1.4.0 [SOLVED]

Postby BlackHole » Thu Oct 22, 2015 5:46 pm

undefined reference to 'system_upgrade_start' :x

ESP_Faye
Posts: 1642
Joined: Mon Oct 27, 2014 11:08 am

Re: Problems running softAP -SDK 1.4.0 [SOLVED]

Postby ESP_Faye » Fri Oct 23, 2015 4:37 pm

Hi, BlackHole

Sorry for the inconvenience.

Please download http://bbs.espressif.com/viewtopic.php?f=46&t=1268&p=4238.

Who is online

Users browsing this forum: No registered users and 9 guests