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. Announcements
  3. 💬 Building a WiFi Gateway using ESP8266

💬 Building a WiFi Gateway using ESP8266

Scheduled Pinned Locked Moved Announcements
109 Posts 52 Posters 23.2k Views 51 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.
  • Z Zwer2k

    Hello,
    I have been using MySensors for a long time. First with serial gateway now with ESP8266 gateway. For months everything worked fine except for small dropouts. Due to dropouts I wanted to switch to current development branch, since then I can not get the gateway to work.
    The ESP delivers only the following output:

     ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 3460, room 16 
    tail 4
    chksum 0xcc
    load 0x3fff20b8, len 40, room 4 
    tail 4
    chksum 0xc9
    csum 0xc9
    v00051da0
    ~ld
    
    

    I use ESP07 with RFM69 and Standard Sketch. Compiled the code with Arduino IDE as well as with VS code, always with the same result.
    I disconnected RFM69 and checked the supply voltage. Have even used other calculator.
    Have also tested ESP12e.
    Erase Flash I have also already done.
    However, when I run other code on the ESP, it runs without problems.
    Erase Flash I have also already done.
    I just don't understand it.

    #define MY_DEBUG
    #define MY_BAUD_RATE 115200
    #define MY_RADIO_RFM69
    #define MY_IS_RFM69HW
    
    #define MY_GATEWAY_ESP8266
    
    #define MY_WIFI_SSID "my ssid"
    #define MY_WIFI_PASSWORD "my pw"
    
    #define MY_HOSTNAME "MySensors-GW"
    #define MY_PORT 5003
    #define MY_GATEWAY_MAX_CLIENTS 3
    #define MY_INCLUSION_MODE_FEATURE
    
    // Enable Inclusion mode button on gateway
    #define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    #define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    #define MY_INCLUSION_MODE_BUTTON_PIN  3
    
    #include <MySensors.h>
    
    void setup()
    {
    }
    
    void presentation()
    {
    }
    
    void loop()
    {
    }
    
    YveauxY Offline
    YveauxY Offline
    Yveaux
    Mod
    wrote on last edited by
    #91

    @Zwer2k please don't crosspost!

    http://yveaux.blogspot.nl

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zwer2k
      wrote on last edited by
      #92

      Sorry for crosspost.
      I found out that the error was due to too new version of espressif8266. I had version 3.1.0 installed, but MySensors seems to work only with versions < 3.0.0. Otherwise the error comes up. Unfortunately I did not find any hint about this anywhere.

      1 Reply Last reply
      0
      • Serj SamS Offline
        Serj SamS Offline
        Serj Sam
        wrote on last edited by
        #93

        Hello! I'm trying to run ESP8266 gateway with nrf24l01 radio module, but when I run it I don't see any logs, I've enebled debugging mode, but still no logs (and it doesn't run gateway either). I've checked connection between this board end esp32 - they communicate well. Don't know what to do else.

        YveauxY mfalkviddM 2 Replies Last reply
        0
        • Serj SamS Serj Sam

          Hello! I'm trying to run ESP8266 gateway with nrf24l01 radio module, but when I run it I don't see any logs, I've enebled debugging mode, but still no logs (and it doesn't run gateway either). I've checked connection between this board end esp32 - they communicate well. Don't know what to do else.

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #94

          @Serj-Sam logs are available through serial port. You mention esp8266 and esp32; which one is it?

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • Serj SamS Serj Sam

            Hello! I'm trying to run ESP8266 gateway with nrf24l01 radio module, but when I run it I don't see any logs, I've enebled debugging mode, but still no logs (and it doesn't run gateway either). I've checked connection between this board end esp32 - they communicate well. Don't know what to do else.

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #95

            @Serj-Sam you mention "connection between this board and esp32". What board are you referring to, and what type of connection? Wifi?

            Serj SamS 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @Serj-Sam you mention "connection between this board and esp32". What board are you referring to, and what type of connection? Wifi?

              Serj SamS Offline
              Serj SamS Offline
              Serj Sam
              wrote on last edited by
              #96

              @mfalkvidd I have esp8266 NodeMCU v3. I've connected it to esp32 devkit via nrf24l01 using simple test code where I sending and reading constant string. It's just to exclude problems with nrf24l01 and esp8266.
              @Yveaux I don't have any logs through serial port related to the MySensors. When I remove MySensors lib (and the code related to it) I'm able to print messages in setup() and loop() section, but with MySensors lib it stuckted somewhere without logs and do not execute code in setup() and loop() sections.

              YveauxY 1 Reply Last reply
              0
              • Serj SamS Serj Sam

                @mfalkvidd I have esp8266 NodeMCU v3. I've connected it to esp32 devkit via nrf24l01 using simple test code where I sending and reading constant string. It's just to exclude problems with nrf24l01 and esp8266.
                @Yveaux I don't have any logs through serial port related to the MySensors. When I remove MySensors lib (and the code related to it) I'm able to print messages in setup() and loop() section, but with MySensors lib it stuckted somewhere without logs and do not execute code in setup() and loop() sections.

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #97

                @Serj-Sam you could very well have run into the incompatibility of mysensors with the latest esp arduino core 3.x (see eg https://github.com/mysensors/MySensors/issues/1496)
                Easiest solution is to downgrade the esp arduino core to 2.x

                http://yveaux.blogspot.nl

                Serj SamS 1 Reply Last reply
                0
                • YveauxY Yveaux

                  @Serj-Sam you could very well have run into the incompatibility of mysensors with the latest esp arduino core 3.x (see eg https://github.com/mysensors/MySensors/issues/1496)
                  Easiest solution is to downgrade the esp arduino core to 2.x

                  Serj SamS Offline
                  Serj SamS Offline
                  Serj Sam
                  wrote on last edited by
                  #98

                  @Yveaux said in 💬 Building a WiFi Gateway using ESP8266:

                  downgrade the esp arduino core

                  Thank you @Yveaux ! It works now! Have you heard anything about long-term solution? Looks like this will be overwritten once I update MySensors lib.

                  YveauxY 1 Reply Last reply
                  0
                  • Serj SamS Serj Sam

                    @Yveaux said in 💬 Building a WiFi Gateway using ESP8266:

                    downgrade the esp arduino core

                    Thank you @Yveaux ! It works now! Have you heard anything about long-term solution? Looks like this will be overwritten once I update MySensors lib.

                    YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by
                    #99

                    @Serj-Sam there is a pull request included in that pr. Once this is merged it will be available in development, later in the next release.
                    If you just downgraded the core, that is persistent until you upgrade the core to 3.x again.

                    http://yveaux.blogspot.nl

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      maddhin
                      wrote on last edited by
                      #100

                      Hi,
                      I would like to add sendSketchInfo to my gateway.
                      I added

                      const char* sketch_name = "GatewayESP8266OTA_v3";
                      const char* rev = "1.01";

                      at the beginning of the sketch and

                      sendSketchInfo(sketch_name, rev);

                      in the presentation part.

                      but this doesn't seem to work. Am I doing anything wrong? Any suggestion on how to do it right? Many thanks in advance!

                      1 Reply Last reply
                      0
                      • rejoe2R Offline
                        rejoe2R Offline
                        rejoe2
                        wrote on last edited by
                        #101

                        Use this syntax instead:

                        #define SN "GatewayESP8266OTA_v3"
                        #define SV "1.01"
                        [...]
                        sendSketchInfo(SN, SV);
                        

                        Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                        1 Reply Last reply
                        0
                        • Fat FlyF Fat Fly

                          Small question. How to connect this gw to Domoticz ? Over lan and in Domoticz ?

                          B Offline
                          B Offline
                          billcrps32
                          wrote on last edited by
                          #102

                          @Fat-Fly i also want the answer of this question

                          1 Reply Last reply
                          0
                          • Bogusz JagodaB Offline
                            Bogusz JagodaB Offline
                            Bogusz Jagoda
                            wrote on last edited by
                            #103

                            Worth noting - use MY_RFM69_NEW_DRIVER define... (2.3.2+)

                            #ifdef ESP8266
                                // For RFM69
                                #define MY_RADIO_RFM69
                            	#define MY_RFM69_NEW_DRIVER
                                #define MY_RFM69_FREQUENCY  RFM69_868MHZ // Set your frequency here
                                #define MY_IS_RFM69HW                    // Omit if your RFM is not "H"
                                #define MY_RFM69_IRQ_PIN    D1
                                #define MY_RFM69_IRQ_NUM    digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
                                #define MY_RFM69_CS_PIN     D8           // NSS. Use MY_RFM69_SPI_CS for older versions (before 2.2.0)
                            #endif
                            
                            1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              HoseArkadio
                              wrote on last edited by
                              #104

                              Hi,
                              I'm having trouble compiling the ESP gate code. Can you help me?

                              In file included from c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/MySensors.h:441,
                              from C:\Users\Arkadiusz_Dziura\Documents\Arduino_OLD\Domoticz_BRAMA_ESP\Domoticz_BRAMA_ESP.ino:61:
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()':
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope; did you mean 'can_yield'?
                              95 | return cont_can_yield(g_pcont);
                              | ^~~~~~~~~~~~~~
                              | can_yield
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void esp_yield_within_cont()':
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:101:2: error: 'cont_yield' was not declared in this scope; did you mean 'can_yield'?
                              101 | cont_yield(g_pcont);
                              | ^~~~~~~~~~
                              | can_yield
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void loop_task(ETSEvent*)':
                              c:\Users\Arkadiusz_Dziura\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:199:26: error: invalid operands of types 'void' and 'int' to binary 'operator!='
                              199 | if (cont_check(g_pcont) != 0) {
                              | ~~~~~~~~~~~~~~~~~~~ ^~ ~
                              | | |
                              | void int

                              exit status 1

                              Compilation error: exit status 1

                              1 Reply Last reply
                              0
                              • V Offline
                                V Offline
                                veris25
                                wrote on last edited by
                                #105

                                I join the question, I have exactly the same problem: .../MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope; did you mean 'can_yield'?
                                i found a reference #include "cont.h" in MyMainESP8266.cpp but i can't find 'cont.h'

                                M 1 Reply Last reply
                                0
                                • V veris25

                                  I join the question, I have exactly the same problem: .../MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope; did you mean 'can_yield'?
                                  i found a reference #include "cont.h" in MyMainESP8266.cpp but i can't find 'cont.h'

                                  M Offline
                                  M Offline
                                  Msmax
                                  wrote on last edited by
                                  #106

                                  @veris25
                                  I installed an older ESP8266 lib v3.0.0 to compile without errors.

                                  1 Reply Last reply
                                  0
                                  • electrikE Offline
                                    electrikE Offline
                                    electrik
                                    wrote on last edited by
                                    #107

                                    You should try downgrading the ESP version below 3.0

                                    1 Reply Last reply
                                    0
                                    • H Offline
                                      H Offline
                                      HoseArkadio
                                      wrote on last edited by
                                      #108

                                      elektryk ....I do not really understand.

                                      1 Reply Last reply
                                      0
                                      • electrikE Offline
                                        electrikE Offline
                                        electrik
                                        wrote on last edited by
                                        #109

                                        I mean the ESP framework version, selected by the board version
                                        https://arduino.esp8266.com/Arduino/versions/2.0.0/doc/installing.html#:~:text=Open Boards Manager from Tools,from a drop-down box.

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


                                        8

                                        Online

                                        11.7k

                                        Users

                                        11.2k

                                        Topics

                                        113.0k

                                        Posts


                                        Copyright 2019 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