after uploading the above code to the nodeMCU i am able to send requests and get a response from the esp8266. However, after a few requests the esp8266 stops responding to any further requests
Here is the log following a new upload then sending an ON, OFF and ON
connencted to the wireless network !Use this to connect
http://192.168.1.95/
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led off
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
Note the lack off response after the final "handling new client" message, and the LED stays off
After rebooting the board I only got as far as sending ON then OFF before the system stopped responding but after rebooting yet again I was able to send ON, OFF several times before the lack of response occurred
For what it is worth, the lack of response always happens after the "handling new client" message is printed
As I said previously, this is not my area of expertise so I cannot suggest what might be wrong
There is sometimes a pause after the "handling new client" message is printed before anything else happens, but it works
Interestingly, when the pause happens the output has a blank line in it, unlike when the response is immediate. See a some examples in this output
connencted to the wireless network !Use this to connect
http://192.168.1.95/
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led off
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
client disconnected
handling new client
led off
client disconnected
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led off
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led off
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
client disconnected
handling new client
led off
client disconnected
handling new client
led on
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
led off
client disconnected
handling new client
GET /favicon.ico HTTP/1.1
client disconnected
handling new client
client disconnected
handling new client
led on
client disconnected
type or paste code here
Neither reducing the String timeout to 100 milliseconds or increasing it to 100000 milliseconds appears to make any difference to the length of the pause after the "handling new client" message, it is always about 5 seconds