- /*
- * This sketch demonstrates how to scan WiFi networks.
- * The API is almost the same as with the WiFi Shield library,
- * the most obvious difference being the different file you need to include:
- */
- #include "WiFi.h"
- void setup()
- {
- Serial.begin(115200);
- // Set WiFi to station mode and disconnect from an AP if it was previously connected
- WiFi.mode(WIFI_STA);
- WiFi.disconnect();
- delay(100);
- Serial.println("Setup done");
- }
- void loop()
- {
- Serial.println("scan start");
- // WiFi.scanNetworks will return the number of networks found
- int n = WiFi.scanNetworks();
- Serial.println("scan done");
- if (n == 0) {
- Serial.println("no networks found");
- } else {
- Serial.print(n);
- Serial.println(" networks found");
- for (int i = 0; i < n; ++i) {
- // Print SSID and RSSI for each network found
- Serial.print(i + 1);
- Serial.print(": ");
- Serial.print(WiFi.SSID(i));
- Serial.print(" (");
- Serial.print(WiFi.RSSI(i));
- Serial.print(")");
- Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?" ":"*");
- delay(10);
- }
- }
- Serial.println("");
- // Wait a bit before scanning again
- delay(5000);
- }
Rebooting...
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:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400dc99c: 42424923 49426e4b e04a4252
Core 0 register dump:
PC : 0x400dc9a1 PS : 0x00060c30 A0 : 0x800daf77 A1 : 0x3ffb5490
A2 : 0x3ffc516c A3 : 0x400dba38 A4 : 0x00000003 A5 : 0x00000007
A6 : 0x0000000b A7 : 0x00000003 A8 : 0x800dc989 A9 : 0x3ffb5450
A10 : 0x40003f98 A11 : 0x400041fc A12 : 0x3ffc51b4 A13 : 0x00000007
A14 : 0x3ffae0c0 A15 : 0x00000008 SAR : 0x0000001c EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400838e0 LEND : 0x400838f5 LCOUNT : 0x00000000
Backtrace: 0x400dc9a1:0x3ffb5490 0x400daf74:0x3ffb54c0 0x400db388:0x3ffb54e0 0x400d517f:0x3ffb55a0 0x400d53fe:0x3ffb55d0 0x400ec330:0x3ffb5600 0x400ec420:0x3ffb5630 0x400ec72a:0x3ffb5660 0x400e8b02:0x3ffb5690 0x4008f583:0x3ffb56b0 0x40088b7d:0x3ffb56f0