Hi! I'm facing with the same issue. Only the first http request served. I'm using an ESP8266 with this firmware version:
>Serial2.setup(115200,{ : rx:A3, : tx:A2, : bytesize:8, : parity:'none', : stopbits:1, : flow:'none'}); =undefined >Serial2.on('data',function(d) { console.log(d); }); =undefined >Serial2.write("AT+GMR\r\n"); =undefined AT+GMR AT version:0.21.0.0 SDK version:0.9 .5 OK
I also have insalled a temperature and air pressure sensor, which I wanted to serve as json data. But it arrives like this:
AT+CIPSEND=0,47 xt {"pressure":100727,"temperature":27.8375}
This is the code I used (Almost identical to the ESP8266's sample code)
Serial2.setup(115200,{ rx:A3, tx:A2, bytesize:8, parity:'none', stopbits:1, flow:'none'}); status = "Connecting to ESP8266"; var wifi = require("ESP8266WiFi").connect(Serial2, function(err) { if (err) throw err; status = "Reseting wifi module"; wifi.reset(function(err) { if (err) throw err; status = "Connecting to " + SSID; wifi.connect(SSID,code, function(err) { if (err) {status = err; throw err;} wifi.getIP(function(err, ip){ status = err || ("IP: " + ip); }); var http = require("http").createServer(onPageRequest); http.listen(80); status = "HTTP server started"; }); }); }); function onPageRequest(req, res){ res.writeHead(200, {'Content-Type': 'content/text'}); res.end(JSON.stringify(lastValue)); status = "Request served"; }
What is the advised firmware to use on ESP8266? Also I'm using an Espruino Pico with 1v79 firmware.
(Excuse my English, I'm not a native speaker.)
@Pho3nix started
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.
Hi!
I'm facing with the same issue. Only the first http request served.
I'm using an ESP8266 with this firmware version:
I also have insalled a temperature and air pressure sensor, which I wanted to serve as json data.
But it arrives like this:
This is the code I used (Almost identical to the ESP8266's sample code)
What is the advised firmware to use on ESP8266?
Also I'm using an Espruino Pico with 1v79 firmware.
(Excuse my English, I'm not a native speaker.)