-
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 } }); }
-
-
Good day everyone! The problem with the sensor CCS811. Why is it not read CO2 readings and other data. What could be the matter?
var i2c = new I2C(); i2c.setup({ scl : D5, sda: D4 }); var gas = require("CCS811").connectI2C(i2c); // wait for the sensor to be ready setInterval(function() { print(gas.get); }, 3000);
that's all I see
function () {var e=0!=(this.r(a.STATUS,1)[0]&a.STATUS_DATA_READY),c=this.r(a.ALG_RESULT_DATA,4);return{eCO2:c[0]<<8|c[1],TVOC:c[2]<<8|c[3],"new":e}}
https://github.com/hzxi0/foto/blob/master/20190620_132418.jpg
-
-
-
-
-
-
var settings_pol = 20; var settings_kondey = 24; var last_temp = 0; var temp_pol = 0; var dalas = setInterval(function() { require("DS18B20").connect(new OneWire(D13)).getTemp(function (temp) { print("Temp is "+temp+"°C"); if(temp!==null){ if(temp<settings_pol)digitalWrite(D14, true); if(temp>settings_pol)digitalWrite(D14, false); temp_pol = temp; } else digitalWrite(D14, false); }); }, 10000); function start_sensor(){ var dht_senso = setInterval(function() { require("DHT22").connect(D12).read(function (a) { print("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString()); if(a.temp != -1){ if(a.temp>(settings_kondey+0.3))digitalWrite(D4, true); if(a.temp<settings_kondey)digitalWrite(D4, false); // if(a.temp!=last_temp){ setTimeout(function () { mqtt.publish("test", "{\"temp\":"+a.temp+",\"hum\":"+a.rh+",\"temp_pol\":"+temp_pol+",\"settings_kondey\":"+settings_kondey+",\"settings_pol\":"+settings_pol+"}");},1000); // last_temp = a.temp; // } }else digitalWrite(D4, false); }); }, 5000); } var server = "192.168.0.182"; // the ip of your MQTT broker var options = { // ALL OPTIONAL - the defaults are below client_id : "random", // the client ID sent to MQTT - it's a good idea to define your own static one based on `getSerial()` keep_alive: 60, // keep alive time in seconds port: 1883, // port number clean_session: true, //username: "home", // default is undefined //password: "789456", // default is undefined protocol_name: "MQTT", // or MQIsdp, etc.. protocol_level: 4, // protocol level }; var mqtt = require("MQTT").create(server, options /*optional*/); function reboot(){ print("reboot..."); ESP8266.reboot(); } var ESP8266 = require("ESP8266"), wifi = require("Wifi"); //var ssid = "Electrolux"; //var options = {password: "12345678"}; function onInit() { setTimeout(reboot,18000000); wifi.stopAP(); //wifi.startAP(ssid, options); //wifi.startAP("Electrolux"); // wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) { wifi.connect("LP82K1", {password: "excitedboat325"}, function(err) { if(err)console.log(err);else { console.log("wifi connected!");//116 print(wifi.getIP().ip); mqtt.on('connected', function() { mqtt.subscribe("settings"); print("mqtt connected!"); start_sensor(); }); mqtt.on('publish', function (pub) { console.log("topic: "+pub.topic); console.log("message: "+pub.message); var settings=[]; if(pub.topic==="settings")settings = JSON.parse(pub.message); settings_pol = settings.settings_pol; settings_kondey = settings.settings_kondey; }); mqtt.connect(); mqtt.on('disconnected', function() { console.log("MQTT disconnected... reconnecting."); setTimeout(function() { mqtt.connect(); }, 10000); }); } }); }
-
Initialising Status
Initialising App
Initialising File
Initialising Code
Initialising Serial- Initialising Serial Chrome Serial
- Initialising Serial Chrome Socket
- Initialising Serial Web Audio
- Initialising Serial Web Bluetooth
Initialising Terminal
Initialising CodeWriter
Initialising Modules
Initialising Env
Initialising Flasher
Initialising EditorBlockly
Initialising EditorJavaScript
Initialising Send
Initialising MenuPortSelector
Initialising MenuSettings
Initialising MenuFlasher
Initialising SettingsAbout
Initialising SettingsFlasher
Initialising BoardJSON
Initialising VersionChecker
Initialising Compiler
Initialising Assembler
Initialising GetGitHub
Initialising Unicode
Initialising Minify
Initialising SaveOnSend
Initialising SetTime
Initialising Tutorial
Initialising Webcam
Initialising FontSize
Initialising UiMode
Initialising URLHandler
Initialising CodeLink
Initialising Project
Initialising Testing
Initialising Notification_Sound
Initialising Tern
Initialising Debugger
Initialising Tour
Initialising SettingsProfile
Initialising HelpLinks
Initialising Offline
Initialising CoreModules
Loaded code from storage.
GET chrome.storage.local.OFFLINE_DATA = 0 bytes
No navigator.bluetooth - Web Bluetooth not enabled
>>> Connecting...
Set Slow Write = true
>>> 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\":\"2v01\",\"GIT_COMMIT\":\"748a4d3\",\"BOARD\":\"ESP8266_4MB\",\"FLASH\":0,\"RAM\":81920,\"SERIAL\":\"ecfabc01-c8d9\",\"CONSOLE\":\"Serial1\",\"MODULES\":\"Flash,Storage,heatshrink,net,dgram,http,NetworkJS,Wifi,ESP8266,TelnetServer,crypto,neopixel\",\"EXPTR\":1073643636} >> >\r\n>"
[notify_info] Found ESP8266_4MB, 2v01
Loading http://www.espruino.com/json/ESP8266_4MB.json
Board JSON loaded
Set Slow Write = true
FIRMWARE: Current 2v01, Available 2v02
Device found {"bitrate":115200,"bufferSize":4096,"connectionId":5,"ctsFlowControl":false,"dataBits":"eight","name":"","parityBit":"no","paused":true,"persistent":false,"receiveTimeout":0,"sendTimeout":0,"stopBits":"one"}
[success] Connected to \.\COM14
>>> Connected to \.\COM14
Failed to open socket 192.168.0.121:23
ERROR: Unable to open device (connectionInfo=undefined)
ERROR: [notify_error] Connection Failed.
>>> Connection Failed.
SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var ESP8266 = require(\"ESP8266\"),\n wifi = require(\"Wifi\");\n\nfunction onInit() {\n wifi.connect(\"LP82K1\", {password: \"excitedboat325\"}, function(err) {\n if(err)console.log(err);else {\n console.log(\"wifi connected!\");//116\n print(wifi.getIP().ip);\n\n }\n });\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,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":true,"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,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_IGNORE":"/dev/ttyS*|/dev/*.SOC|/dev/*.MALS","SERIAL_TCPIP":"192.168.0.121:23","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"WEB_BLUETOOTH":true}
>>> Minifying
>>> Minification complete
Found a prompt... great!
>>> Sending...
---> "\u0010reset();\n\u0010var ESP8266 = require(\"ESP8266\"),\u001b\n wifi = require(\"Wifi\");\n\u0010\u001b[4dfunction onInit() {\u001b\n wifi.connect(\"LP82K1\", {password: \"excitedboat325\"}, function(err) {\u001b\n if(err)console.log(err);else {\u001b\n console.log(\"wifi connected!\");//116\u001b\n print(wifi.getIP().ip);\u001b\n\u001b\n }\u001b\n });\u001b\n}\n\n"
Splitting for reset(), delay 250
>>> Sent
Disconnect callback...
WARNING: [notify_warn] Disconnected
>>> Disconnected
>>> Connecting...
Set Slow Write = true
Connected [object Object]
Got ""
No Prompt found, got undefined - issuing Ctrl-C to try and break out
Splitting for Ctrl-C, delay 250
Still no prompt - issuing another Ctrl-C
Splitting for Ctrl-C, delay 250
>>> Sending...
---
WARNING: No result found for "process.env" - just got ""
ERROR: [notify_error] Unable to retrieve board information. Connection Error?
Device found {"socketId":5}
[success] Connected to TCP/IP: 192.168.0.121:23 (No response from board)
>>> Connected to TCP/IP: 192.168.0.121:23 (No response from board)
- Initialising Serial Chrome Serial
-
-
-
-
-
-
Good day, everyone! I have a problem with module ILI9341. I'm plugging it in on esp12F. After loading and cleaning the screen appears, after which the esp is rebooted and so on. Please help if anyone knows what the problem is.
var ESP8266 = require("ESP8266"), wifi = require("Wifi"); function onInit() { wifi.stopAP(); wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) { // 192.168.99.61 if(err)console.log(err);else { print("connected! "+wifi.getIP().ip); var SPI1 = new SPI(); SPI1.setup({ sck:D14, miso:D12, mosi:D13 ,baud: 1000000}); var g = require("ILI9341").connect(SPI1, D5, D15, D4, function() { g.clear(); g.drawString("Hello",50,50); // g.setFontVector(20); // g.setColor(1,0.5,1); // g.drawString("Espruino",0,10); }); } }); } ____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v00 (c) 2018 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 0xef chip 0x4016 > >save() =undefined Compacting Flash... Calculating Size... Writing.. ComRunning onInit()... connected! 192.168.99.106 > ets Jan 8 2013,rst cause:2, boot mode:(3,5) load 0x40100000, len 2408, room 16 tail 8 chksum 0xe5 load 0x3ffe8000, len 776, room 0 tail 8 chksum 0x84 load 0x3ffe8310, len 632, room 0 tail 8 chksum 0xd8 csum 0xd8 2nd boot version : 1.6 SPI Speed : 40MHz SPI Mode : DIO SPI Flash Size & Map: 32Mbit(1024KB+1024KB) jump to run user1 @ 1000
-
I connect SIM800l in on Serial1. Connect for debugging via WIFI, everything works fine. As soon as disconnect the Web ide from the module, the module shuts down and restarts. After the reboot, the program comes to the moment of work with Serial1 and again leaves in reboot. This happens endlessly, while connecting web ide. What could be the problem?
After connecting you see this:
| |_ ___ ___ _ ||___ ___
| |_ -| . | _| | | | | . |
||| || |_|||_|_||_| http://espruino.com
1v93 Copyright 2016 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:512/512, manuf 0xe0 chip 0x4016=undefined
Erasing Flash..................
Writing...........
Compressed 25600 bytes to 8910
Checking...
Done!
Running onInit()...
connected!
192.168.99.66
point_rssi : -74 dbDisconnected
ConnectedSvoojoh!poJoju)///?Twppkpi"qpKpkv+000@Uxqqlqj#rqLqlw+,111AVyrrmrk$srMrmx,-222BWzssnsl%tsNsny-.333CX{ttotm&utOtoz./444DY|uupun'vuPup{/0555EZ}vvqvo(wvQvq|01666F[~wwrwp)xwRwr}12777GxxsxqyxSxs~23888H]!yytyr+zyTy34999I^"zzuzs,{zUzu!45:::J_#{{v{t-|{V{v"56;;;K
$||w|u.}|W|w#67<<<La%}}x}v/~}X}x$78===Mb&~~y~w~Y~y%89>>>Nx1z&9:???Od(!!{!y2"![!{':;@@@Pe)""|"z3#"\"|(;<AAAQf*##}#{4$#]#})<=BBBRg+$$~$|5%$^$~*=>CCCSh,%%}6&%_+>?DDDTi-&&!&~7'&
&!,?@EEEUj.''"8('a'"-@AFFFconsole.log("<","<<",JSON.stringify(process.env),">>",">")
Uncaught ReferenceError: "poJoju" is not defined
at line 1 col 9
Svoojoh!poJoju)///?Twppkpi"qpKpkv*+000@Uxqqlqj#rqLqlw+,111A...^
point_rssi : -57 db
AT+COPS?
my code:
var p1 = ""; var p2 = ""; var p3 = ""; var p4 = "";
var start;
var ow;
var i = 0;function reboot(){
print("reboot...");
ESP8266.reboot();
}var point_rssi = 0; var ip; var mac;
var ESP8266 = require("ESP8266"),
wifi = require("Wifi");
function onInit() {
wifi.stopAP();
wifi.connect("INGRIFAB", {password: "B73vFeX6se2"}, function(err) {if(err)console.log(err);else console.log("connected!"); console.log(wifi.getIP().ip); ip = wifi.getIP().ip;
wifi.getStatus(function(ap) {
if(ap.station === 'connected'){ setTimeout(wifi_scan,1000); setInterval(send_data, 3000); setInterval(reboot, 86400000); setInterval(reset_modem, 86400000); reset_modem(); Serial1.setup(115200); setTimeout(Start_modem,10000); } });
});
}Pin.prototype.startFlashing = function(period,stop) {
var delay_led; var on_led;
var pin = this;
if (stop === true){clearInterval(delay_led);digitalWrite(pin, true);}else{stopon_led = false;}
if(stop === false){delay_led = setInterval(function() {
on_led = !on_led;digitalWrite(pin, on_led);
}, period);
}
};function sms_send(text_sms){
D5.startFlashing(100,false);
//setTimeout(function (){D5.startFlashing(100,true);},2000);
var i=0;
var arr_comand =["AT+CMGS=\"+79216444654\"",text_sms,"\x1A"];
var interval_init = setInterval(function(){if(i<arr_comand.length){ Serial1.println(arr_comand[i]); //print("comand : "+arr_comand[i]); i++; } if(i == arr_comand.length){ clearInterval(interval_init); }
}, 400);
}
function reset_modem(){
digitalWrite(D13, true);
digitalWrite(D13, false);
digitalWrite(D13, true);
}function Start_modem(){
digitalWrite(D5, false);
var connection = setInterval(function(){ Serial1.println("AT+COPS?");},300);
Serial1.on('data', function (data) {print("<Serial1> "+data); if(data.indexOf("+COPS:")>-1){ clearInterval(connection); //print("modem start"); init_modem(); digitalWrite(D5, true); } if(data.indexOf("+CUSD: 0, ")>-1){ list_balanse(data); //print("SMS OK"); digitalWrite(D5, true); }
});
}function list_balanse(stringOne){
var newstr = stringOne.substring(13, 49);
//print("newstr : "+newstr);
var arr = [];
var d = 0;
var result ="";
for (var i = 0; i < 24; i+=4) {
arr [d] ='0x' + newstr.substring(i, i+4);
if(parseInt(newstr.substring(i, i+2)) === 0){
result += String.fromCharCode(arr[d]);
}
}
//print("balanse : "+result);
}function balans(){
digitalWrite(D5, false);
Serial1.println("AT+CSQ");
Serial1.println("AT+CUSD=1,\"*100#\"");
}function init_modem(){
var i=0;
var arr_comand =["AT+CMGF=1","AT+IFC=1, 1","AT+CSCS=\"GSM\""];
var interval_init = setInterval(function(){if(i<arr_comand.length){ Serial1.println(arr_comand[i]); //print("comand : "+arr_comand[i]); i++; } if(i == arr_comand.length){ clearInterval(interval_init); sms_send('System reboot and start'); }
}, 300);
}function send_data(){
digitalWrite(D4, false);
//print(process.memory().free);
// if(process.memory().free < 600)ESP8266.reboot(); -
-
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.