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. Development
  3. MYSBootloader 1.3.0-beta.3

MYSBootloader 1.3.0-beta.3

Scheduled Pinned Locked Moved Development
182 Posts 44 Posters 59.4k Views 42 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.
  • tekkaT Offline
    tekkaT Offline
    tekka
    Admin
    wrote on last edited by
    #157

    Fix: https://github.com/mysensors/MySensorsBootloaderRF24/pull/24
    Thanks for reporting.

    1 Reply Last reply
    3
    • thmT Offline
      thmT Offline
      thm
      wrote on last edited by
      #158

      Hello,
      I am currently testing the OTA features with a "My Slim 2AA Battery Node", MYSBootloader 1.3.0-rc.1, MYSController Build 3316 and the original example sketch "PassiveNode" (MySensors 2.2.0). Unfortunately, no reboot will be performed if I want to execute it via the MYSController. Even with a firmware update, no reboot is performed. If I disconnect the sensor from the battery and reconnect, the firmware update will be executed. Am I doing something wrong or is this a software bug?

      Regards
      Thomas

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #159

        Try using smartsleep instead of usual sleep

        1 Reply Last reply
        0
        • thmT Offline
          thmT Offline
          thm
          wrote on last edited by
          #160

          Hello, thank you. It basically works with smartSleep. I only have to press the FW update or reboot button several times. After several attempts, the desired action is then executed.
          Regards Thomas

          1 Reply Last reply
          0
          • P Offline
            P Offline
            patrikr76
            wrote on last edited by patrikr76
            #161

            Hello.
            First, thanks to everybody developing all the stuff that is here, these are awesome projects and sorry to resurrect an old thread.

            Second, i am trying to use the firmware update feature from MYSController, build 3316, with MYSBootloader, 1.3.0-rc1 8MHz, on a barebone atmega 328pu 28dip .
            The device is running a simple thermistor sketch and reports happily to my RPi running MySensors ethernet gateway version 2.3.1-alpha(I have tried with version 2.2.0 as well).
            I get the "reboot" screen if i choose the firmware after setting the device as a "Board with MYSBootloader" and the device clearly reboots but does not start any firmware download.

            And of course, i am running nrf24l01+. Device is batterypowered from an 18650 li-ion, through a mcp1700 LDO 3.3v 250mA. 10uF on the nrf between vcc and gnd.
            Device is set to sleep for 60 secs, but is also set to smartsleep for 500ms, as i read somewhere had solved other peoples issues.

            Edit: I believe i was being stupid as i first burned the bootloader using arduino as isp and then burned the sketch, alas, erasing bootloader.

            tekkaT 1 Reply Last reply
            0
            • P patrikr76

              Hello.
              First, thanks to everybody developing all the stuff that is here, these are awesome projects and sorry to resurrect an old thread.

              Second, i am trying to use the firmware update feature from MYSController, build 3316, with MYSBootloader, 1.3.0-rc1 8MHz, on a barebone atmega 328pu 28dip .
              The device is running a simple thermistor sketch and reports happily to my RPi running MySensors ethernet gateway version 2.3.1-alpha(I have tried with version 2.2.0 as well).
              I get the "reboot" screen if i choose the firmware after setting the device as a "Board with MYSBootloader" and the device clearly reboots but does not start any firmware download.

              And of course, i am running nrf24l01+. Device is batterypowered from an 18650 li-ion, through a mcp1700 LDO 3.3v 250mA. 10uF on the nrf between vcc and gnd.
              Device is set to sleep for 60 secs, but is also set to smartsleep for 500ms, as i read somewhere had solved other peoples issues.

              Edit: I believe i was being stupid as i first burned the bootloader using arduino as isp and then burned the sketch, alas, erasing bootloader.

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

              @patrikr76 Yes, sounds like you erased MYSBootloader when uploading the sketch via ISP. Please post the MYSController log (starting before you reboot the node until the node is up an running) to verify this assumption.

              1 Reply Last reply
              0
              • berkseoB Offline
                berkseoB Offline
                berkseo
                wrote on last edited by
                #163

                Hello, everyone. Has anyone ever encountered a problem where after a power surge the device on this bootloader stops working? When I first encountered this, I did some tests. They're confirmed. This applies only to network devices. With the battery there are no such problems at all. So I had to switch to DuaiOptiboot. All stable. I do a bit of home programming :) so I don't think the problem is on my side, simple bugs are excluded.

                tekkaT 1 Reply Last reply
                0
                • berkseoB berkseo

                  Hello, everyone. Has anyone ever encountered a problem where after a power surge the device on this bootloader stops working? When I first encountered this, I did some tests. They're confirmed. This applies only to network devices. With the battery there are no such problems at all. So I had to switch to DuaiOptiboot. All stable. I do a bit of home programming :) so I don't think the problem is on my side, simple bugs are excluded.

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

                  @berkseo Can you share additional details regarding your tests, ideally including logs that showed the proper function of the bootloader before the surge and after - what tool are you using for OTA updates?

                  berkseoB 1 Reply Last reply
                  0
                  • scalzS Offline
                    scalzS Offline
                    scalz
                    Hardware Contributor
                    wrote on last edited by scalz
                    #165

                    @berkseo

                    +1 for more details please, regarding hw and the power supply, mcu, fuses too.
                    weird problem.. it works on batt but not on AC?? how do you replicate these power surge?
                    if you have AC powered nodes sensible to power surge, transcient, I would add a TVS diode on the dc power supply side, and I would protect signals if needed. adding some filtering does not hurt too, pcb gnd isolation/shielding plane as well.
                    Because, "even if" there is something related to mys bootloader, it seems also related to surge protection..

                    berkseoB 1 Reply Last reply
                    0
                    • tekkaT tekka

                      @berkseo Can you share additional details regarding your tests, ideally including logs that showed the proper function of the bootloader before the surge and after - what tool are you using for OTA updates?

                      berkseoB Offline
                      berkseoB Offline
                      berkseo
                      wrote on last edited by
                      #166

                      @tekka said in MYSBootloader 1.3.0-beta.3:

                      Can you share additional details regarding your tests, ideally including logs that showed the proper function of the bootloader before the surge and after - what tool are you using for OTA updates?

                      Now not many can to share on the subject. We need to reproduce the problem again. OTA through the Majordomo system. But it's not about the update. The device died during a power surge, a feeling that was in the mode of receiving firmware due to the jump. Only re-recording the bootloader helped restore the device.

                      1 Reply Last reply
                      0
                      • scalzS scalz

                        @berkseo

                        +1 for more details please, regarding hw and the power supply, mcu, fuses too.
                        weird problem.. it works on batt but not on AC?? how do you replicate these power surge?
                        if you have AC powered nodes sensible to power surge, transcient, I would add a TVS diode on the dc power supply side, and I would protect signals if needed. adding some filtering does not hurt too, pcb gnd isolation/shielding plane as well.
                        Because, "even if" there is something related to mys bootloader, it seems also related to surge protection..

                        berkseoB Offline
                        berkseoB Offline
                        berkseo
                        wrote on last edited by berkseo
                        #167

                        @scalz The problem was seen when the voltage surge in the network. It was later reproduced using supercapacitors. Let's try to reproduce the problem as follows: power the unit from 3.3 V, hang the supercapacitor on 1F in parallel and the led on the power through the 1K resistor, wait until the supercapacitor is charged, then wait for the discharge and on the verge of turning off ~ 2V, apply power pulses. I can't debug it right now. Will time will make. Bootloader latest version.
                        There was a filter and a stabilizer. power surges are in principle excluded

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mafe
                          wrote on last edited by
                          #168

                          Hello,
                          can the bootloader also be used on an Atmega32U4? After programming, the Atmega is no longer recognized by the Usb port of the PC. Should programming via the IDE (Arduino, PlatformIO) still be possible or will it only work via MyController?

                          mfalkviddM 1 Reply Last reply
                          0
                          • M mafe

                            Hello,
                            can the bootloader also be used on an Atmega32U4? After programming, the Atmega is no longer recognized by the Usb port of the PC. Should programming via the IDE (Arduino, PlatformIO) still be possible or will it only work via MyController?

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

                            @mafe I don't have experience with FOTA, but this part of the documentation might help:

                            The MySensors master branch does not support upload through ftdi / serial (but the development branch does).

                            But I don't think MYSBootloader has support for Atmega32U4 at all.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mafe
                              wrote on last edited by
                              #170

                              Thanks for your answer!
                              Sorry, I forgot to mention that I want to do FOTA via an MQTT gateway. Is that working at all right now?

                              S 1 Reply Last reply
                              0
                              • M mafe

                                Thanks for your answer!
                                Sorry, I forgot to mention that I want to do FOTA via an MQTT gateway. Is that working at all right now?

                                S Offline
                                S Offline
                                sindrome73
                                wrote on last edited by
                                #171

                                @mafe said in MYSBootloader 1.3.0-beta.3:

                                imenticato di dire che voglio fare FOTA tramite un gateway MQTT. Sta f

                                If I understand OTA well with an MQTT gateway it is not possible. This at least using MYSBootloader

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  Mikhail72
                                  wrote on last edited by
                                  #172

                                  Hello, in one of the devices on mega2560 I want to use MYSBootloader for FOTA. Is this even possible for mega2560?
                                  I changed the MYSBootloader sources for mega2560, the update is on, but it is looping (i.e. it reaches 100% and starts again), I think that the problem is in calculating the CRC of the firmware and I need to fix the static uint16_t calcCRCrom (const uint16_t len) function, but I have lack of knowledge, as I'm not a programmer, but just an amateur. Can someone help or suggest?

                                  P.S. Sorry for my english, it's all google translate

                                  1 Reply Last reply
                                  1
                                  • I Offline
                                    I Offline
                                    iguaan
                                    wrote on last edited by
                                    #173

                                    Hi, have been using myscontroller more than a year now and at some point i couldn't use OTA on devices, all the sensor data is coming in nicely. I don't know if it was due to updated arduino or i messed up something in my doards.txt or something else...
                                    So question is if someone can give me versions/links to working solution?
                                    https://github.com/mysensors/MySensorsBootloaderRF24/tree/development doesn't work.

                                    I'm using ProMini 16Mhz with external oscillator. Arduino is 1.8.13, MySensors 2.2.2,
                                    Myscontroller 1.0.0beta:b3316.

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • I iguaan

                                      Hi, have been using myscontroller more than a year now and at some point i couldn't use OTA on devices, all the sensor data is coming in nicely. I don't know if it was due to updated arduino or i messed up something in my doards.txt or something else...
                                      So question is if someone can give me versions/links to working solution?
                                      https://github.com/mysensors/MySensorsBootloaderRF24/tree/development doesn't work.

                                      I'm using ProMini 16Mhz with external oscillator. Arduino is 1.8.13, MySensors 2.2.2,
                                      Myscontroller 1.0.0beta:b3316.

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

                                      @iguaan "doesn't work" is a bit too vague for us to help. Could you share a bit information on what you did, what you expected to happen and what happened instead?

                                      1 Reply Last reply
                                      0
                                      • I Offline
                                        I Offline
                                        iguaan
                                        wrote on last edited by
                                        #175

                                        That's the problem, i don't know what exactly happened/caused this. That's why i'm asking for working solutions/versions so i can try to trace back what might be wrong with my setup.

                                        Also now i remembered that i had to renew gateway with esp8266 since previous broke down. I don't know for sure that i had previously ota feature for gateway enabled.
                                        GW sketch:

                                        // Enable debug prints to serial monitor
                                        #define MY_DEBUG
                                        
                                        // kui lae peale ei jõua
                                        #define MY_SIGNING_WEAK_SECURITY  //!<  Nodes that present themselves as not requiring signing or whitelisting will be cleared of this requirement at the receiving end.
                                        //#define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
                                        //#define MY_SIGNING_SOFT //!< Software signing
                                        //#define MY_SIGNING_REQUEST_SIGNATURES // Enable this if you want destination node to sign all messages sent to this node.
                                        //#define MY_SIGNING_SOFT_RANDOMSEED_PIN A0 //!< Unconnected analog pin for random seed
                                        
                                        #define MY_RADIO_RF24
                                        #define MY_GATEWAY_ESP8266
                                        #define MY_WIFI_SSID "hidden"
                                        #define MY_WIFI_PASSWORD "hidden"
                                        
                                        // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
                                        #define MY_IP_ADDRESS hidden
                                        //#define MY_CONTROLLER_URL_ADDRESS "my.controller.org"
                                        #define MY_HOSTNAME "hidden"
                                        // If using static ip you need to define Gateway and Subnet address as well
                                        #define MY_IP_GATEWAY_ADDRESS hidden
                                        #define MY_IP_SUBNET_ADDRESS hidden
                                        
                                        // The port to keep open on node server mode
                                        #define MY_PORT hidden
                                        
                                        // How many clients should be able to connect to this gateway (default 1)
                                        #define MY_GATEWAY_MAX_CLIENTS 2
                                        
                                        #include <ArduinoOTA.h>
                                        #include <MySensors.h>
                                        
                                                                      
                                        void setup()
                                        {
                                            Serial.begin(115200);
                                          // Setup locally attached sensors
                                          ArduinoOTA.onStart([]() {
                                            Serial.println("ArduinoOTA start");
                                          });
                                          ArduinoOTA.onEnd([]() {
                                            Serial.println("\nArduinoOTA end");
                                          });
                                          ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
                                            Serial.printf("OTA Progress: %u%%\r", (progress / (total / 100)));
                                          });
                                          ArduinoOTA.onError([](ota_error_t error) {
                                            Serial.printf("Error[%u]: ", error);
                                            if (error == OTA_AUTH_ERROR) {
                                              Serial.println("Auth Failed");
                                            } else if (error == OTA_BEGIN_ERROR) {
                                              Serial.println("Begin Failed");
                                            } else if (error == OTA_CONNECT_ERROR) {
                                              Serial.println("Connect Failed");
                                            } else if (error == OTA_RECEIVE_ERROR) {
                                              Serial.println("Receive Failed");
                                            } else if (error == OTA_END_ERROR) {
                                              Serial.println("End Failed");
                                            }
                                          });
                                          ArduinoOTA.begin();
                                        }
                                        
                                        
                                        void presentation()
                                        {
                                          sendSketchInfo("GW", "1"); // Present locally attached sensors here
                                         
                                        }
                                        
                                        
                                        void loop()
                                        {
                                            // Send locally attached sensors data here
                                          ArduinoOTA.handle();
                                        }
                                        

                                        I remember when i got it first working year(s) ago i tried also different bootloaders, fiddled with fuse settings and eventually got it working perfectly, but now (since i've updated arduino) maybe my board settings are incorrect.

                                        1 Reply Last reply
                                        1
                                        • I Offline
                                          I Offline
                                          iguaan
                                          wrote on last edited by
                                          #176

                                          Well found the problem.
                                          I had also changed gw nrf module to NRF24L01+PA+LNA 2.4GHz:
                                          511ec8a3-c017-4878-831f-ac176dbf5707-image.png and it seems to be the issue.
                                          Although regular traffic monitoring etc is working ok.
                                          Changed back to usual nrf24l01+ module and updates are working again.
                                          Both variants are ali merchandise.

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


                                          16

                                          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