So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Narfel
#71209 My lab is in fact facing south, however it is neither painted green nor far from wifi. It is downtown Barcelona, Spain so its probably so full of wifi signals you could run a fridge on it. I plead guilty on the cheap chinese chips, however the power source is a stable bench power supply. I have the test running on 3 of those little buggers now and what do you know, they are doing some serious time counting :lol:

@philbowles The test code complained about CSTR and say, so i modified it a bit and hope i got the idea.

The output on console is now:
PHY mode: N
Channel: 6
AP id: 0
Status: 1
Auto connect: 1
SSID (11): MYSSID
Passphrase (10): MYPASSWORD
BSSID set: 0
[WiFi-event] event: 0
WiFi Connected SSID=MYSSID
[WiFi-event] event: 3
Yay, i got an IP
IP address:
192.168.1.111


Code: Select allvoid WiFiEvent(WiFiEvent_t event) {
    Serial.printf("[WiFi-event] event: %d\n", event);
    switch(event) {
        case WIFI_EVENT_STAMODE_GOT_IP:
            Serial.println("Yay, i got an IP");
            Serial.println("IP address: ");
            Serial.println(WiFi.localIP());
            break;
        case WIFI_EVENT_STAMODE_DISCONNECTED:
            Serial.println("WiFi lost connection");
            break;
        case WIFI_EVENT_STAMODE_CONNECTED:
            Serial.print("WiFi Connected SSID=");
            Serial.printf("%s");
            Serial.println(ssid);
            break;
        case WIFI_EVENT_SOFTAPMODE_STADISCONNECTED:
            Serial.println("WIFI_EVENT_SOFTAPMODE_STADISCONNECTED");
            break;       
        case WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED:
            Serial.println("WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED");
            break;
    }
}

P.S.: Trying to google the term "say" proved to be a fun but futile effort :)
User avatar
By Narfel
#71222 The results are in. Because I cannot troubleshoot it any further I have assume crappy hardware. All failed at different times with the longest making the 10h mark while I was already getting champagne uncorked. There's not much room for error for NodeMCU > simple USB cable > USB wallplug. Anybody got recommendations where to get better boards?
User avatar
By Narfel
#71236 I actually love it when i have a little bit of thinking instead of simple copy and paste. Let's be honest, i probably wouldn't have looked as closely at the code as had to now. I'm now thinking of having each of the 3 boards check each other and/or reset each other after a time :lol: That's probably absurdly overkill, but just throwing them away has me learning nothing. And i can't find other uses for them. The cat won't eat them, i can't reliably stop doors with em without scratching the floor and they make bad fishing lures.