WiFi can't connect on 2017.6 basic core (works on Fire)



  • Very minimal sketch:

    void setup() {
      M5.begin(true,true,true,true);
      M5.Power.begin();
      WiFi.begin(ssid, password);
      M5.Lcd.println("TODO");
      delay(500);
    }
    
    void loop() {
      M5.update();
      delay(1000);
    }
    

    Doesn't work on my old Core:

    18:35:52.956 -> rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
    18:35:52.956 -> configsip: 0, SPIWP:0xee
    18:35:52.956 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    18:35:52.956 -> mode:DIO, clock div:1
    18:35:52.956 -> load:0x3fff0018,len:4
    18:35:52.956 -> load:0x3fff001c,len:1216
    18:35:52.956 -> ho 0 tail 12 room 4
    18:35:52.956 -> load:0x40078000,len:10944
    18:35:52.956 -> load:0x40080400,len:6388
    18:35:52.956 -> entry 0x400806b4
    18:35:53.287 -> M5Stack initializing...OK
    18:35:53.751 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 0 - WIFI_READY
    18:35:53.751 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 2 - STA_START
    18:35:57.790 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:35:57.790 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:01.862 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:01.862 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:05.901 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:05.901 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:09.941 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:09.941 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:14.014 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:14.014 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:18.053 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:18.053 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    18:36:22.091 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
    18:36:22.091 -> [W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 2 - AUTH_EXPIRE
    

    It works on Fire:

    18:40:11.811 -> rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
    18:40:11.811 -> configsip: 0, SPIWP:0xee
    18:40:11.811 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    18:40:11.811 -> mode:DIO, clock div:1
    18:40:11.811 -> load:0x3fff0018,len:4
    18:40:11.811 -> load:0x3fff001c,len:1216
    18:40:11.811 -> ho 0 tail 12 room 4
    18:40:11.811 -> load:0x40078000,len:10944
    18:40:11.811 -> load:0x40080400,len:6388
    18:40:11.811 -> entry 0x400806b4
    18:40:12.142 -> M5Stack initializing...[W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.241 -> [W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.341 -> [W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.473 -> [E][sd_diskio.cpp:194] sdCommand(): Card Failed! cmd: 0x00
    18:40:12.473 -> [W][sd_diskio.cpp:505] ff_sd_initialize(): GO_IDLE_STATE failed
    18:40:12.473 -> [E][sd_diskio.cpp:775] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
    18:40:12.473 -> [W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.539 -> [W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.638 -> [W][sd_diskio.cpp:169] sdCommand(): no token received
    18:40:12.738 -> [E][sd_diskio.cpp:194] sdCommand(): Card Failed! cmd: 0x00
    18:40:13.069 -> OK
    18:40:13.201 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 0 - WIFI_READY
    18:40:13.201 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 2 - STA_START
    18:40:15.353 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 4 - STA_CONNECTED
    18:40:15.386 -> [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
    18:40:15.386 -> [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 192.168.1.161, MASK: 255.255.255.0, GW: 192.168.1.254
    

    Any clue?


  • Global Moderator

    Hello,
    Could you please include the imports at the beginning of the code? did you import the proper library?
    it seems that it says the SDCard failed, could you run the factory test image on your old core to see if you get any issues?