ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By Cicero
#48099 I'm finding that when trying to access the wifi.tpl pages to scan for networks, it often fails to load the page and returns 'Network Connection Lost' (safari) or 'There is no internet connection - your device is offline' (chrome).

I have to reload the page pretty often and then it may go though, and even then it might half load and hang at 'scanning'.

Anyone else seen this? It seems solid connecting using a PC, so I'm thinking it may just be a shitty iphone5 thing?
User avatar
By Cicero
#48400 I am also finding that the AJAX requests stop after a seemingly randomly period of time with iOS devices.

I'm doing a constant poll, using this code:
Code: Select all      function getStatus() {
        xhr.open("GET", "cgiMachineTextStatus.cgi");
        //console.log("Getting text status");
        xhr.onreadystatechange=function() {
          if (xhr.readyState==4 && xhr.status>=200 && xhr.status<300) {
            var data=JSON.parse(xhr.responseText);
            document.getElementById("output").value = data.result;                    
            window.setTimeout(getStatus, 1000);           
          }
        }
        xhr.send();
      }


This just stops sending after a random period of time., anything from 2 to 12seconds.

Any ideas or help would be appreciated. Its driving me crazy!