ESP STA or AP wifi is not working

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 5:43 am

ESP_Angus wrote:If erasing flash and then loading the same firmware binary that works on other boards fails, then this sounds like a hardware issue. You may be able to reflow the chip or module in place (antenna pad, antenna matching network, or possibly power supply connections or decoupling capacitors although probably not), or you may need to replace it.
Hi,

Yes that is last option for me to replace the chip as erasing and flashing program again is also not working on both failing boards. Is there any other way from SDK to debug it?
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 5:48 am

WiFive wrote:@ESP_Angus Is there a way to detect RF hardware problem during calibration with verbose output?

@Ritesh what hardware are you using? Custom design with bare esp32 chip? Did you try Bluetooth functions?
We have created our own development board using ESP32 chip which is master for my board and it is like WiFi Gateway.No, I haven't did anything for Bluetooth till now on all boards. I am just using WiFi only but we have plan to use Bluetooth in later stage.

Let me know if you need any further informations from my side.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 5:53 am

Hi All,

Also one interesting thing which I forgot to inform is that I am using "Factory app, two OTA definitions" instead of default OTA partition because we have one requirement to upgrade firmware through OTA.

So, Does it create any problem as I have seen that RF Calibration is configured as FULL Default RF Calibration after creating two OTA Partitions?

Also let me know if this type of issue has been fixed in side SDK recently before 5 or 10 days as I am using somewhat older ESP32-idf SDK.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 6:02 am

Hi,

I have also checked after erasing SPI Flash and reprogrammed same firmware into one of 28 working boards in which WiFi AP and STA both are working fine with different configurations.

So, it seems like firmware is correct and procedure to install firmware is also OK.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 6:20 am

Hi All,

I have checked with latest ESP32-idf SDK and issue remains same means not able start STA and AP WiFi mode configurations even after changing ESP32-idf RTOS SDK.

So, As I have one doubt of ESP32-idf which is also clear after checking with latest ESP32-idf in which I am getting same issue on both not working boards.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 9:53 am

WiFive wrote:@ESP_Angus Is there a way to detect RF hardware problem during calibration with verbose output?

@Ritesh what hardware are you using? Custom design with bare esp32 chip? Did you try Bluetooth functions?
Hi,

Please find some more updates regarding RF Testing which we have performed into both boards in which WiFi STA+AP mode is not working like other boards.

1) First of all, We have loaded "ESP32_FCC_WIFI_BT_20161208_V1.0.4.bin" to check RF related testing and we are getting proper TX Power which are expected using RF Binary provide by Espressif Systems.

2) For example, We have executed "wifitxout 1 0x0 0" to check TX Power and we are getting proper RF Power which we have measured using Spectrum Analyzer Device.

So, We have also tested other commands which are given into RF Testing Documents and we are getting proper output based on commands which we have executed.

It seems like if there is pure hardware ESP32 chip issue then all RF commands should also getting failed which is not happening right now. It means we can not say exactly that issue is from ESP32 chip hardware side or ESD Static Charge Issue or from software side.

Please let me know your thoughts or suggestions if any from your side and how to prevent this issue as out of 30 ESP32 chips we are getting issue into 2 ESP32 chips
Regards,
Ritesh Prajapati

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP STA or AP wifi is not working

Postby ESP_Angus » Thu Feb 02, 2017 11:35 pm

WiFive wrote: @ESP_Angus Is there a way to detect RF hardware problem during calibration with verbose output?
Not that I know of, unfortunately. This would be a useful feature to add.
Ritesh wrote: 1) First of all, We have loaded "ESP32_FCC_WIFI_BT_20161208_V1.0.4.bin" to check RF related testing and we are getting proper TX Power which are expected using RF Binary provide by Espressif Systems.

2) For example, We have executed "wifitxout 1 0x0 0" to check TX Power and we are getting proper RF Power which we have measured using Spectrum Analyzer Device.
When viewed on the Spectrum Analyzer, do you notice any differences at all between the output of the working modules and the non-working modules?
Ritesh wrote: It seems like if there is pure hardware ESP32 chip issue then all RF commands should also getting failed which is not happening right now. It means we can not say exactly that issue is from ESP32 chip hardware side or ESD Static Charge Issue or from software side.
It is still possible for hardware problems or other damage (ESD discharge, soldering damage, other damage) to have disrupted RF reception (LNA) but not than RF transmission (PA). The emissions test suite only makes use of the latter.

Three other things to try:

1. Do any of the simple example programs work any differently when connecting to WiFi?

2. Do you have access to a device that can monitor raw 802.11 traffic? (For example, I use an old TP-Link USB dongle with an Atheros chipset that supports "monitor mode" via airmon-ng) & wireshark. Some high end spectrum analyzers and other RF test equipment can also decode 802.11 traffic. If you can get a raw 802.11 frame capture of your test AP's channel, you may (or may not) see the "bad" ESP32s trying to connect and this may give you some insights.

3. I don't think it's likely to have an effect, but apart from SPI flash contents (which you've guaranteed is identical via make erase_flash / make flash), the other thing that can be different inside the chip is EFuse. Running "espefuse.py summary" will dump an efuse summary. Apart from MAC address, all other bits should be zero. Suggest comparing a "good" and a "bad" ESP32, just to be sure.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Fri Feb 03, 2017 5:33 am

ESP_Angus wrote:
WiFive wrote: @ESP_Angus Is there a way to detect RF hardware problem during calibration with verbose output?
Not that I know of, unfortunately. This would be a useful feature to add.
Ritesh wrote: 1) First of all, We have loaded "ESP32_FCC_WIFI_BT_20161208_V1.0.4.bin" to check RF related testing and we are getting proper TX Power which are expected using RF Binary provide by Espressif Systems.

2) For example, We have executed "wifitxout 1 0x0 0" to check TX Power and we are getting proper RF Power which we have measured using Spectrum Analyzer Device.
When viewed on the Spectrum Analyzer, do you notice any differences at all between the output of the working modules and the non-working modules?
Ritesh wrote: It seems like if there is pure hardware ESP32 chip issue then all RF commands should also getting failed which is not happening right now. It means we can not say exactly that issue is from ESP32 chip hardware side or ESD Static Charge Issue or from software side.
It is still possible for hardware problems or other damage (ESD discharge, soldering damage, other damage) to have disrupted RF reception (LNA) but not than RF transmission (PA). The emissions test suite only makes use of the latter.

Three other things to try:

1. Do any of the simple example programs work any differently when connecting to WiFi?

2. Do you have access to a device that can monitor raw 802.11 traffic? (For example, I use an old TP-Link USB dongle with an Atheros chipset that supports "monitor mode" via airmon-ng) & wireshark. Some high end spectrum analyzers and other RF test equipment can also decode 802.11 traffic. If you can get a raw 802.11 frame capture of your test AP's channel, you may (or may not) see the "bad" ESP32s trying to connect and this may give you some insights.

3. I don't think it's likely to have an effect, but apart from SPI flash contents (which you've guaranteed is identical via make erase_flash / make flash), the other thing that can be different inside the chip is EFuse. Running "espefuse.py summary" will dump an efuse summary. Apart from MAC address, all other bits should be zero. Suggest comparing a "good" and a "bad" ESP32, just to be sure.
Hi,

Thanks for Reply.

Please find my below in-line answers for some of your questions.

1. Do any of the simple example programs work any differently when connecting to WiFi?
[Ritesh] :- Yes. I have created one simple program which will just initialize WiFi into AP mode with patterned SSID from MAC Address and into STA Mode in which SSID and Password is given of router which which ESP32 will be connected. So, That is simple program which has no more extra logic except WiFi connectivity.

Code: Select all

static void initialise_wifi(void)
{
	uint8_t mac[MAC_STR_LEN] = {0};
	
	ESP_LOGI(TAG, "********* initialise_wifi started ***********");

	tcpip_adapter_init();
    wifi_event_group = xEventGroupCreate();
    ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
    wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
    ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
    ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_FLASH) );

    esp_efuse_read_mac(mac);

    /* code to configure ESP32 module into AP+STA mode */
	ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_APSTA) );
	wifi_config_t sta_config;
	memset((_PTR)&sta_config,0,sizeof(sta_config));
	ESP_ERROR_CHECK(esp_wifi_get_config(WIFI_IF_STA, &sta_config));

	printf("1) read ssid  :::::::: %s   \r\n 2)read pwd :::::::::: %s\r\n",sta_config.sta.ssid,sta_config.sta.password);
	if(strlen((const char *)sta_config.sta.ssid))
	{
		sta_config.sta.bssid_set= false;

		ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config));
		ESP_LOGI(TAG, "Setting STATION WiFi configuration SSID %s...", sta_config.sta.ssid);
		ESP_LOGI(TAG, "Setting STATION WiFi configuration password %s...", sta_config.sta.password);
	}
	else
	{

		printf("no ssid found \r\n");
		memset((_PTR)&sta_config,0,sizeof(sta_config));

	    strcpy((char *)sta_config.sta.ssid,WIFI_SSID);
	   	strcpy((char *)sta_config.sta.password,WIFI_PASS);
	   	sta_config.sta.bssid_set= false;

	    ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) );

	}
		 wifi_config_t ap_config = {
			.ap = {
				.password = "esp123456",
				.ssid_len = 0,
				.channel = 6,
				.authmode = WIFI_AUTH_WPA_WPA2_PSK,
				.max_connection = 4,
			}
		};

		sprintf((char *)ap_config.ap.ssid, "ESP32_%02X%02X%02X%02X%02X%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]+1);

		ESP_LOGI(TAG, "Setting AP WiFi configuration SSID %s...", ap_config.ap.ssid);
		ESP_LOGI(TAG, "Setting AP WiFi configuration password %s...", ap_config.ap.password);
		ESP_LOGI(TAG, "Setting AP WiFi configuration max_connection %d...", ap_config.ap.max_connection);
		ESP_LOGI(TAG, "Setting AP WiFi configuration ssid_len %d...", ap_config.ap.ssid_len);
		ESP_LOGI(TAG, "Setting AP WiFi configuration channel %d...", ap_config.ap.channel);
		ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_AP, &ap_config) );


    ESP_ERROR_CHECK( esp_wifi_start() );
    //ESP_ERROR_CHECK( esp_wifi_connect() );
} 
3. I don't think it's likely to have an effect, but apart from SPI flash contents (which you've guaranteed is identical via make erase_flash / make flash), the other thing that can be different inside the chip is EFuse. Running "espefuse.py summary" will dump an efuse summary. Apart from MAC address, all other bits should be zero. Suggest comparing a "good" and a "bad" ESP32, just to be sure.
[Ritesh] :- I have also executed espefuse.py with summary and checked that all other bits are zero except MAC Address. Please find below output for not working board.
Connecting...
Security fuses:
FLASH_CRYPT_CNT Flash encryption mode counter = 0 R/W (0x0)
FLASH_CRYPT_CONFIG Flash encryption config (key tweak bits) = 0 R/W (0x0)
CONSOLE_DEBUG_DISABLE Disable ROM BASIC interpreter fallback = 0 R/W (0x0)
ABS_DONE_0 secure boot enabled for bootloader = 0 R/W (0x0)
ABS_DONE_1 secure boot abstract 1 locked = 0 R/W (0x0)
JTAG_DISABLE Disable JTAG = 0 R/W (0x0)
DISABLE_DL_ENCRYPT Disable flash encryption in UART bootloader = 0 R/W (0x0)
DISABLE_DL_DECRYPT Disable flash decryption in UART bootloader = 0 R/W (0x0)
DISABLE_DL_CACHE Disable flash cache in UART bootloader = 0 R/W (0x0)
BLK1 Flash encryption key
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLK2 Secure boot key
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLK3 Variable Block 3
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W

Efuse fuses:
WR_DIS Efuse write disable mask = 0 R/W (0x0)
RD_DIS Efuse read disablemask = 0 R/W (0x0)
CODING_SCHEME Efuse variable block length scheme = 0 R/W (0x0)
KEY_STATUS Usage of efuse block 3 (reserved) = 0 R/W (0x0)

Config fuses:
XPD_SDIO_FORCE Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = 0 R/W (0x0)
XPD_SDIO_REG If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = 0 R/W (0x0)
XPD_SDIO_TIEH If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V = 0 R/W (0x0)
SPI_PAD_CONFIG_CLK Override SD_CLK pad (GPIO6/SPICLK) = 0 R/W (0x0)
SPI_PAD_CONFIG_Q Override SD_DATA_0 pad (GPIO7/SPIQ) = 0 R/W (0x0)
SPI_PAD_CONFIG_D Override SD_DATA_1 pad (GPIO8/SPID) = 0 R/W (0x0)
SPI_PAD_CONFIG_HD Override SD_DATA_2 pad (GPIO9/SPIHD) = 0 R/W (0x0)
SPI_PAD_CONFIG_CS0 Override SD_CMD pad (GPIO11/SPICS0) = 0 R/W (0x0)
DISABLE_SDIO_HOST Disable SDIO host = 0 R/W (0x0)

Identity fuses:
MAC MAC Address = c4:04:df:5c:00:46 R/W
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Fri Feb 03, 2017 12:05 pm

Hi,

I have created one sample program in which only AP network is created based on MAC address get from ESP and looked all debug logs of non-working board with working board and found that I am getting all NVS related get and set API debug logs into working board while getting only NVS get related API debug logs into non-working board.

So, It seems like there might be issue into NVS section which can cause this type of issue but still i am not sure for that.

Below logs of device in which AP mode is working
========================================

I (2896) ESP_BOARD_TESTING: ********* initialise_wifi started ***********
tcpip_task_hdlxxx : 3ffc83bc, prio:18,stack:2048
D (2906) nvs: nvs_open misc 1
D (2906) nvs: nvs_get_str_or_blob log
D (2916) nvs: nvs_set_blob log 16
I (2916) wifi: frc2_timer_task_hdl:3ffc9e20, prio:22, stack:2048
D (2926) nvs: nvs_open nvs.net80211 1
D (2926) nvs: nvs_get opmode 1
D (2926) nvs: nvs_set opmode 1 2
D (2936) nvs: nvs_get country 1
D (2936) nvs: nvs_set country 1 0
D (2936) nvs: nvs_get_str_or_blob sta.ssid
D (2946) nvs: nvs_set_blob sta.ssid 36
D (2946) nvs: nvs_get_str_or_blob sta.mac
D (2946) nvs: nvs_set_blob sta.mac 6
D (2956) nvs: nvs_get sta.authmode 1
D (2956) nvs: nvs_set sta.authmode 1 1
D (2966) nvs: nvs_get_str_or_blob sta.pswd
D (2966) nvs: nvs_set_blob sta.pswd 65
D (2966) nvs: nvs_get_str_or_blob sta.pmk
D (2976) nvs: nvs_set_blob sta.pmk 32
D (2976) nvs: nvs_get sta.chan 1
D (2976) nvs: nvs_set sta.chan 1 1
D (2986) nvs: nvs_get auto.conn 1
D (2986) nvs: nvs_set auto.conn 1 1
D (2996) nvs: nvs_get bssid.set 1
D (2996) nvs: nvs_set bssid.set 1 0
D (2996) nvs: nvs_get_str_or_blob sta.bssid
D (3006) nvs: nvs_set_blob sta.bssid 6
D (3006) nvs: nvs_get sta.phym 1
D (3006) nvs: nvs_set sta.phym 1 3
D (3016) nvs: nvs_get sta.phybw 1
D (3016) nvs: nvs_set sta.phybw 1 2
D (3016) nvs: nvs_get_str_or_blob sta.apsw
D (3026) nvs: nvs_set_blob sta.apsw 2
D (3026) nvs: nvs_get_str_or_blob sta.apinfo
D (3036) nvs: nvs_set_blob sta.apinfo 700
D (3036) nvs: nvs_get_str_or_blob ap.ssid
D (3036) nvs: nvs_set_blob ap.ssid 36
D (3046) nvs: nvs_get_str_or_blob ap.mac
D (3046) nvs: nvs_set_blob ap.mac 6
D (3056) nvs: nvs_get_str_or_blob ap.passwd
D (3056) nvs: nvs_set_blob ap.passwd 65
D (3056) nvs: nvs_get_str_or_blob ap.pmk
D (3066) nvs: nvs_set_blob ap.pmk 32
D (3066) nvs: nvs_get ap.chan 1
D (3066) nvs: nvs_set ap.chan 1 14
D (3076) nvs: nvs_get ap.authmode 1
D (3076) nvs: nvs_set ap.authmode 1 0
D (3086) nvs: nvs_get ap.hidden 1
D (3086) nvs: nvs_set ap.hidden 1 0
D (3086) nvs: nvs_get ap.max.conn 1
D (3096) nvs: nvs_set ap.max.conn 1 4
D (3096) nvs: nvs_get bcn.interval 2
D (3096) nvs: nvs_set bcn.interval 2 100
D (3106) nvs: nvs_get ap.phym 1
D (3106) nvs: nvs_set ap.phym 1 3
D (3106) nvs: nvs_get ap.phybw 1
D (3116) nvs: nvs_set ap.phybw 1 2
D (3116) nvs: nvs_get ap.sndchan 1
D (3116) nvs: nvs_set ap.sndchan 1 1
D (3126) nvs: nvs_set ap.chan 1 1
D (3126) nvs: nvs_set_blob sta.mac 6
D (3126) nvs: nvs_set_blob ap.mac 6
I (3136) wifi: pp_task_hdl : 3ffcc718, prio:23, stack:8192
I (3136) ESP_BOARD_TESTING: Setting AP WiFi configuration SSID ESP_240AC404DF7D...
I (3146) ESP_BOARD_TESTING: Setting AP WiFi configuration password esp123456...
I (3156) ESP_BOARD_TESTING: Setting AP WiFi configuration max_connection 4...
I (3166) ESP_BOARD_TESTING: Setting AP WiFi configuration ssid_len 0...
I (3176) ESP_BOARD_TESTING: Setting AP WiFi configuration channel 6...
D (3176) nvs: nvs_set_blob ap.ssid 36
D (3186) nvs: nvs_set_blob ap.passwd 65
D (3186) nvs: nvs_set ap.authmode 1 4
D (3186) nvs: nvs_set ap.chan 1 6
D (3196) nvs: nvs_set ap.hidden 1 0
D (3196) nvs: nvs_set ap.max.conn 1 4
D (3196) nvs: nvs_set bcn.interval 2 100
D (3846) nvs: nvs_set_blob ap.pmk 32
I (3846) wifi: mode : softAP (24:0a:c4:04:df:7d)
D (3856) event: SYSTEM_EVENT_AP_START
dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
I (3856) ESP_BOARD_TESTING: ********* event_handler :: SYSTEM_EVENT_AP_START called :: esp_get_free_heap_size :: 171316 ***********
I (3866) ESP_BOARD_TESTING: JN516X_RESET_GPIO_26 on system startup :: 0

I (3876) ESP_BOARD_TESTING: TLINK_RESET_GPIO_27 on system startup :: 0

Below Logs of device in which AP mode is not working
===========================================

I (1568) ESP_BOARD_TESTING: ********* initialise_wifi started ***********
tcpip_task_hdlxxx : 3ffc8514, prio:18,stack:2048
D (1578) nvs: nvs_open misc 1
D (1578) nvs: nvs_get_str_or_blob log
I (1588) wifi: frc2_timer_task_hdl:3ffc9f54, prio:22, stack:2048
D (1588) nvs: nvs_open nvs.net80211 1
D (1598) nvs: nvs_get opmode 1
D (1598) nvs: nvs_get country 1
D (1598) nvs: nvs_get_str_or_blob sta.ssid
D (1608) nvs: nvs_get_str_or_blob sta.mac
D (1608) nvs: nvs_get sta.authmode 1
D (1608) nvs: nvs_get_str_or_blob sta.pswd
D (1618) nvs: nvs_get_str_or_blob sta.pmk
D (1618) nvs: nvs_get sta.chan 1
D (1618) nvs: nvs_get auto.conn 1
D (1628) nvs: nvs_get bssid.set 1
D (1628) nvs: nvs_get_str_or_blob sta.bssid
D (1638) nvs: nvs_get sta.phym 1
D (1638) nvs: nvs_get sta.phybw 1
D (1638) nvs: nvs_get_str_or_blob sta.apsw
D (1648) nvs: nvs_get_str_or_blob sta.apinfo
D (1648) nvs: nvs_get_str_or_blob ap.ssid
D (1658) nvs: nvs_get_str_or_blob ap.mac
D (1658) nvs: nvs_get_str_or_blob ap.passwd
D (1658) nvs: nvs_get_str_or_blob ap.pmk
D (1668) nvs: nvs_get ap.chan 1
D (1668) nvs: nvs_get ap.authmode 1
D (1668) nvs: nvs_get ap.hidden 1
D (1678) nvs: nvs_get ap.max.conn 1
D (1678) nvs: nvs_get bcn.interval 2
D (1678) nvs: nvs_get ap.phym 1
D (1688) nvs: nvs_get ap.phybw 1
D (1688) nvs: nvs_get ap.sndchan 1
D (1688) nvs: nvs_set_blob sta.mac 6
D (1698) nvs: nvs_set_blob ap.mac 6
I (1698) wifi: pp_task_hdl : 3ffcc7a0, prio:23, stack:8192
I (1708) ESP_BOARD_TESTING: Setting AP WiFi configuration SSID ESP_240AC404DF5D...
I (1718) ESP_BOARD_TESTING: Setting AP WiFi configuration password esp123456...
I (1718) ESP_BOARD_TESTING: Setting AP WiFi configuration max_connection 4...
I (1728) ESP_BOARD_TESTING: Setting AP WiFi configuration ssid_len 0...
I (1738) ESP_BOARD_TESTING: Setting AP WiFi configuration channel 6...
D (1748) nvs: nvs_set_blob ap.ssid 36
D (1748) nvs: nvs_set_blob ap.passwd 65
D (1748) nvs: nvs_set ap.authmode 1 4
D (1758) nvs: nvs_set ap.chan 1 6
D (1758) nvs: nvs_set ap.hidden 1 0
D (1758) nvs: nvs_set ap.max.conn 1 4
D (1768) nvs: nvs_set bcn.interval 2 100
I (1768) wifi: mode : softAP (24:0a:c4:04:df:5d)
D (1778) event: SYSTEM_EVENT_AP_START
dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
I (1788) ESP_BOARD_TESTING: ********* event_handler :: SYSTEM_EVENT_AP_START called :: esp_get_free_heap_size :: 171180 ***********
I (1798) ESP_BOARD_TESTING: JN516X_RESET_GPIO_26 on system startup :: 0

I (1808) ESP_BOARD_TESTING: TLINK_RESET_GPIO_27 on system startup :: 0
Please check above logs and let me know if anyone find anything regarding WiFi STA+AP not working issue.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Fri Feb 03, 2017 1:21 pm

Hi All,

I have also created one sample binary in which it is trying to connect to one specific router and captured logs of both working and not working boards in STA mode as well.

Please check following logs for reference.

ESP STA Mode Logs of Working Board
=============================

I (2705) ESP_BOARD_TESTING: ********* initialise_wifi_in_sta_mode started ***********
tcpip_task_hdlxxx : 3ffc851c, prio:18,stack:2048
D (2725) nvs: nvs_open misc 1
D (2725) nvs: nvs_get_str_or_blob log
I (2725) wifi: frc2_timer_task_hdl:3ffc9f5c, prio:22, stack:2048
D (2735) nvs: nvs_open nvs.net80211 1
D (2735) nvs: nvs_get opmode 1
D (2745) nvs: nvs_get country 1
D (2745) nvs: nvs_get_str_or_blob sta.ssid
D (2745) nvs: nvs_get_str_or_blob sta.mac
D (2755) nvs: nvs_get sta.authmode 1
D (2755) nvs: nvs_get_str_or_blob sta.pswd
D (2765) nvs: nvs_get_str_or_blob sta.pmk
D (2765) nvs: nvs_get sta.chan 1
D (2765) nvs: nvs_get auto.conn 1
D (2775) nvs: nvs_get bssid.set 1
D (2775) nvs: nvs_get_str_or_blob sta.bssid
D (2775) nvs: nvs_get sta.phym 1
D (2785) nvs: nvs_get sta.phybw 1
D (2785) nvs: nvs_get_str_or_blob sta.apsw
D (2795) nvs: nvs_get_str_or_blob sta.apinfo
D (2795) nvs: nvs_get_str_or_blob ap.ssid
D (2795) nvs: nvs_get_str_or_blob ap.mac
D (2805) nvs: nvs_get_str_or_blob ap.passwd
D (2805) nvs: nvs_get_str_or_blob ap.pmk
D (2815) nvs: nvs_get ap.chan 1
D (2815) nvs: nvs_get ap.authmode 1
D (2815) nvs: nvs_get ap.hidden 1
D (2825) nvs: nvs_get ap.max.conn 1
D (2825) nvs: nvs_get bcn.interval 2
D (2825) nvs: nvs_get ap.phym 1
D (2835) nvs: nvs_get ap.phybw 1
D (2835) nvs: nvs_get ap.sndchan 1
D (2835) nvs: nvs_set_blob sta.mac 6
D (2845) nvs: nvs_set_blob ap.mac 6
I (2845) wifi: pp_task_hdl : 3ffcc7a8, prio:23, stack:8192
1) read ssid :::::::: ESP-WiFi
2)read pwd :::::::::: ESPWiFiIn
D (2855) nvs: nvs_set_blob sta.ssid 36
D (2865) nvs: nvs_set_blob sta.pswd 65
D (2865) nvs: nvs_set bssid.set 1 0
I (2865) ESP_BOARD_TESTING: Setting STATION WiFi configuration SSID ESP-WiFi...
I (2875) ESP_BOARD_TESTING: Setting STATION WiFi configuration password ESPWiFiIn...
I (2885) wifi: mode : sta (24:0a:c4:04:df:7c)
D (2885) event: SYSTEM_EVENT_STA_START
I (2895) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_START event called ***********
I (2905) ESP_BOARD_TESTING: JN516X_RESET_GPIO_26 on system startup :: 0

I (2905) ESP_BOARD_TESTING: TLINK_RESET_GPIO_27 on system startup :: 0

I (3025) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (3665) wifi: state: init -> auth (b0)
I (3675) wifi: state: auth -> assoc (0)
I (3675) wifi: state: assoc -> run (10)
I (3685) wifi: connected with ESP-WiFi, channel 1
D (3685) event: SYSTEM_EVENT_STA_CONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, channel:1, authmode:3
I (3695) ESP_BOARD_TESTING: ********* event_handler :: default called :: esp_get_free_heap_size :: 177696 ***********
D (7255) event: SYSTEM_EVENT_STA_GOTIP, ip:192.168.61.151, mask:255.255.255.0, gw:192.168.61.1
I (7255) event: ip: 192.168.61.151, mask: 255.255.255.0, gw: 192.168.61.1
I (7255) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_GOT_IP event called ***********
I (13675) wifi: pm start, type:0

ESP STA Mode Logs of Not Working Board
=============================

I (2360) ESP_BOARD_TESTING: ********* initialise_wifi_in_sta_mode started ***********
tcpip_task_hdlxxx : 3ffc851c, prio:18,stack:2048
D (2380) nvs: nvs_open misc 1
D (2380) nvs: nvs_get_str_or_blob log
I (2380) wifi: frc2_timer_task_hdl:3ffc9f5c, prio:22, stack:2048
D (2390) nvs: nvs_open nvs.net80211 1
D (2390) nvs: nvs_get opmode 1
D (2400) nvs: nvs_get country 1
D (2400) nvs: nvs_get_str_or_blob sta.ssid
D (2400) nvs: nvs_get_str_or_blob sta.mac
D (2410) nvs: nvs_get sta.authmode 1
D (2410) nvs: nvs_get_str_or_blob sta.pswd
D (2420) nvs: nvs_get_str_or_blob sta.pmk
D (2420) nvs: nvs_get sta.chan 1
D (2420) nvs: nvs_get auto.conn 1
D (2430) nvs: nvs_get bssid.set 1
D (2430) nvs: nvs_get_str_or_blob sta.bssid
D (2430) nvs: nvs_get sta.phym 1
D (2440) nvs: nvs_get sta.phybw 1
D (2440) nvs: nvs_get_str_or_blob sta.apsw
D (2450) nvs: nvs_get_str_or_blob sta.apinfo
D (2450) nvs: nvs_get_str_or_blob ap.ssid
D (2450) nvs: nvs_get_str_or_blob ap.mac
D (2460) nvs: nvs_get_str_or_blob ap.passwd
D (2460) nvs: nvs_get_str_or_blob ap.pmk
D (2470) nvs: nvs_get ap.chan 1
D (2470) nvs: nvs_get ap.authmode 1
D (2470) nvs: nvs_get ap.hidden 1
D (2480) nvs: nvs_get ap.max.conn 1
D (2480) nvs: nvs_get bcn.interval 2
D (2480) nvs: nvs_get ap.phym 1
D (2490) nvs: nvs_get ap.phybw 1
D (2490) nvs: nvs_get ap.sndchan 1
D (2490) nvs: nvs_set_blob sta.mac 6
D (2500) nvs: nvs_set_blob ap.mac 6
I (2500) wifi: pp_task_hdl : 3ffcc7a8, prio:23, stack:8192
D (2510) nvs: nvs_set opmode 1 1
1) read ssid :::::::: ESP-WiFi
2)read pwd :::::::::: ESPWiFiIn
D (2520) nvs: nvs_set_blob sta.ssid 36
D (2520) nvs: nvs_set_blob sta.pswd 65
D (2520) nvs: nvs_set bssid.set 1 0
I (2530) ESP_BOARD_TESTING: Setting STATION WiFi configuration SSID ESP-WiFi...
I (2530) ESP_BOARD_TESTING: Setting STATION WiFi configuration password ESPWiFiIn...
I (2540) wifi: mode : sta (24:0a:c4:04:df:5c)
D (2550) event: SYSTEM_EVENT_STA_START
I (2550) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_START event called ***********
I (2560) ESP_BOARD_TESTING: JN516X_RESET_GPIO_26 on system startup :: 0

I (2570) ESP_BOARD_TESTING: TLINK_RESET_GPIO_27 on system startup :: 0

I (2680) wifi: n:1 0, o:6 0, ap:255 255, sta:1 0, prof:6
I (3330) wifi: state: init -> auth (b0)
I (4330) wifi: state: auth -> init (2)
D (4330) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (4330) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (4460) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (4460) wifi: state: init -> auth (b0)
I (5460) wifi: state: auth -> init (2)
D (5460) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (5460) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (5590) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (5590) wifi: state: init -> auth (b0)
I (6590) wifi: state: auth -> init (2)
D (6590) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (6590) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (6720) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (6720) wifi: state: init -> auth (b0)
I (7720) wifi: state: auth -> init (2)
D (7730) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (7730) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (7860) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (7860) wifi: state: init -> auth (b0)
I (8860) wifi: state: auth -> init (2)
D (8860) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (8860) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (8990) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (8990) wifi: state: init -> auth (b0)
I (9990) wifi: state: auth -> init (2)
D (9990) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (9990) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (10120) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (10120) wifi: state: init -> auth (b0)
I (11120) wifi: state: auth -> init (2)
D (11120) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (11130) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (11250) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (11260) wifi: state: init -> auth (b0)
I (12260) wifi: state: auth -> init (2)
D (12260) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (12260) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (12390) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (12390) wifi: state: init -> auth (b0)
I (13390) wifi: state: auth -> init (2)
D (13390) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (13390) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (13520) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (13520) wifi: state: init -> auth (b0)
I (14520) wifi: state: auth -> init (2)
D (14520) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (14520) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (14650) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (14650) wifi: state: init -> auth (b0)
I (15650) wifi: state: auth -> init (2)
D (15650) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (15660) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (15790) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (15790) wifi: state: init -> auth (b0)
I (16790) wifi: state: auth -> init (2)
D (16790) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (16790) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (16920) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (16920) wifi: state: init -> auth (b0)
I (17920) wifi: state: auth -> init (2)
D (17920) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (17920) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (18050) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (18050) wifi: state: init -> auth (b0)
I (19050) wifi: state: auth -> init (2)
D (19050) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
I (19060) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (19180) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (19190) wifi: state: init -> auth (b0)
I (20190) wifi: state: auth -> init (2)
D (20190) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:ESP-WiFi, ssid_len:8, bssid:ec:bd:1d:c3:90:b0, reason:2
I (20190) ESP_BOARD_TESTING: ********* SYSTEM_EVENT_STA_DISCONNECTED event called ***********
I (20320) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:6
I (20320) wifi: state: init -> auth (b0)
Also, I have checked list of requested devices into Router with the help of our admin and found that there is no any single entry into requested devices list for not working board into router with which i have tried to connect my board.

Let me know if anyone has any idea or clue for it.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 121 guests