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 165 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
    #1

    I installed on Windows 7 64bit: Arduino IDE 1.8.15, MySensors lib 2.3.2 and from "ESP8266 by ESP8266 Community" 3.0.0 board: NodeMCU 1.0 (ESP-12E Module). When trying to compile GatawayESP8266 (I only changed to my MY_WIFI_SSID and MY_WIFI_PASSWORD). I'm getting errors and can't compile it :(
    [0_1621338567721_compile errors 1.txt](Uploading 100%)
    What am I doing wrong? :(

    BearWithBeardB 1 Reply Last reply
    0
    • S Offline
      S Offline
      skom
      wrote on last edited by
      #2

      Here is the beginning of a long list of errors

      Arduino:1.8.15 (Windows 7), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
      
      In file included from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\assert.h:10,
                       from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\sys\reent.h:503,
                       from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\stdlib.h:18,
                       from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\cstdlib:75,
                       from c:\users\K\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\stdlib.h:36,
                       from C:\Users\K\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/Arduino.h:27,
                       from sketch\GatewayESP8266.ino.cpp:1:
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp: In function 'char* protocolMyMessage2Serial(MyMessage&)':
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:94:28: error: expected ')' before '__INT8'
         94 |                   PSTR("%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%s\n"), message.getSender(),
            |                            ^~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:94:19: note: to match this '('
         94 |                   PSTR("%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%s\n"), message.getSender(),
            |                   ^~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp: In function 'char* protocolMyMessage2MQTT(const char*, MyMessage&)':
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:103:31: error: expected ')' before '__INT8'
        103 |                   PSTR("%s/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 ""), prefix,
            |                               ^~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyProtocol.cpp:103:19: note: to match this '('
        103 |                   PSTR("%s/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 ""), prefix,
            |                   ^~~~
      In file included from C:\Users\K\Documents\Arduino\libraries\MySensors/MySensors.h:43,
                       from C:\Downloads\mysensors\GatewayESP8266\GatewayESP8266.ino:114:
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp: In function 'bool _readFromClient(uint8_t)':
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:38: error: expected ')' before '__INT8'
        317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
            |                                      ^~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
       2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
            |                                           ^
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:5: note: in expansion of macro 'GATEWAY_DEBUG'
        317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
            |     ^~~~~~~~~~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:19: note: to match this '('
        317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
            |                   ^~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
       2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
            |                                           ^
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:317:5: note: in expansion of macro 'GATEWAY_DEBUG'
        317 |     GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
            |     ^~~~~~~~~~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:38: error: expected ')' before '__INT8'
        328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
            |                                      ^~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
       2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
            |                                           ^
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:4: note: in expansion of macro 'GATEWAY_DEBUG'
        328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
            |    ^~~~~~~~~~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:18: note: to match this '('
        328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
            |                  ^~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/MyConfig.h:2139:43: note: in definition of macro 'DEBUG_OUTPUT'
       2139 | #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
            |                                           ^
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:328:4: note: in expansion of macro 'GATEWAY_DEBUG'
        328 |    GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
            |    ^~~~~~~~~~~~~
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp: In function 'bool gatewayTransportAvailable()':
      C:\Users\K\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:425:38: error: expected ')' before '__INT8'
        425 |     GATEWAY_DEBUG(PSTR("GWT:TSA:C=%" PRIu8 ",DISCONNECTED\n"), i);
            |                                      ^~~~~
      
      

      and so on

      1 Reply Last reply
      0
      • S skom

        I installed on Windows 7 64bit: Arduino IDE 1.8.15, MySensors lib 2.3.2 and from "ESP8266 by ESP8266 Community" 3.0.0 board: NodeMCU 1.0 (ESP-12E Module). When trying to compile GatawayESP8266 (I only changed to my MY_WIFI_SSID and MY_WIFI_PASSWORD). I'm getting errors and can't compile it :(
        [0_1621338567721_compile errors 1.txt](Uploading 100%)
        What am I doing wrong? :(

        BearWithBeardB Offline
        BearWithBeardB Offline
        BearWithBeard
        wrote on last edited by
        #3

        @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 1 Reply Last reply
        1
        • 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


                                24

                                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