Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Bug Reports
  3. [SOLVED] Wifi Gateway problem ESP8266

[SOLVED] Wifi Gateway problem ESP8266

Scheduled Pinned Locked Moved Bug Reports
12 Posts 4 Posters 4.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #2

    Downgrade to Arduino-ESP 2.0.0.

    Not sure why 2.1 crashes. If someone has a tip, let me know.

    1 Reply Last reply
    0
    • SkysoftS Offline
      SkysoftS Offline
      Skysoft
      wrote on last edited by
      #3

      Hi! I've your problem too!
      hek, what do you mean for "Downgrade to Arduino-ESP 2.0.0" and how can I do that?
      Thanx

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #4

        Arduino IDE -> Tools -> Board -> Board Manager

        SkysoftS 1 Reply Last reply
        0
        • M Offline
          M Offline
          msantang
          wrote on last edited by
          #5

          Yes, sorry!

          Works with Arduino-ESP 2.0.0 and mysensors dev

          Thank you very much.

          1 Reply Last reply
          0
          • hekH hek

            Arduino IDE -> Tools -> Board -> Board Manager

            SkysoftS Offline
            SkysoftS Offline
            Skysoft
            wrote on last edited by
            #6

            @hek
            Great! It works. Thanx!

            1 Reply Last reply
            1
            • gerritvG Offline
              gerritvG Offline
              gerritv
              wrote on last edited by
              #7

              I wouldn't call downgrading a solution, but it is a useful workaround :-)

              Since this isn't actually solved and because I want to not downgrade the sdk I did some tracing.
              I added printf's to MySensorCore.cpp to see how far we get before the exception occurs. The ledsInit() at line 113 returns , but we crash somewhere during the hwReadConfigBlock() call to get the isMetric parameter. If I comment that out execution continues but fails after calling presentation().
              This seems to implicate the EEPROM library calls from MyHwESP8266.cpp and indeed when I add printf's there (oh how I hate debugging this way!!!), it fails on the call to EEPROM.init(length).

              1 Reply Last reply
              1
              • hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #8

                Ok, great find. And yeah, print-debugging isn't the greatest..

                Did you search any further why the EEPROM.begin would fail? Any issues over at ESP/Arduino project?

                1 Reply Last reply
                0
                • gerritvG Offline
                  gerritvG Offline
                  gerritv
                  wrote on last edited by gerritv
                  #9

                  I ran out of time last night.....
                  There are at least 4 Issues open at ESP8266/Arduino on this topic. Most of the exception dumps seem to fail inside a timer interrupt????
                  I reverted the EEPROM library to 2.0.0, no change.

                  Adding a 1 second delay (wait(1000)) just before the EEPROM read (after leds_init) avoids the exception but results in a wdt event and restart.

                  There are 80 files changed in cores/esp8266 since 2.0.0. I might do some diffs to see if there is anything that hints at being relevant. No telling what the cause is so binary search might be the only way without a hardware debug facility.

                  Bottom line, for me I might have to live with using 2.0.0 until the esp8266 Arduino lib team figure this one out. :-(

                  1 Reply Last reply
                  0
                  • gerritvG Offline
                    gerritvG Offline
                    gerritv
                    wrote on last edited by
                    #10

                    Being Dutch I am very stubborn, a bit like a leach with lockjaw when it comes to defects.
                    @hek
                    Some more searching today turned up issues with esp8266/Arduino and the yield() function. That led to me looking through the MySensors site again and it turns out that a month ago in this set of comments that http://www.mysensors.org/build/esp8266_gateway user sl118 solved the problem by commenting out a line in MyGatewayTransportEthernet.cpp. I should have twigged on that earlier as someone elsewhere commented the using UDP solved the problem as well.

                    The setnodelay(true) enables the Nagle algorithm inside the tcp stack, this combines small packets into a larger one. So perhaps a bit of a performance hit on a busy network but at least I can use esp8266/Arduino 2.1 now and avoid using Arduino IDE for gw, and use VS2015CE for all my development again.

                    1 Reply Last reply
                    1
                    • hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #11

                      Sweet!

                      Could you prepare a pull request so you'll get proper credit for finding it?

                      1 Reply Last reply
                      0
                      • gerritvG Offline
                        gerritvG Offline
                        gerritv
                        wrote on last edited by gerritv
                        #12

                        The credit should really go to @sle118 but I will create a pull request later today.

                        And now that we know exactly what to look for, I found this: https://github.com/esp8266/Arduino/issues/1695 where they library fix is being implemented as well as a description of the problem.

                        1 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        11

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular