-->
Page 1 of 1

WiFiScan Example Programs Crashes

PostPosted: Fri Nov 13, 2015 1:48 pm
by craiglindley
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?

Re: WiFiScan Example Programs Crashes

PostPosted: Sun Nov 15, 2015 12:46 pm
by craiglindley
After trying various ESP8266 devices in the board list and then going back to the NodeMCU 1.0, the problem seems to have gone away. I have no idea why.

Re: WiFiScan Example Programs Crashes

PostPosted: Sun Nov 15, 2015 6:17 pm
by RogerClark
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