Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip doing strange things after router upgrade. #26

Closed
gpperrone opened this issue Feb 1, 2019 · 2 comments
Closed

Strip doing strange things after router upgrade. #26

gpperrone opened this issue Feb 1, 2019 · 2 comments

Comments

@gpperrone
Copy link

gpperrone commented Feb 1, 2019

I am using the Feather Huzzah, and your ESP8266_Neopixel demo sketch, to drive 47 LEDs in a strip. Don't ask about the odd number. It fits the environment perfectly. Everything worked great until I upgraded my router. Suddenly, the ESP would not connect to the wifi. I found out it has something to do with an incompatibility between the Wifi config on the ESP8266 and the Marvell radio in my router. That problem is "solved", meaning that, through modifications to the router config, I can now get the ESP8266 to connect to the AP, and acquire an IP address. But now... the first 11 pixels in my strip blink on and off, at the chosen color, at around a 1hz frequency. This only happens when the strip is set to hold a solid color. When the strip is getting a constantly changing stream of data, it seems to work as advertised.

I have modified your example sketch, to see if I can tell what is going on. I have placed my loop code at the bottom of this message. After successfully connecting to Wifi, serial monitor goes quiet, as expected. I send a change to the ESP8266, the Serial monitor spits results that match what the strips are actually doing, but it is not what the software is sending. See the actual output, below the loop code. This is cut and paste from a putty session log. All of this would be easily explained if I could see packets being transmitted on the network, but here is the strange part... I have Wiresharked the network, and the software is sending one, and only one, correctly formed packet. This second, interlaced result of e131.parsepacket(), is definitely not being sent via the network. It is coming from or resident in the buffer of, the code/MCU. But it only happens with the full 802.11n standard in play. Move away from the standard (disable WMM and allow older security protocols), it works without a hitch, as it did for 6 months before I upgraded the router. I have flashed a different sketch, for Art-Net. It works properly for a while, then exhibits the same symptoms. I switch back to your E1.31 sketch, and it works properly for a while, then starts this all over again. If I load a test program, an LED torture test that just holds full white(255, 255, 255) forever, it runs properly, and doesn't start blinking at all. It seems to be network related, but not caused by the network. The reverse of that perhaps. I am thinking it is actually related to the ESP8266Wifi.h library, but don't know how to prove it.

void loop() {
    /* Parse a packet and update pixels */
    if (WiFi.status() != WL_CONNECTED) {
      Serial.println(F("Not connected, resetting!"));
      setup();
    }
    if(e131.parsePacket()) {
      Serial.println(F("DMX packet recieved!"));
        if (e131.universe == UNIVERSE) {
            for (int i = 0; i < NUM_PIXELS; i++) {
                int j = i * 3 + (CHANNEL_START - 1);
                pixels.setPixelColor(i, e131.data[j], e131.data[j+1], e131.data[j+2]);
                
                Serial.print(F("Pixel #"));
                Serial.print(i+1);
                Serial.print(F(" Color "));
                Serial.print(e131.data[j]);
                Serial.print(F(", "));
                Serial.print(e131.data[j+1]);
                Serial.print(F(", "));
                Serial.println(e131.data[j+2]);
            }
            Serial.println(F("Showing color!"));
            pixels.show();

        }
    }
}

_Serial terminal text. These sets alternate. The LEDs are actually doing this:

DMX packet recieved!
Pixel #1 Color 255, 255, 255
Pixel #2 Color 255, 255, 255
Pixel #3 Color 255, 255, 255
Pixel #4 Color 255, 255, 255
Pixel #5 Color 255, 255, 255
Pixel #6 Color 255, 255, 255
Pixel #7 Color 255, 255, 255
Pixel #8 Color 255, 255, 255
Pixel #9 Color 255, 255, 255
Pixel #10 Color 255, 255, 255
Pixel #11 Color 255, 255, 255
Pixel #12 Color 255, 255, 255
Pixel #13 Color 255, 255, 255
Pixel #14 Color 255, 255, 255
Pixel #15 Color 255, 255, 255
Pixel #16 Color 255, 255, 255
Pixel #17 Color 255, 255, 255
Pixel #18 Color 255, 255, 255
Pixel #19 Color 255, 255, 255
Pixel #20 Color 255, 255, 255
Pixel #21 Color 255, 255, 255
Pixel #22 Color 255, 255, 255
Pixel #23 Color 255, 255, 255
Pixel #24 Color 255, 255, 255
Pixel #25 Color 255, 255, 255
Pixel #26 Color 255, 255, 255
Pixel #27 Color 255, 255, 255
Pixel #28 Color 255, 255, 255
Pixel #29 Color 255, 255, 255
Pixel #30 Color 255, 255, 255
Pixel #31 Color 255, 255, 255
Pixel #32 Color 255, 255, 255
Pixel #33 Color 255, 255, 255
Pixel #34 Color 255, 255, 255
Pixel #35 Color 255, 255, 255
Pixel #36 Color 255, 255, 255
Pixel #37 Color 255, 255, 255
Pixel #38 Color 255, 255, 255
Pixel #39 Color 255, 255, 255
Pixel #40 Color 255, 255, 255
Pixel #41 Color 255, 255, 255
Pixel #42 Color 255, 255, 255
Pixel #43 Color 255, 255, 255
Pixel #44 Color 255, 255, 255
Pixel #45 Color 255, 255, 255
Pixel #46 Color 255, 255, 255
Pixel #47 Color 255, 255, 255
Showing color!

DMX packet recieved!
Pixel #1 Color 0, 0, 0
Pixel #2 Color 0, 0, 0
Pixel #3 Color 0, 0, 0
Pixel #4 Color 0, 0, 0
Pixel #5 Color 0, 0, 0
Pixel #6 Color 0, 0, 0
Pixel #7 Color 0, 0, 0
Pixel #8 Color 0, 0, 0
Pixel #9 Color 0, 0, 0
Pixel #10 Color 0, 0, 0
Pixel #11 Color 0, 0, 0
Pixel #12 Color 255, 255, 255
Pixel #13 Color 255, 255, 255
Pixel #14 Color 255, 255, 255
Pixel #15 Color 255, 255, 255
Pixel #16 Color 255, 255, 255
Pixel #17 Color 255, 255, 255
Pixel #18 Color 255, 255, 255
Pixel #19 Color 255, 255, 255
Pixel #20 Color 255, 255, 255
Pixel #21 Color 255, 255, 255
Pixel #22 Color 255, 255, 255
Pixel #23 Color 255, 255, 255
Pixel #24 Color 255, 255, 255
Pixel #25 Color 255, 255, 255
Pixel #26 Color 255, 255, 255
Pixel #27 Color 255, 255, 255
Pixel #28 Color 255, 255, 255
Pixel #29 Color 255, 255, 255
Pixel #30 Color 255, 255, 255
Pixel #31 Color 255, 255, 255
Pixel #32 Color 255, 255, 255
Pixel #33 Color 255, 255, 255
Pixel #34 Color 255, 255, 255
Pixel #35 Color 255, 255, 255
Pixel #36 Color 255, 255, 255
Pixel #37 Color 255, 255, 255
Pixel #38 Color 255, 255, 255
Pixel #39 Color 255, 255, 255
Pixel #40 Color 255, 255, 255
Pixel #41 Color 255, 255, 255
Pixel #42 Color 255, 255, 255
Pixel #43 Color 255, 255, 255
Pixel #44 Color 255, 255, 255
Pixel #45 Color 255, 255, 255
Pixel #46 Color 255, 255, 255
Pixel #47 Color 255, 255, 255
Showing color!_

@forkineye
Copy link
Owner

It could be related to the neopixel library as well. You'll experience all sorts of issues with bit-banging ws2811 and watchdog resets. Since you're on ESP8266, I recommend this library instead - https://github.com/forkineye/ESPAsyncE131 and you can reference https://github.com/forkineye/ESPixelStick for how to do ws2811.

@gpperrone
Copy link
Author

gpperrone commented Oct 31, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants