Wifi.begin crashes device

icyhate
Posts: 4
Joined: Fri Dec 22, 2017 8:04 pm

Wifi.begin crashes device

Postby icyhate » Sat Dec 23, 2017 12:35 am

Hello, I am relatively new to the esp32's development but I'm having trouble just getting started, it seems my module does not like it when I try to initialize the onboard wifi. it crashes and fails to give me any diagnostic data what so ever here is what I get from the monitor when using the IDF template application and several others.

Code: Select all

--- idf_monitor on COM4 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4524
load:0x40078000,len:0
load:0x40078000,len:12988
entry 0x40078d14
I (125) cpu_start: Pro cpu up.
I (125) cpu_start: Single core mode
I (125) heap_init: Initializing. RAM available for dynamic allocation:
I (129) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (135) heap_init: At 3FFB8130 len 00027ED0 (159 KiB): DRAM
I (141) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (147) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (154) heap_init: At 4008F808 len 000107F8 (65 KiB): IRAM
I (160) cpu_start: Pro cpu start user code
I (28) cpu_start: Starting scheduler on PRO CPU.
I (40) wifi: wifi firmware version: f204566
I (41) wifi: config NVS flash: enabled
I (41) wifi: config nano formating: disabled
I (42) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (52) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (66) wifi: Init dynamic tx buffer num: 32
I (66) wifi: Init data frame dynamic rx buffer num: 32
I (70) wifi: Init management frame dynamic rx buffer num: 32
I (76) wifi: wifi driver task: 3ffbe7a0, prio:23, stack:4096
I (81) wifi: Init static rx buffer num: 10
I (85) wifi: Init dynamic rx buffer num: 32
I (89) wifi: wifi power manager task: 0x3ffc33f0 prio: 21 stack: 2560
W (95) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
Exception in thread Thread-2:
Traceback (most recent call last):
  File "D:/Projects/esp/msys32/mingw32/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
  File "D:/Projects/esp/msys32/mingw32/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
File "D:/Projects/esp/msys32/home/aidan/esp/esp-idf/tools/idf_monitor.py",     line 120, in _run_outer
    self.run()
  File "D:/Projects/esp/msys32/home/aidan/esp/esp-idf/tools/idf_monitor.py", line 200, in run
    data = self.serial.read(self.serial.in_waiting or 1)
File "D:/Projects/esp/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 257, in in_waiting
raise SerialException("ClearCommError failed ({!r})".format(ctypes.WinError()))
SerialException: ClearCommError failed (WindowsError(5, 'Access is denied.'))
py init always fails to calibrate it seems so I thought maybe that was a problem so I turned it off in make menuconfig but that didn't help

I also enabled gdb but that says the following

Code: Select all

Reading symbols from ./build/app-template.elf...done.
Remote debugging using COM4
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "supported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Bogus trace status reply from target: timeout
(gdb) bt
No stack.
(gdb)
I powered it up with a lithium-ion battery and it connected but then the battery died and i haven't had the same luck with that battery since, i don't understand how that could make any sense? i have the adafruit esp32 development module and I'm starting to believe mine may just be defective so i went ahead and bought another.

ESP_Sprite
Posts: 9723
Joined: Thu Nov 26, 2015 4:08 am

Re: Wifi.begin crashes device

Postby ESP_Sprite » Sat Dec 23, 2017 5:21 am

The 'crash' you're seeing actually is the USB-to-serial chip conking out... to me, this sounds like a power issue. Is there any chance you could remove any (unpowered) hubs from your setup and use a more solid USB cable to connect to the board? Alternatively, try to power the board from some other power source, like you did earlier on with the LiIon battery.

icyhate
Posts: 4
Joined: Fri Dec 22, 2017 8:04 pm

Re: Wifi.begin crashes device

Postby icyhate » Mon Dec 25, 2017 10:31 am

you were RIGHT! i got it up and running after removing some usb devices

Who is online

Users browsing this forum: ajay.rathor, Baidu [Spider], Bing [Bot] and 85 guests