Cannot initialize WiFi

threatcon
Posts: 2
Joined: Sun Oct 28, 2018 10:27 am

Cannot initialize WiFi

Postby threatcon » Sun Oct 28, 2018 3:29 pm

Hello,

I am doing a simple sketch to intialize WiFi using the esp_wifi.h. I'm wondering if someone can tell me what I am doing wrong?
This..

Code: Select all

#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
#include "esp_wifi_types.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include <stdio.h>
#include <string>
#include <cstddef>
#include <Wire.h>
#include <M5Stack.h>    




/* ===== main program ===== */
void setup() {

  // Serial
  Serial.begin(115200);
  delay(10);
  Serial.println("Begin...");
  delay(10);
  Serial.println("Starting M5");
  M5.begin();
  delay(10);
  Serial.println("Starting Wire");
  Wire.begin();
 

  // Settings
  delay(10);
  Serial.println("Initializing NVS");
  // System & WiFi
  nvs_flash_init();
  delay(10);
  Serial.println("Initializing TCP");
  tcpip_adapter_init();
  delay(10);
  Serial.println("Initializing WiFi");  
  wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
  esp_wifi_init(&cfg);
  esp_wifi_set_storage(WIFI_STORAGE_RAM);
  esp_wifi_set_mode(WIFI_MODE_NULL);
  esp_wifi_start();
  Serial.println("Done?");  
  

 

}

void loop() {
  M5.update();
}
Get's me this..
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (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:956
load:0x40078000,len:0
load:0x40078000,len:11904
entry 0x40078a3c
Begin...

Who is online

Users browsing this forum: No registered users and 69 guests