EspruinoWifi + ESP8266 external board http server sends nothing #4606
Replies: 1 comment
-
Posted at 2018-02-21 by @gfwilliams Please could you post up the full code you used for testing, and I'll give it a try here and see if it works on a normal WiFi board. Recent EspruinoWiFi software now uses flow control, so you'd need to have that connected to the external module as well. Out of interest, what happened to your on-board ESP8266? It might be possible to re-flash it if it's a software issue. Posted at 2018-02-21 by llakie Hi Gordon, The full code is as follows:
Posted at 2018-02-21 by @gfwilliams Do you have any idea what happened to the ESP8266 module to make it nonresponsive? If you're using Serial2 yourself you'd have to power the on-board ESP8266 on with There is some info about firmware upgrades here: http://www.espruino.com/ESP8266#firmware-versions However.... If you're using Posted at 2018-02-21 by llakie Hi Gordon, Posted at 2018-02-21 by llakie Hi Gordon, the A13 and A14 set to high seemed to work for the WiFi module. But now I get the following error: "Pin A3 is not capable of USART1 RX". It does not make any difference when I do the Serial setup by myself or just take the EspruinoWifi module. Do you have any idea, what happened here? Posted at 2018-02-21 by llakie Hi Gordon, I got it working.
My problem with this HTTP stuff was related to the external ESP8266 in my opinion. Thank you very much for your immediate help. Posted at 2018-02-21 by @gfwilliams No problem - glad you got it sorted! So the onboard ESP8266 is fine? Wouldn't it work with the normal Thanks for letting me know about the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-02-21 by llakie
Hi there,
I have problem sending a http response back to the client.
My setup is as follows: Since the WiFi module on my EspruinoWiFi is broken, I wired an external ESP8266 module to the board. I create an access point and after that an http server by calling http.createServer((req, res) => {...}).listen(80)
Now my problem:
When I connect to the AccessPoint and send a http GET request to my Esprunino, it gets the request data.
But when I call res.writeHead(200, { 'Content-Type': 'text/plain'}); res.write('Foo'); res.end(); in succession the client never gets any response and the connection seems to stay open forever. Am I doing s.th. wrong?
For debug purposes I registered Event listeners on req.on('end', () => {...}), req.on('close', () => {...}), res.on('end', () => {...}) and res.on('close', () => {...}).
The events are getting called in the following order:
request.end
response.end
request.close
response.close
Seems to me, that nothing is going wrong. I'm using the latest firmware (v95). Does anyone has a solution for this? Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions