Esp32-arduino-wifiscan example fails

I’m trying out the ESP32 wifi example after successfully running the blink example but it is failing executing on the ESP32S. The code builds and uploads fine to an ESP32S dev board, but when the board is reset to start the program I get this apparently from the WiFi.mode command:

ets Jun 8 2016 00:22:57

ets Jun 8 2016 00:22:57

configsip: 0, SPIWP:0x00
mode:DIO, clock div:1

entry 0x40080034
E (1269) wifi: wifi_init 1143 ret=4363
/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/./queue.c:721 (xQueueGenericSend)- assert failed!
abort() was called at PC 0x4008343f
Guru Meditation Error: Core 1 panic’ed (abort)

Backtrace: 0x40008155:0x3ffceec0 0x40007d16:0x3ffceee0 0x400970f4:0x3ffcef20 0x400e0c70:0x3ffcef70 0x400da75b:0x3ffcef90 0x400f25c2:0x3ffcefc0 0
x400f25fa:0x3ffceff0 0x400d0c9e:0x3ffcf010 0x400f2836:0x3ffcf030

CPU halted.

anyone else run into this?

Hi @softsymth!
Just tried wifiscan example with esp32dev board and everything works as expected.
What board do you use in platformio.ini?

Thanks for responding Valeros. I’ve configured the platformio.ini for the esp32dev board and arduino framework. This is the platformio.ini contents:
platform = espressif32
board = esp32dev
framework = arduino

it’s the only board defined.

I should note as well that I’m using the ESP32S board from Seeed and an external FTDI USB to serial bridge to complete my ‘dev’ board. The module came preinstalled with the demo firmware that enables a WiFi server which worked and I was able to connect to the esp32 access point as well as access the embedded server. Perhaps there is some external circuitry on the ‘real’ dev board that I need? I wasn’t thinking so, but perhaps I’ll look at the schematic of the real dev board if I can find it.

Would be great if you could try to program your board using Arduino IDE just to find out if the problem is with hardware or PlatformIO generates broken firmware. Thanks!

I will try setting up the Arduino IDE and seeing if that works… I also have several of these modules… I’ll assemble another one and test that as well…

I have downloaded the latest ARduino IDE 1.8.2 and installed the github ESP32-Arduino files … I tried the WiFiscan example and it fails in the same way as it does in PlatformIO… code uploads fine via the Arduino IDE but when executed this happens:
configsip: 0, SPIWP:0x00
mode:DIO, clock div:1
entry 0x40080034
Guru Meditation Error of type IllegalInstruction occurred on core 1. Exception was unhandled.
Register dump:
PC : 0x400e129e PS : 0x00060b30 A0 : 0x800dfb20 A1 : 0x3ffcd3e0
A2 : 0x3ffc2ca4 A3 : 0x3ffcd430 A4 : 0x00000064 A5 : 0x0000002e
A6 : 0x3ffc13a8 A7 : 0x00060b20 A8 : 0x800e129b A9 : 0x3ffcd3a0
A10 : 0x00000000 A11 : 0x3ffcd430 A12 : 0x3ffccbf0 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00060b23 SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

Backtrace: 0x400e129e:0x3ffcd3e0 0x400dfb20:0x3ffcd410 0x400da573:0x3ffcd430

CPU halted.

I also tried another ESP32S module which has the same results.

I also tried the blink example for IO13 and that works fine.

I then tried other WiFi examples under ESP32 and they all fail the same way.

Ran across another thread that suggested erasing the device flash using the esptool… I tried that but still have the same results…

I have resolved the issue! Turns out this module is hyper sensitive to the power supply, especially when using the high current peripherals like WiFi or Bluetooth. My benchtop supply was set for 3.2V and giving the previous resulting errors when trying to use WiFi… once I set the output to above 3.3V (I’m using 3.5V) the module is successfully intializing the WiFi module and running the WiFiscan example with no issues.