After flashing my ESP8266's, I do (ccharacters enclosed in <> are nonprinting chars - that's how hTerm represents them when you copy/paste):
var wifi = require("Wifi");<\r><\n>
wifi.connect("TwilightZone", {password: "ThePassword"}, function(err){if(err)console.log(err);else console.log("connected!");})<\r><\n>
Then once it prints connected, I do wifi.save() and power cycle the ESP8266 and see if it has an IP with wifi.getIP().
Under 1.94 this works on my WeMos D1 Mini.
Under 1.95 it does not.
When I give the command to connect, and it triggers the callback, instead of "connected", I get:
<\r><27>[Jconnected!<\r><\n>
(where <27> is ascii char code 27 aka 0x1B).
Note the extra CR, non-printing char, open bracket, and capitol J.
But it gets an IP and seems to work - until power cycle.
After powercycle, it does not come back, and I cannot connect to that network again (haven't tested other networks) until I reflash the ESP8266.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
After flashing my ESP8266's, I do (ccharacters enclosed in <> are nonprinting chars - that's how hTerm represents them when you copy/paste):
var wifi = require("Wifi");<\r><\n>
wifi.connect("TwilightZone", {password: "ThePassword"}, function(err){if(err)console.log(err);else console.log("connected!");})<\r><\n>
Then once it prints connected, I do wifi.save() and power cycle the ESP8266 and see if it has an IP with wifi.getIP().
Under 1.94 this works on my WeMos D1 Mini.
Under 1.95 it does not.
When I give the command to connect, and it triggers the callback, instead of "connected", I get:
<\r><27>[Jconnected!<\r><\n>
(where <27> is ascii char code 27 aka 0x1B).
Note the extra CR, non-printing char, open bracket, and capitol J.
But it gets an IP and seems to work - until power cycle.
After powercycle, it does not come back, and I cannot connect to that network again (haven't tested other networks) until I reflash the ESP8266.
Are other people seeing this behavior?