• Are you 100% sure that your connection details (see your 1st code share in your first post) are correct? I understand that what you posted here is mocked up, but check in your actual code.

    I would suggest to try this code (a bit simpler than yours):

    var wifi = require("Wifi");
    wifi.connect("ssid", {password:"password"}, function(){ console.log("connected"); });
    

    Then wait for "connected" message.

    Also, make sure you do a wifi.save() to make sure that wifi settings are saved for after a power cycle.

About