• Yes it seems ESP32 wifi station connect eats up all heap memory!

    This is what happened after a reset(true)

    >wifi=require("Wifi")
    =function () { [native code] }
    >wifi.startAP("test",{authMode:'open'});
    =undefined
    >wifi.connect("xxxx",{password:"xxxxxxxx"},(err)=>{if (err){print(err);return;}print("connected");});
    ERROR: Wifi: event_handler STA_START: esp_wifi_connect: 12298(SSID is invalid)
    =undefined
    >E (27318) event: post event to user fail!
    ESP32.getState()
    ={ 
      sdkVersion: "v3.1.3-dirty", 
      freeHeap: 33856, BLE: false, Wifi: true, minHeap: 21880 }
    WARNING: Wifi:startMDNS - espressif
    connected
    >ESP32.getState()
    ={ 
      sdkVersion: "v3.1.3-dirty", 
      freeHeap: 3112, BLE: false, Wifi: true, minHeap: 3044 }
    >
    
    

    You can see that the freeHeap dropped dramatically after connecting to the local network!

About

Avatar for Unreality @Unreality started