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. Hardware
  3. Is it possible to use ESP8266's OTA capabilities?

Is it possible to use ESP8266's OTA capabilities?

Scheduled Pinned Locked Moved Hardware
20 Posts 6 Posters 10.5k Views 10 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.
  • AndurilA Offline
    AndurilA Offline
    Anduril
    wrote on last edited by
    #2

    Today I found an example in dev branch named GatewayESP8266OTA... does this mean it is already implemented? Or at least it's been worked on? Could please someone explain how to use?

    tekkaT 1 Reply Last reply
    0
    • AndurilA Anduril

      Today I found an example in dev branch named GatewayESP8266OTA... does this mean it is already implemented? Or at least it's been worked on? Could please someone explain how to use?

      tekkaT Offline
      tekkaT Offline
      tekka
      Admin
      wrote on last edited by
      #3

      @Anduril yes, I've added the esp8266 OTA example, works nicely for sketch updates.

      Read here for instructions.

      AndurilA 1 Reply Last reply
      0
      • tekkaT tekka

        @Anduril yes, I've added the esp8266 OTA example, works nicely for sketch updates.

        Read here for instructions.

        AndurilA Offline
        AndurilA Offline
        Anduril
        wrote on last edited by
        #4

        @tekka thanks a lot for that info. I already tried that some time ago and gave up.

        I flashed the OTA gateway and it works fine. Only when trying to ota upload I get problems. The Arduino IDE says [ERROR]: No response from device and in the serial console I see the following:

        0;255;3;0;9;read: 1-1-0 s=1,c=1,t=1,pt=7,l=5,sg=0:39.1
        sleep disable
        Error[1]: Begin Failed
        0;255;3;0;9;read: 1-1-0 s=2,c=1,t=0,pt=7,l=5,sg=0:23.8
        

        Do you know whats happening there?

        1 Reply Last reply
        0
        • AndurilA Offline
          AndurilA Offline
          Anduril
          wrote on last edited by
          #5

          @tekka did you used password protection for OTA update or any other security feature? Did you change anything in the sketch except SSID and password for wifi?

          tekkaT 1 Reply Last reply
          0
          • AndurilA Anduril

            @tekka did you used password protection for OTA update or any other security feature? Did you change anything in the sketch except SSID and password for wifi?

            tekkaT Offline
            tekkaT Offline
            tekka
            Admin
            wrote on last edited by tekka
            #6

            @Anduril No, I simply followed these instructions:
            https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md and used this sketch for testing:
            https://github.com/mysensors/Arduino/tree/development/libraries/MySensors/examples/GatewayESP8266OTA

            1 Reply Last reply
            1
            • AndurilA Offline
              AndurilA Offline
              Anduril
              wrote on last edited by
              #7

              @tekka do you have and NodeMCU Devkit 0.9 or 1.0? I have a 1.0 and get the error. But I use it with fixed IP on the gateway sketch, maybe that's a problem. It uploads ok via serial. But when uploading via wifi (changed static ip for testing) it stuck. Maybe I will try it with dhcp enabled.

              tekkaT 1 Reply Last reply
              0
              • AndurilA Anduril

                @tekka do you have and NodeMCU Devkit 0.9 or 1.0? I have a 1.0 and get the error. But I use it with fixed IP on the gateway sketch, maybe that's a problem. It uploads ok via serial. But when uploading via wifi (changed static ip for testing) it stuck. Maybe I will try it with dhcp enabled.

                tekkaT Offline
                tekkaT Offline
                tekka
                Admin
                wrote on last edited by
                #8

                @Anduril I'm using a NodeMCU 1.0 (MySensors 2.0.0beta and ESP8266 lib 2.1.0) with fixed IP. Both, OTA and serial FW updates work flawlessly...

                1 Reply Last reply
                0
                • AndurilA Offline
                  AndurilA Offline
                  Anduril
                  wrote on last edited by
                  #9

                  @tekka thanks for that info, I'm also using MySensors 2 beta but ESP lib 2.0 (as far as I know, corrently at work). I will check that later and test with updated ESP library.

                  1 Reply Last reply
                  0
                  • AndurilA Offline
                    AndurilA Offline
                    Anduril
                    wrote on last edited by
                    #10

                    @tekka did you changed any of the standard settings for ESP flashing? I simply updated ESP8266 library and reflashed, but I get an reboot loop. In the serial monitor I see:

                    0‚~?–4“Ò¶£ÿOAaû0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
                    0;255;3;0;9;Radio init successful.
                    scandone
                    state: 0 -> 2 (b0)
                    state: 2 -> 3 (0)
                    state: 3 -> 5 (10)
                    add 0
                    aid 2
                    cnt 
                    
                    connected with mDjEKlujYacByG5JtxlY, channel 1
                    ip:192.168.38.19,mask:255.255.255.0,gw:192.168.38.1
                    .IP: 192.168.38.19
                    ¥üÊæ” ×Åü1¤ñþ0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
                    0;255;3;0;9;Radio init successful.
                    scandone
                    state: 0 -> 2 (b0)
                    

                    When going back to 2.0.0 it works without problems. Here my settings for flashing:
                    0_1460916775416_flashing-nodeMCU.png

                    tekkaT 1 Reply Last reply
                    0
                    • AndurilA Anduril

                      @tekka did you changed any of the standard settings for ESP flashing? I simply updated ESP8266 library and reflashed, but I get an reboot loop. In the serial monitor I see:

                      0‚~?–4“Ò¶£ÿOAaû0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
                      0;255;3;0;9;Radio init successful.
                      scandone
                      state: 0 -> 2 (b0)
                      state: 2 -> 3 (0)
                      state: 3 -> 5 (10)
                      add 0
                      aid 2
                      cnt 
                      
                      connected with mDjEKlujYacByG5JtxlY, channel 1
                      ip:192.168.38.19,mask:255.255.255.0,gw:192.168.38.1
                      .IP: 192.168.38.19
                      ¥üÊæ” ×Åü1¤ñþ0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
                      0;255;3;0;9;Radio init successful.
                      scandone
                      state: 0 -> 2 (b0)
                      

                      When going back to 2.0.0 it works without problems. Here my settings for flashing:
                      0_1460916775416_flashing-nodeMCU.png

                      tekkaT Offline
                      tekkaT Offline
                      tekka
                      Admin
                      wrote on last edited by
                      #11

                      @Anduril I'm using the NodeMCU 1.0 (ESP-12E Module) settings / ESP 2.1.0 lib / and the latest MySensors dev (including PR#419 - there was indeed a rebooting issue before #419)...

                      1 Reply Last reply
                      0
                      • AndurilA Offline
                        AndurilA Offline
                        Anduril
                        wrote on last edited by
                        #12

                        thanks a lot, working with newest dev build and ESP8266 lib version 2.1.0 as you said.

                        tekkaT 1 Reply Last reply
                        0
                        • AndurilA Anduril

                          thanks a lot, working with newest dev build and ESP8266 lib version 2.1.0 as you said.

                          tekkaT Offline
                          tekkaT Offline
                          tekka
                          Admin
                          wrote on last edited by
                          #13

                          @Anduril excellent! Have fun :)

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Rasenheizung
                            wrote on last edited by Rasenheizung
                            #14

                            I'm trying to use the serial monitor but I'm always ask entering a password? Although I didn't used one?

                            Reflashing sketch via OTA worked without any issues.

                            Edit: Tried to use a real OTA password and it's still not working although I'm using the correct. ESP8266 Tools 2.2.0

                            1 Reply Last reply
                            0
                            • AndurilA Offline
                              AndurilA Offline
                              Anduril
                              wrote on last edited by
                              #15

                              to my last knowledge this feature is implemented but not working. If you want to see the serial monitor you have to connect physically.

                              NeverDieN 1 Reply Last reply
                              1
                              • AndurilA Anduril

                                to my last knowledge this feature is implemented but not working. If you want to see the serial monitor you have to connect physically.

                                NeverDieN Offline
                                NeverDieN Offline
                                NeverDie
                                Hero Member
                                wrote on last edited by
                                #16

                                @Anduril

                                Regarding the bootloops: how you structure your code seems to have an effect. If you have busy-waits in your code, you're more likely to encounter the WDT timeout. I restructured my code to be more interrupt driven and to complete more frequent cycles through the main loop(). After doing that, the WDT timeouts stopped.

                                That said, I don't know whether your bootloop is caused by a WDT timeout or something else. At least in my case, the debug messages being printed in the serial window specifically mentioned WDT being involved.

                                1 Reply Last reply
                                0
                                • Mark SwiftM Offline
                                  Mark SwiftM Offline
                                  Mark Swift
                                  wrote on last edited by
                                  #17

                                  I presume debugging via network is not supported, I read some posts on Github but couldn't be sure if it was implemented?

                                  NeverDieN 1 Reply Last reply
                                  0
                                  • Mark SwiftM Mark Swift

                                    I presume debugging via network is not supported, I read some posts on Github but couldn't be sure if it was implemented?

                                    NeverDieN Offline
                                    NeverDieN Offline
                                    NeverDie
                                    Hero Member
                                    wrote on last edited by
                                    #18

                                    @Mark-Swift

                                    By debugging, do you mean looking at the serial console output over the network, or something else?

                                    Mark SwiftM 1 Reply Last reply
                                    0
                                    • NeverDieN NeverDie

                                      @Mark-Swift

                                      By debugging, do you mean looking at the serial console output over the network, or something else?

                                      Mark SwiftM Offline
                                      Mark SwiftM Offline
                                      Mark Swift
                                      wrote on last edited by
                                      #19

                                      @NeverDie said:

                                      @Mark-Swift

                                      By debugging, do you mean looking at the serial console output over the network, or something else?

                                      Yes, serial monitor via network within IDE...

                                      1 Reply Last reply
                                      0
                                      • mfalkviddM Offline
                                        mfalkviddM Offline
                                        mfalkvidd
                                        Mod
                                        wrote on last edited by
                                        #20

                                        I haven't tried it yet but this plugin for serial monitor over network looks nice https://github.com/esp8266/Arduino/issues/1360

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


                                        12

                                        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