Most recent activity
-
Good afternoon, everyone!
I'm trying to use this Board:
https://aliexpress.ru/item/32813202006.html?spm=a2g0o.productlist.0.0.7b062fee3ouO7n&algo_pvid=2185e518-c4cf-4acb-8ec0-79f12d1a284e&algo_expid=2185e518-c4cf-4acb-8ec0-79f12d1a284e-24&btsid=0b8b035615861624296867196ebcdd&ws_ab_test=searchweb00,searchweb201602,searchweb201603_Problem connecting to wi fi
var wifi = require("Wifi"); function onInit() { wifi.stopAP(); wifi.connect("TEST1234", {password: "12345678"}, function(err) { console.log("connected? err=", err, "info=", wifi.getIP()); }); } ____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v04 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:1024/1024, manuf 0x20 chip 0x4016 > >save() =undefined Compacting Flash... Calculating Size... Writing.. CRunning onInit()... connected? err= no_ap_found info= { "ip": "0.0.0.0", "netmask": "0.0.0.0", "gw": "0.0.0.0", "mac": "a4:cf:12:bf:9a:d6" }
I tried all possible options. If you flash the Arduino IDE Board, everything connects without problems.
What might be the problem?Console:
---> "\u0010reset();\n\u0010setTime(1586161529.365);E.setTimeZone(3)\n\u0010\u001b[2dvar ESP8266 = require(\"ESP8266\"),\u001b\n wifi = require(\"Wifi\");\n\u0010\u001b[4dwifi.connect(\"INGRIFABSR\", {password: \"B73vFeX6se2\"}, function(err) {\u001b\n if(err)console.log(err);else console.log(\"connected!\");\u001b\n console.log(wifi.getIP().ip);\u001b\n });\n\n"
Splitting for reset(), delay 250Sent
SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"||","BLOCKLY_LANGUAGE":"ru","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var wifi = require(\"Wifi\");\n\nfunction onInit() {\n\n //wifi.stopAP();\n wifi.connect(\"INGRIFABSR\", {password: \"B73vFeX6se2\"}, function(err) {\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n });\n}\n/\nvar wifi = require(\"Wifi\");\nwifi.connect(\"my-ssid\", {password:\"my-pwd\"}, function(err){\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n});\nwifi.stopAP();\n/","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"KEYMAP":"sublime","MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"PRETOKENISE":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_FLOW_CONTROL":true,"SERIAL_IGNORE":"","SERIAL_TCPIP":"192.168.83.3","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":true,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"doorbell2","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"WEB_BLUETOOTH":true,"WEB_SERIAL":true}
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586162183.173);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[3dfunction onInit() {\u001b\n\u001b\n //wifi.stopAP();\u001b\n wifi.connect(\"INGRIFABSR\", {password: \"B73vFeX6se2\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
Sent
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586162258.021);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[3dfunction onInit() {\u001b\n\u001b\n //wifi.stopAP();\u001b\n wifi.connect(\"INGRIFABSR\", {password: \"B73vFeX6se2\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
Sent
Splitting for Ctrl-C, delay 250
ERROR: RECEIVE ERROR: {"connectionId":15,"error":"system_error"}
Disconnect callback...
WARNING: [notify_warn] Disconnected
Disconnected
WARNING: Unknown config type 'bool' for Config.SERIAL_FLOW_CONTROL
SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"||","BLOCKLY_LANGUAGE":"ru","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var wifi = require(\"Wifi\");\n\nfunction onInit() {\n\n //wifi.stopAP();\n wifi.connect(\"INGRIFABSR\", {password: \"B73vFeX6se2\"}, function(err) {\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n });\n}\n/\nvar wifi = require(\"Wifi\");\nwifi.connect(\"my-ssid\", {password:\"my-pwd\"}, function(err){\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n});\nwifi.stopAP();\n/","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"KEYMAP":"sublime","MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"PRETOKENISE":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_FLOW_CONTROL":true,"SERIAL_IGNORE":"","SERIAL_TCPIP":"192.168.99.135","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":true,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"doorbell2","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"WEB_BLUETOOTH":true,"WEB_SERIAL":true}
Config.SERIAL_TCPIP => 192.168.99.135
Connecting...
Set Slow Write = true
Failed to open socket 192.168.99.135:23
ERROR: Unable to open device (connectionInfo=undefined)
ERROR: [notify_error] Connection Failed.
Connection Failed.
Connecting...
Set Slow Write = true
[object Object]
Connected [object Object]
Received a prompt after sending newline... good!
Sending...
---> "\u0010print(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n"
Sent
Got "< << {\"VERSION\":\"2v04\",\"GIT_COMMIT\":\"3956264e\",\"BOARD\":\"ESP8266_4MB\",\"FLASH\":0,\"RAM\":81920,\"SERIAL\":\"a4cf12bf-9ad6\",\"CONSOLE\":\"Serial1\",\"MODULES\":\"Flash,Storage,heatshrink,net,dgram,http,NetworkJS,Wifi,ESP8266,TelnetServer,crypto,neopixel\",\"EXPTR\":1073643636} >> >\r\n>"
[notify_info] Found ESP8266_4MB, 2v04
Loading http://www.espruino.com/json/ESP8266_4MB.json
Board JSON loaded
Set Slow Write = true
FIRMWARE: Current 2v04, Available 2v04
Device found {"bitrate":115200,"bufferSize":4096,"connectionId":16,"ctsFlowControl":false,"dataBits":"eight","name":"","parityBit":"no","paused":true,"persistent":false,"receiveTimeout":0,"sendTimeout":0,"stopBits":"one"}
[success] Connected to \.\COM26
Connected to \.\COM26
SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"||","BLOCKLY_LANGUAGE":"ru","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var wifi = require(\"Wifi\");\nfunction onInit() {\n wifi.stopAP();\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n });\n}\n/\nvar wifi = require(\"Wifi\");\nwifi.connect(\"my-ssid\", {password:\"my-pwd\"}, function(err){\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n});\nwifi.stopAP();\n/","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"KEYMAP":"sublime","MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"PRETOKENISE":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_FLOW_CONTROL":true,"SERIAL_IGNORE":"","SERIAL_TCPIP":"192.168.99.135","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":true,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"doorbell2","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"WEB_BLUETOOTH":true,"WEB_SERIAL":true}
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586163600.237);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[2dfunction onInit() {\u001b\n wifi.stopAP();\u001b\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
Sent
ERROR: RECEIVE ERROR: {"connectionId":16,"error":"system_error"}
Disconnect callback...
WARNING: [notify_warn] Disconnected
Disconnected
Connecting...
Set Slow Write = true
[object Object]
Connected [object Object]
Received a prompt after sending newline... good!
Sending...
---> "\u0010print(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n"
Sent
Got "< << {\"VERSION\":\"2v04\",\"GIT_COMMIT\":\"3956264e\",\"BOARD\":\"ESP8266_4MB\",\"FLASH\":0,\"RAM\":81920,\"SERIAL\":\"a4cf12bf-9ad6\",\"CONSOLE\":\"Serial1\",\"MODULES\":\"Flash,Storage,heatshrink,net,dgram,http,NetworkJS,Wifi,ESP8266,TelnetServer,crypto,neopixel\",\"EXPTR\":1073643636} >> >\r\n>"
[notify_info] Found ESP8266_4MB, 2v04
Loading http://www.espruino.com/json/ESP8266_4MB.json
Board JSON loaded
Set Slow Write = true
FIRMWARE: Current 2v04, Available 2v04
Device found {"bitrate":115200,"bufferSize":4096,"connectionId":17,"ctsFlowControl":false,"dataBits":"eight","name":"","parityBit":"no","paused":true,"persistent":false,"receiveTimeout":0,"sendTimeout":0,"stopBits":"one"}
[success] Connected to \.\COM26
Connected to \.\COM26
SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"||","BLOCKLY_LANGUAGE":"ru","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var wifi = require(\"Wifi\");\nfunction onInit() {\n wifi.stopAP();\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\n });\n}","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"KEYMAP":"sublime","MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"PRETOKENISE":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_FLOW_CONTROL":true,"SERIAL_IGNORE":"","SERIAL_TCPIP":"192.168.99.135","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":true,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"doorbell2","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"WEB_BLUETOOTH":true,"WEB_SERIAL":true}
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586163833.621);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[2dfunction onInit() {\u001b\n wifi.stopAP();\u001b\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
Sent
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586163857.128);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[2dfunction onInit() {\u001b\n wifi.stopAP();\u001b\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
Sent
Minifying
Minification complete
Found a prompt... great!
Sending...
---> "\u0010reset();\n\u0010setTime(1586163984.307);E.setTimeZone(3)\n\u0010\u001b[1dvar wifi = require(\"Wifi\");\n\u0010\u001b[2dfunction onInit() {\u001b\n wifi.stopAP();\u001b\n wifi.connect(\"TEST1234\", {password: \"12345678\"}, function(err) {\u001b\n console.log(\"connected? err=\", err, \"info=\", wifi.getIP());\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
SentThere is also a mistake like this:
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v04 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:1024/1024, manuf 0x68 chip 0x4016 > >save() =undefined Compacting Flash... Calculating Size... Writing.. CRunning onInit()... connected? err= auth_expire info= { "ip": "0.0.0.0", "netmask": "0.0.0.0", "gw": "0.0.0.0", "mac": "bc:dd:c2:30:22:2a" }
-
var i2c = new I2C(); i2c.setup({ scl : D5, sda: D4 }); var b = new ArrayBuffer(4); var v = new DataView(b); setInterval( function() { var d = i2c.readFrom(0x40, 4); print(d); v.setUint8(1,d[0]); v.setUint8(0,d[1]); v.setUint8(3,d[2]); v.setUint8(2,d[3]); var temp =(v.getUint16(1)/65536)*165-40; var hum =(v.getUint16(3)/65536)*100; print(temp); print(hum); setTimeout(function(){ i2c.writeTo(0x40, 0); },500); }, 1000 );
-
Nothing in return.
var i2c = new I2C(); i2c.setup({ scl : D5, sda: D4 }); var gas = require("CCS811").connectI2C(i2c); setInterval(function() { gas.get(print); //print(gas.get); //gas.on('data', print); }, 3000); var wifi = require("Wifi"); function onInit() { wifi.stopAP(); wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) { if(err)console.log(err);else { print(wifi.getIP().ip);//33 } }); }
Thanks for the answer. I want to add that on other models of esp8266 everything works perfectly. It is not clear why wifi does not work on this Board.