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. General Discussion
  3. GatawayESP8266 - Compile error

GatawayESP8266 - Compile error

Scheduled Pinned Locked Moved General Discussion
gatawayesp8266 compile error
15 Posts 8 Posters 163 Views 8 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.
  • S Offline
    S Offline
    skom
    wrote on last edited by
    #4

    Thank you :), version 2.7.4 works :)

    1 Reply Last reply
    2
    • BearWithBeardB BearWithBeard

      @skom Welcome! You're doing nothing wrong.

      It looks like some changes in the 3.0.0 release of the ESP6266 core that came out a few days ago is breaking most if not all MySensors example sketches for boards included in that package.

      I don't know what is causing this. It seems to be related to the PSTR macro - maybe someone with better understanding of this should have a look at it.

      As a workaround, you can downgrad the ESP8266 core from 3.0.0 to 2.7.4 in the Arduino boards manager and it should compile just fine.

      B Offline
      B Offline
      bonamin
      wrote on last edited by
      #5

      @BearWithBeard Hello !

      I'm new to the forum. I just found out about MySensors today actually.

      I tried making my first gateway, and had the same exact problem as @skom
      A quick search brought me here.
      Looks like downgrading the ESP Board Library to 2.7.4 works fine indeed.

      Thank you sir.
      I love the Internet, and I love you guys. <3

      1 Reply Last reply
      1
      • A Offline
        A Offline
        ajongen
        wrote on last edited by
        #6

        And even in 2022 people are very happy to find this information! Took me about 2 days to figure out what was going on. I did not get any compilation errors and uploading the sketch to the board went fine. However, even the cleanest MySensors sketch did not work on the Wemos D1 mini version 3.0.0. Other sketches like "blink" without Mysensors.h did work.

        Also for me the downgrading to 2.7.4 works. Maybe an idea to put this info on the Mysensors page?

        Thanks again for posting this solution!

        OldSurferDudeO 1 Reply Last reply
        0
        • A ajongen

          And even in 2022 people are very happy to find this information! Took me about 2 days to figure out what was going on. I did not get any compilation errors and uploading the sketch to the board went fine. However, even the cleanest MySensors sketch did not work on the Wemos D1 mini version 3.0.0. Other sketches like "blink" without Mysensors.h did work.

          Also for me the downgrading to 2.7.4 works. Maybe an idea to put this info on the Mysensors page?

          Thanks again for posting this solution!

          OldSurferDudeO Offline
          OldSurferDudeO Offline
          OldSurferDude
          wrote on last edited by OldSurferDude
          #7

          @ajongen et. al.

          2024 and alll is not well. The unmodified GatewayESP8266 does not compile now
          MySensors 2.3.2
          ESP8266 by ESP8266 (community) 2.7.4

          In file included from c:\Users\gferry\Documents\Arduino\libraries\MySensors/MySensors.h:441:0,
                           from C:\Users\gferry\AppData\Local\Temp\.arduinoIDE-unsaved202412-16144-b9g35b.q5il\GatewayESP8266\GatewayESP8266.ino:114:
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()':
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:96:26: error: too many arguments to function 'bool can_yield()'
            return can_yield(g_pcont);
                                    ^
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:93:17: note: declared here
           extern "C" bool can_yield()
                           ^
          
          exit status 1
          
          Compilation error: exit status 1
          

          ESP8266 by ESP8266 (community) 3.1.2

          In file included from c:\Users\gferry\Documents\Arduino\libraries\MySensors/MySensors.h:441,
                           from C:\Users\gferry\AppData\Local\Temp\.arduinoIDE-unsaved202412-16144-b9g35b.q5il\GatewayESP8266\GatewayESP8266.ino:114:
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()':
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:96:26: error: too many arguments to function 'bool can_yield()'
             96 |  return can_yield(g_pcont);
                |                          ^
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:93:17: note: declared here
             93 | extern "C" bool can_yield()
                |                 ^~~~~~~~~
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void esp_yield_within_cont()':
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:102:2: error: 'cont_yield' was not declared in this scope; did you mean 'can_yield'?
            102 |  cont_yield(g_pcont);
                |  ^~~~~~~~~~
                |  can_yield
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void loop_task(ETSEvent*)':
          c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:200:26: error: invalid operands of types 'void' and 'int' to binary 'operator!='
            200 |  if (cont_check(g_pcont) != 0) {
                |      ~~~~~~~~~~~~~~~~~~~ ^~ ~
                |                |            |
                |                void         int
          
          exit status 1
          
          Compilation error: exit status 1
          
          1 Reply Last reply
          0
          • ferroF Offline
            ferroF Offline
            ferro
            wrote on last edited by
            #8

            I just tested with board esp8266 library downgraded to 2.7.4 and unmodified GatewayESP8266 from Mysensors 2.3.2 examples and compilation finished OK without errors. Maybe try to remove/install board library.

            29425bad-5a91-495c-b169-a331150cc428-image.png

            1 Reply Last reply
            0
            • OldSurferDudeO Offline
              OldSurferDudeO Offline
              OldSurferDude
              wrote on last edited by
              #9

              @ferro Thanks for checking for me. I'll do that.

              OSD

              1 Reply Last reply
              0
              • OldSurferDudeO Offline
                OldSurferDudeO Offline
                OldSurferDude
                wrote on last edited by
                #10

                I removed both the ESP8266 library and the MySensors library, then re-installed the MySensors Library and then the 2.7.4 ESP8266 library. Works!

                I did see that the default number of nodes is 2. I suspect that as a gateway, it can't handle many nodes.

                OSD

                1 Reply Last reply
                1
                • E Offline
                  E Offline
                  eiten
                  wrote on last edited by
                  #11

                  hey @OldSurferDude as I wrote in https://forum.mysensors.org/topic/12217/gateways/2?_=1707229400694, it is limited to 2 controllers. The esp8266 can handle many nodes. I had one with 9 or 10 IIRC. Now I got a ESP32 handling 39 nodes without any proplems.

                  OldSurferDudeO 1 Reply Last reply
                  0
                  • E eiten

                    hey @OldSurferDude as I wrote in https://forum.mysensors.org/topic/12217/gateways/2?_=1707229400694, it is limited to 2 controllers. The esp8266 can handle many nodes. I had one with 9 or 10 IIRC. Now I got a ESP32 handling 39 nodes without any proplems.

                    OldSurferDudeO Offline
                    OldSurferDudeO Offline
                    OldSurferDude
                    wrote on last edited by OldSurferDude
                    #12

                    @eiten That's good to hear! Obvisouly I misunderstood the meaning of

                    // How many clients should be able to connect to this gateway (default 1)
                    #define MY_GATEWAY_MAX_CLIENTS 2
                    

                    thinking it meant nodes, but as you say, it means controllers.

                    Considering that one can get and ESP12F, a power supply, and an nRF24l01+ radio for it for about US$3 makes the ESP8266 much more desireable than an RPi at US$56.

                    There is one thing that is troubling and that is support. Already noted is that the current revision of the ESP8266 board in the Arduino IDE does not support the ESP8266 gateway. It appears that MySensors, too, is losing adherents.

                    -OSD

                    E 1 Reply Last reply
                    0
                    • OldSurferDudeO OldSurferDude

                      @eiten That's good to hear! Obvisouly I misunderstood the meaning of

                      // How many clients should be able to connect to this gateway (default 1)
                      #define MY_GATEWAY_MAX_CLIENTS 2
                      

                      thinking it meant nodes, but as you say, it means controllers.

                      Considering that one can get and ESP12F, a power supply, and an nRF24l01+ radio for it for about US$3 makes the ESP8266 much more desireable than an RPi at US$56.

                      There is one thing that is troubling and that is support. Already noted is that the current revision of the ESP8266 board in the Arduino IDE does not support the ESP8266 gateway. It appears that MySensors, too, is losing adherents.

                      -OSD

                      E Offline
                      E Offline
                      eiten
                      wrote on last edited by
                      #13

                      @OldSurferDude said in GatawayESP8266 - Compile error:

                      It appears that MySensors, too, is losing adherents.

                      Sad but true, it seems. I'm fighting myself out of a depression, but when I'm a little better, I'll try to fix the ESP8266 support in MySensors.

                      Regards, Edi

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        eiten
                        wrote on last edited by
                        #14

                        Hi everyone

                        Which MySensors lib did you use? The 2.3.2 or the delevopment version? I tried to fix the errors, but they don't appear in the development branch. Only another error which i fixed.

                        Regards, Edi

                        bgunnarbB 1 Reply Last reply
                        1
                        • E eiten

                          Hi everyone

                          Which MySensors lib did you use? The 2.3.2 or the delevopment version? I tried to fix the errors, but they don't appear in the development branch. Only another error which i fixed.

                          Regards, Edi

                          bgunnarbB Offline
                          bgunnarbB Offline
                          bgunnarb
                          wrote on last edited by
                          #15

                          @eiten Ran into the same error but of course the community is always at hand, ready to help! Great! I'm using MySensors 2.3.2 release version. Downgrading the ESP8266 board library to 2.7.4 as suggested by @OldSurferDude did the trick.
                          I'm still clinging to MySensors. So simple and inexpensive to use! All sensors and other stuff connects over three MQTT GW in three locations back to my Home Assistant.
                          PS: Get well soon!

                          Regards, Gunnar

                          I have never been so busy since I retired!

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


                          18

                          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