espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.65k stars 7.41k forks source link

esp_wifi_stop 802 wifi is not init #536

Closed adellari closed 7 years ago

adellari commented 7 years ago

Hello, thank you for your work on the esp32 and arduino. I am having a problem withe esp as when I try to view the monitor output from the hello_world example included and mentioned in the esp idf setup, I get these errors:

`E (11820) wifi: esp_wifi_stop 802 wifi is not init ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0010,len:4 load:0x3fff0014,len:5300 load:0x40078000,len:0 load:0x40078000,len:12652 entry 0x40078f44 I (45) boot: ESP-IDF v3.0-dev-168-gd515eeac-dirty 2nd stage bootloader I (45) boot: compile time 11:05:36 I (49) boot: Enabling RNG early entropy source... I (65) boot: SPI Speed : 80MHz I (78) boot: SPI Mode : DIO I (90) boot: SPI Flash Size : 4MB I (103) boot: Partition Table: I (114) boot: ## Label Usage Type ST Offset Length I (137) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (160) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (183) boot: 2 factory factory app 00 00 00010000 00100000 I (207) boot: End of partition table I (220) boot: Disabling RNG early entropy source... I (237) boot: Loading app partition at offset 00010000 I (255) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x07c98 ( 31896) map I (311) esp_image: segment 1: paddr=0x00017cc0 vaddr=0x3ffb0000 size=0x02dbc ( 11708) load I (324) esp_image: segment 2: paddr=0x0001aa84 vaddr=0x40080000 size=0x00400 ( 1024) load I (338) esp_image: segment 3: paddr=0x0001ae8c vaddr=0x40080400 size=0x05184 ( 20868) load I (387) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x26190 (156048) map I (530) esp_image: segment 5: paddr=0x000461b0 vaddr=0x40085584 size=0x0d528 ( 54568) load I (590) esp_image: segment 6: paddr=0x000536e0 vaddr=0x400c0000 size=0x00000 ( 0) load I (624) cpu_start: Pro cpu up. I (625) cpu_start: Starting app cpu, entry point is 0x40080dec I (626) cpu_start: App cpu up. I (634) heap_init: Initializing. RAM available for dynamic allocation: I (655) heap_init: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM I (674) heap_init: At 3FFB66E0 len 00029920 (166 KiB): DRAM I (693) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (712) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (732) heap_init: At 40092AAC len 0000D554 (53 KiB): IRAM I (751) cpu_start: Pro cpu start user code I (807) cpu_start: Starting scheduler on PRO CPU. I (810) cpu_start: Starting scheduler on APP CPU. Hello world! This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash `

The program compiles and flashes as it's supposed to, but in the Arduino and esp-idf serial monitor, this is the error that I receive. I have looked for anyone with a similar issue to no avail. I tried make erase_flash in esp-idf, but it did not fix the issue. Any help would be appreciated. Thank you.

adellari commented 7 years ago

So is that how the hello_world example is supposed to work? Should I be worried about the esp_wifi_stop? That response is such a relief.

copercini commented 7 years ago

Sorry, I deleted my previous answer unintentionally.

yeah, It's fine =)

About wifi: esp_wifi_stop 802 wifi is not init is because the esp_restart(); function on the example triggers esp_wifi_stop(); but you aren't used wifi, so it can't stop one thing that has not started... but don't worry about it

The another messages are just for debug

adellari commented 7 years ago

@copercini I resolved that issue with your help, thank you a lot. I am however having problems with any wifi sketches that I try to upload. They compile and upload successfully, but they do not work. As soon as I reboot the esp (into run sketch mode), the tx and rx lines stay but there is no serial output. IF the sketch states to create a network, none is created. Do you possibly know what the issue may be?

adellari commented 7 years ago

@copercini I tried this but I get the same result, the flash erase works, I open the serial monitor and it states there is a flash error (I think this is expected since there is no program to boot from after the flash_erase). I upload a WiFi sketch and get the same result (tx and rx busy but nothing in the serial monitor).

adellari commented 7 years ago

I loaded the power_save and wpa2_enterprise examples and now I am getting this error along with some logs

W (1137) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration

Brownout detector was triggered

The esp then goes through a reset loop. Maybe this can help to narrow down the issue.

copercini commented 7 years ago

Brownout detector was triggered

How are you powering your ESP32?

adellari commented 7 years ago

I am powering it via the ftdi mmodule which is connnected to my computer.

copercini commented 7 years ago

So probably it's giving less power than the module needs to work fine

adellari commented 7 years ago

Ok, I will power it from a Li-Po and 3.3v regulator and let you know how that goes.

adellari commented 7 years ago

The lipo battery in conjunction with the 3.3v regulator did not work, but for some reason a 18650 with a pot diff of 3.68v and no regulator worked. The esp32 seems to require an abnormally large amount of current when initializing rf, as my esp12 is fine with the lipo regulator setup. Anyway, thank you for your help on both of the issues I had :)