Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By craiglindley
#33880 Hello,

I've been playing around with the WiFiScan example program using both the stable and the staging releases of the code. I'm using a brand new NodeMcu Amica from electrodragon. In my house there is only a single WiFi network.

The code compiles and runs but it only loops about 5 times before crashing. Here is a typical run:

l 0
chksum 0x42
csum 0x42
scan done
1 networks found
1: CraigNet (-53)*

scan start
scan done
1 networks found
1: CraigNet (-58)*

scan start
scan done
1 networks found
1: CraigNet (-57)*

scan start
scan done
1 networks found
1: CraigNet (-56)*

scan start
scan done
1 networks found
1: CraigNet (-56)*

scan start

ets Jan 8 2013,rst cause:4, boot mode:(1,0)

wdt reset

It obviously crashing in the WiFi.scanNetworks() function call.

Anyone else seen this? Anyone have a solution?
User avatar
By RogerClark
#34124 I'm getting the same thing.

I don't know if this is occurring because I'm already connected to a network.

I'm using the latest version of the repo as I need SPIFFS, so this could partially be the issue as well.

Edit

I found the problem

Nothing to do with scanning. It was just that the compiler is not checking the return types and I had not returned the expected data type in one of the return; statements