- Tue Aug 02, 2016 8:58 am
#51951
First sorry about hijacking a thread. Don't quite know how I did that, but now I'm here...
A subset of the output is probably more intelligible. The unexpected output is the lines I have prefixed with a $$.
EE-BrightBox-npw3he-81
SKYDCE42-70
SKYED3DC-85
HP-Print-5C-Photosmart 7520-90
BTWifi-X-93
BTHub5-GS2F-91
BTWifi-with-FON-93
60aMD-92
SKYED1C8-88
landless-65
$$È[06]"~^`");
$$if (res[0].toLowerCase() == "var") {
$$connection.send("OK");
$$for (i = 0; i < document.getElementsByName(res[1]).length; i++) {
$$document.getElementsByName(res[1])[i].value = res[2];
$$}
$$
$$return;
$$}
$$if (res[0].toLowerCase() == "varname") {
$$connection.send("OK");
$$document.getElementsByName("var" + res[1].toString())[0].value = res[2];
$$return;
$$}
$$if (res[0].toLowerCase() == "code") {
$$connection.send("OK");
$$document.getElementById("lcode").value = res[1];
$$document.getElementById("lno").value = res[2];
$$return;
$$}
$$
$$
$$if (res[0].toLowerCase() == "print") {
$$//alert(e);
$$var bla = document.body.innerHTML;
$$document.open();
$$document.write(bla + '<hr>' + res[1]);
$$documeÔ[10]?[08]"[06]67
END
post connect attempt
Done...
0 winsock connected 192.168.1.18
Embarrassing confession - when I copied the source code I inadvertently omitted the apostrophe from the start of the first (wifioff) line - sorry about that, not helpful.
Running the code as you have de-crudded it produces the same effective result - the entry for ssid in the array at the highest index value (the one returned by wifi.scan() ) is a duff string, of varying length. In my particular case, the last part of this string was a lump of a literal embedded in the program code,(see below). I tested this by changing the value of the string and the displayed output changed to match. I'm wondering if there's any possibility that that count might be off?
Hope this helps a bit. I'm going to flash the latest release next, just wanted to clarify as well as I could what was happening first.
Here's the output::::
0 winsock Disconnected!
START
5AFTER SCAN
SKYDCE42 : -79
EE-BrightBox-npw3he : -86
SKYED3DC : -90
landless : -66
f[07]R SCAN : -59 <<<<< original
END
post connect attempt
0 winsock connected 192.168.1.18
0 winsock Disconnected!
Done...
start save
/default.bas/21
end of save!!
START
5AFTER SCAt
SKYDCE42 : -81
EE-BrightBox-npw3he : -86
SKYED3DC : -89
landless : -66
f[07]R SCAt : -60 <<<< as modified
END
post connect attempt
0 winsock connected 192.168.1.18