Closed sticilface closed 9 years ago
Figured it out....
This used to work just fine...
int i = 0;
while ((WiFi.status() != WL_CONNECTED ) && i < 40 ) {
delay(500);
i++;
Serial.print(".");
if (i == 39) Serial.print("Failed");
}
but now it needs to be with the brackets around each part of the &&
int i = 0;
while ((WiFi.status() != WL_CONNECTED ) && (i < 40 )) {
delay(500);
i++;
Serial.print(".");
if (i == 39) Serial.print("Failed");
}
OK that has not fixed it. Seems like some small code changes can cause this... then un cause it.
Not really helping, but dispensing wisdom or so:
my two top rules: -- always use {}, even if not needed. -- always use (), even if not needed.
I don't do if (a==1) b=2; Always: if (a==1) { b=2; }
Just too difficult to remember: if (a & 2 <7) ... if (a * 2<7) ... What was the evaluation rule?
And as far as I see, I use this in wifi-client-mode in my code without any problem.
Have similar issue with specific router (Mikrotik 951). But not with other (Allied Telesis AT-WA1104G). Got irregular resets by wdt. Sometimes the hardware "reset" solves the issue but not always
BUT! When I switch my program to "more verbose" mode (not recompile, just invoke CLI command for change "logging" flag) and I have no resets. There are a lot of "delay(...)" inside main loop so possibly no room for locking
PS: I use 1.6.5 git build from 2015-05-28
I suspect that there is something going on..... i just had several reboots... and then it worked all of a sudden. This is on an ESP12. the flash previous to this failed, then i changed it from 512K to 4M and it worked. so it is quite an intermittent problem...
�*h!�`�h
���� � 怘�~3f<��<���f<
Using latest version 1.6.1-esp8266-1-1054-g3183c7c
I have a project that has been working fine (at least booting and joining wifi.) now it crashes upon trying to join wifi...
Not sure what to do next, to help? I should add that the same code compiled on a previous IDE works fine.