• @Coder2012,

    dug up my Espruino-Wifi... 2v01... a while updated it to 2v19 and and checked ESP8266 firmware:

    var t = `
    Ai-Thinker Technology Co.,Ltd.
    
    ready
    AT+GMR
    
    AT version:0.40.0.0(Aug  8 2015 14:45:58)
    SDK version:1.3.0
    Ai-Thinker Technology Co.,Ltd.
    Build:1.3.0.2 Sep 11 2015 11:48:04
    OK
    `;
    

    Using just the Wifi connection part from your code w/ time added in loggin :

    // EspruinoWifiCheck.js
    // 2024-01-08_ao
    // after update to 2v19 from 2v00, w/ ESP8266 v4.0
    const WIFI_NAME = "<REDACTED>";
    const WIFI_OPTIONS = { password : "<REDACTED>" };
    const wifi = require("Wifi");
    
    const t = (n) => { var t = getTime(); t=""+t;
      return t.substr(t.indexOf(".")-(n||2)); };
    var wc = "wifi connect";
    const connect = () => {
      console.log(t(),wc+"ing...");
      wifi.connect(WIFI_NAME, WIFI_OPTIONS, (err) => {
        if (err) {
          console.log(t(),wc+" error", err);
          return;
        }
        console.log(t(),wc+"ed");
        wc = "wifi re-connect";
      });
    };
    
    const onInit = () => {
      wifi.on('disconnected', connect);
      connect();
    };
    
    setTimeout(onInit,999);
    

    And to my dismay, I get nothing different than:

    >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v19 (c) 2021 G.Williams
    >
    83.02755451202 wifi connecting...
    93.05551528930 wifi connect error No 'ready' after AT+RST
    > 
    

    You obvious dug further... My Wifi had still this Retro Horse Derby Game Board with Neopixels showing Reaction Game Status code on it, which was not (yet) using Wifi (the intent was to store game results via Wifi in some (google) doc / db in the cloud), but I know Wifi at worked before (obviously like your's too...).

    I'll restore older Espruino version and try again...

About

Avatar for allObjects @allObjects started