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.
  • A Offline
    A Offline
    andreground
    wrote on last edited by andreground
    #47

    @tekka

    First of all, thanks for working so hard on the new version of the BL.

    My setup:

    • MYSBootloader 1.3.0-beta3 (md5 49ef3dc263110613c9c25ac21a8c3d83)
    • MYSController 1.0.0.beta (updated to latest version)
    • GW on Arduino Nano
    • Node on Arduino Pro Mini @ 5V 16 Mhz with MockMySensors sketch running

    What I did:

    • Flashed latest bootloader version from github on the Pro Mini ATMEGA328P (using AVRDUDESS 2.4 & USBasp, fuses L: 0xFF, H: 0xDA, E: 0x05)
    • Flashed latest mysensors lib on both node & gw (tested with both 2.0.0 & 2.1) on the Nano

    What I got:

    • FW upgrade through MYSController: Working
    • Reboot through MYSController: Working
    • Serial flashing with Arduino IDE: Working
    • Request presentation through MYSController: Working
      Request heartbeat through MYSController: Working

    But...

    Reassign ID through MYSController: NOT WORKING (the node reboots but still preserves the old ID)
    (MY_NODE_ID IS NOT DEFINED / THUS SET AS AUTO AS PER MYSENSORS DEFAULTS)
    Clear EEPROM through MYSController: NOT WORKING (the node reboots but still holds the value saved in EEPROM using saveState)

    Node bootlog after Clear EEPROM from MYSBootloader (you can see my debug LOADSTATE which still loads the value 123 from EEPROM):

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=4)
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 150-150-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
    TSP:MSG:BC
    TSP:MSG:READ 0-0-4 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=4)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-4 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    GW Started
    LOADSTATE
    123
    

    And...is it expected that the "Info" tab on my node shows bootloader version 1.2?

    0_1485283480870_Schermata 2017-01-24 alle 19.43.36.png

    Is there anything I'm missing to have these features working?

    Thanks in advance

    tekkaT 1 Reply Last reply
    0
    • A andreground

      @tekka

      First of all, thanks for working so hard on the new version of the BL.

      My setup:

      • MYSBootloader 1.3.0-beta3 (md5 49ef3dc263110613c9c25ac21a8c3d83)
      • MYSController 1.0.0.beta (updated to latest version)
      • GW on Arduino Nano
      • Node on Arduino Pro Mini @ 5V 16 Mhz with MockMySensors sketch running

      What I did:

      • Flashed latest bootloader version from github on the Pro Mini ATMEGA328P (using AVRDUDESS 2.4 & USBasp, fuses L: 0xFF, H: 0xDA, E: 0x05)
      • Flashed latest mysensors lib on both node & gw (tested with both 2.0.0 & 2.1) on the Nano

      What I got:

      • FW upgrade through MYSController: Working
      • Reboot through MYSController: Working
      • Serial flashing with Arduino IDE: Working
      • Request presentation through MYSController: Working
        Request heartbeat through MYSController: Working

      But...

      Reassign ID through MYSController: NOT WORKING (the node reboots but still preserves the old ID)
      (MY_NODE_ID IS NOT DEFINED / THUS SET AS AUTO AS PER MYSENSORS DEFAULTS)
      Clear EEPROM through MYSController: NOT WORKING (the node reboots but still holds the value saved in EEPROM using saveState)

      Node bootlog after Clear EEPROM from MYSBootloader (you can see my debug LOADSTATE which still loads the value 123 from EEPROM):

      Starting sensor (RNNNA-, 2.0.0)
      TSM:INIT
      TSM:RADIO:OK
      TSP:ASSIGNID:OK (ID=4)
      TSM:FPAR
      TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSP:MSG:READ 150-150-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      TSP:MSG:BC
      TSP:MSG:READ 0-0-4 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSP:MSG:FPAR RES (ID=0, dist=0)
      TSP:MSG:PAR OK (ID=0, dist=1)
      TSM:FPAR:OK
      TSM:ID
      TSM:CHKID:OK (ID=4)
      TSM:UPL
      TSP:PING:SEND (dest=0)
      TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
      TSP:MSG:READ 0-0-4 s=255,c=3,t=25,pt=1,l=1,sg=0:1
      TSP:MSG:PONG RECV (hops=1)
      TSP:CHKUPL:OK
      TSM:UPL:OK
      TSM:READY
      GW Started
      LOADSTATE
      123
      

      And...is it expected that the "Info" tab on my node shows bootloader version 1.2?

      0_1485283480870_Schermata 2017-01-24 alle 19.43.36.png

      Is there anything I'm missing to have these features working?

      Thanks in advance

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

      @andreground Yes, re-assigning can be done nowadays with the MySensors framework, i.e. send a C_INTERNAL/I_ID_RESPONSE/<NEW ID> message to the (active) node.

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

        @tekka is it okay to use the bootloader on the gateway?

        tekkaT 1 Reply Last reply
        0
        • Mark SwiftM Mark Swift

          @tekka is it okay to use the bootloader on the gateway?

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

          @Mark-Swift That depends on the use case - what do you have in mind?

          Mark SwiftM 1 Reply Last reply
          0
          • tekkaT tekka

            @Mark-Swift That depends on the use case - what do you have in mind?

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

            @tekka I'd like to put my gateway in quite an isolated place and update the sketches OTA, but I presume that's not possible as without the gateway live, there's nothing to action the OTA :(

            I've tried the ESP as it allows OTA updates, but the ESP still has blocking code and it can't handle all my nodes without dropping messages.

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

              I don't know if it the right place to ask, but I am planning to make a wired sensor network (I already have cables) like an RS485 or whatever better technology, so is there any good solution to implement OTA updates? Thanks

              1 Reply Last reply
              0
              • tekkaT tekka

                @andreground Yes, re-assigning can be done nowadays with the MySensors framework, i.e. send a C_INTERNAL/I_ID_RESPONSE/<NEW ID> message to the (active) node.

                A Offline
                A Offline
                andreground
                wrote on last edited by
                #53

                @tekka thanks, it works.

                2 more questions:

                1. Should the clearing eeprom function in MYSBootloader be working?
                2. From what I understand, Watchdog is enabled by default (8S timeout) in the bootloader; that means that I've to either call wdt_reset in my loop or call wdt_disable in setup to prevent unexpected reboots. Am i right?
                tekkaT Mark SwiftM 2 Replies Last reply
                0
                • A andreground

                  @tekka thanks, it works.

                  2 more questions:

                  1. Should the clearing eeprom function in MYSBootloader be working?
                  2. From what I understand, Watchdog is enabled by default (8S timeout) in the bootloader; that means that I've to either call wdt_reset in my loop or call wdt_disable in setup to prevent unexpected reboots. Am i right?
                  tekkaT Offline
                  tekkaT Offline
                  tekka
                  Admin
                  wrote on last edited by
                  #54

                  @andreground said in MYSBootloader 1.3.0-beta.3:

                  @tekka thanks, it works.

                  2 more questions:

                  1. Should the clearing eeprom function in MYSBootloader be working?

                  No, this has also been moved to the MySensors framework:

                  Add:

                  If MY_DEBUG is disabled, you can add

                  #define MY_SPECIAL_DEBUG
                  

                  and then send a C_INTERNAL / I_DEBUG / E to the node. For the sake of completeness, here are the special debug commands:

                  E: Clear EEPROM (node replies with OK and reboots)
                  V: Report CPU voltage in mV (if supported)
                  F: Report frequency in cHz
                  M: Report free memory
                  R: Report routing table (if node is a repeater/gateway)

                  1. From what I understand, Watchdog is enabled by default (8S timeout) in the bootloader; that means that I've to either call wdt_reset in my loop or call wdt_disable in setup to prevent unexpected reboots. Am i right?

                  wdt_reset() is called within the framework, so no need to call it unless you have blocking code of >8s. Alternatively, you can also disable it (AVR: if the wdton fuse is cleared).

                  1 Reply Last reply
                  0
                  • A andreground

                    @tekka thanks, it works.

                    2 more questions:

                    1. Should the clearing eeprom function in MYSBootloader be working?
                    2. From what I understand, Watchdog is enabled by default (8S timeout) in the bootloader; that means that I've to either call wdt_reset in my loop or call wdt_disable in setup to prevent unexpected reboots. Am i right?
                    Mark SwiftM Offline
                    Mark SwiftM Offline
                    Mark Swift
                    wrote on last edited by
                    #55

                    @tekka

                    I've never used the clear EEPROM feature but would like to.

                    I've added:

                    #define MY_SPECIAL_DEBUG
                    

                    To my sketches. Using the latest MYSController, will the menu option 'Clear EEPROM' still do the trick, or does the application need some updates?

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jacikaas
                      wrote on last edited by
                      #56

                      Hi,

                      Is there going to be 1 and 8MHz MySBootloader hex files? :)

                      Thanks!

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jkandasa
                        Plugin Developer
                        wrote on last edited by
                        #57

                        @tekka, I tested this bootloader and facing an issue.
                        https://github.com/mysensors/MySensorsBootloaderRF24/issues/7

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

                          How do I do a remote reboot of a node? Node is not responding to MYSController command (I think due to changed things as with reassigning node-ID). DO I have to write a receive event or enable it somehow? Node is sleeping most time, maybe that's a problem.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Samuel235
                            Hardware Contributor
                            wrote on last edited by Samuel235
                            #59

                            I'm very interested in testing your development for the latest MYSBootloader as the bootloader for OTA updates on my new hardware designs that i'm starting to design, but i would like a stable one first to make sure my system and setup are working fine with the stable. Is the stable bootloader the one in the master branch of https://github.com/mysensors/MySensorsBootloaderRF24/tree/master. The MYSBootloader.hex file or does this still need to be compiled for use?

                            Or do you happen to have a download link for the stable version, should we be using the one that you bundle together with MYSController?

                            Also, @tekka - Do you advise a stable one that works for MyController.org please?

                            MySensors 2.1.1
                            Controller - OpenHAB (Virtual Machine)
                            Gateway - Arduino Mega MQTT Gateway W5100

                            1 Reply Last reply
                            0
                            • Nicolas CharrierN Offline
                              Nicolas CharrierN Offline
                              Nicolas Charrier
                              wrote on last edited by
                              #60

                              With this bootloader, i can not upload scetch with serial or USB.
                              Where does i made a mistake?
                              Is there a configuration that is specific to the bootloader?
                              Thanks

                              tekkaT 1 Reply Last reply
                              0
                              • Nicolas CharrierN Nicolas Charrier

                                With this bootloader, i can not upload scetch with serial or USB.
                                Where does i made a mistake?
                                Is there a configuration that is specific to the bootloader?
                                Thanks

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

                                @Nicolas-Charrier Welcome to MySensors. Please do not post the same question in different threads. Maybe you can give additional information that help to understand what you tried so far (logs, screenshots, HW configuration, CPU frequency, etc.). Did you follow the OTA/bootloader instructions here?

                                Nicolas CharrierN AffordableTechA 2 Replies Last reply
                                1
                                • tekkaT tekka

                                  @Nicolas-Charrier Welcome to MySensors. Please do not post the same question in different threads. Maybe you can give additional information that help to understand what you tried so far (logs, screenshots, HW configuration, CPU frequency, etc.). Did you follow the OTA/bootloader instructions here?

                                  Nicolas CharrierN Offline
                                  Nicolas CharrierN Offline
                                  Nicolas Charrier
                                  wrote on last edited by
                                  #62

                                  @tekka
                                  I can now program my board with serial line. It's work perfectly.
                                  It's an issue with my serial converteur and an usb hub. The usb hub add a delay that is not compatible with the bootloader.
                                  Sorry for the question.
                                  Nico

                                  tekkaT 1 Reply Last reply
                                  0
                                  • Nicolas CharrierN Nicolas Charrier

                                    @tekka
                                    I can now program my board with serial line. It's work perfectly.
                                    It's an issue with my serial converteur and an usb hub. The usb hub add a delay that is not compatible with the bootloader.
                                    Sorry for the question.
                                    Nico

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

                                    @Nicolas-Charrier Good to know, thanks for your feedback :)

                                    1 Reply Last reply
                                    0
                                    • kk02067K Offline
                                      kk02067K Offline
                                      kk02067
                                      wrote on last edited by
                                      #64

                                      Excuse me for beeing an idiot. But how do you compile the bootloader from source? Do you do it from Atmel studio or from Arduino IDE. And how is it done? When I compile it in Atmel studio it gets an base adress of 0x0000 which is wrong.

                                      I am used to program in assembler in Atmel studio and when I program in C i don't touch anyting else than the .c file. So some form of tutorial kind of thing would be helpful.

                                      Thank you

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        rvweert
                                        wrote on last edited by
                                        #65

                                        Hey all,

                                        I've compiled the bootloader and was able to install it with Arduino as ISP to a Nano. I couldn't find the lines necessary for the Nano in boards.txt so I created this:

                                        ##############################################################
                                        
                                        nanomysbootloader.name=Arduino Nano MYSBootloader
                                        
                                        nanomysbootloader.upload.tool=avrdude
                                        nanomysbootloader.upload.protocol=arduino
                                        
                                        nanomysbootloader.bootloader.tool=avrdude
                                        nanomysbootloader.bootloader.unlock_bits=0x3F
                                        nanomysbootloader.bootloader.lock_bits=0x0F
                                        
                                        nanomysbootloader.build.f_cpu=16000000L
                                        nanomysbootloader.build.board=AVR_NANO
                                        nanomysbootloader.build.core=arduino
                                        nanomysbootloader.build.variant=eightanaloginputs
                                        
                                        ## Arduino Nano w/ ATmega328
                                        ## -------------------------
                                        nanomysbootloader.menu.cpu.atmega328=ATmega328
                                        
                                        nanomysbootloader.menu.cpu.atmega328.upload.maximum_size=30720
                                        nanomysbootloader.menu.cpu.atmega328.upload.maximum_data_size=2048
                                        nanomysbootloader.menu.cpu.atmega328.upload.speed=115200
                                        
                                        nanomysbootloader.menu.cpu.atmega328.bootloader.low_fuses=0xFF
                                        nanomysbootloader.menu.cpu.atmega328.bootloader.high_fuses=0xDA
                                        nanomysbootloader.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
                                        nanomysbootloader.menu.cpu.atmega328.bootloader.file=MySensors/MYSBootloader.hex
                                        nanomysbootloader.menu.cpu.atmega328.build.mcu=atmega328p
                                        
                                        

                                        Is this correct? Besides, on some devices I cannot program over serial anymore now, only through another ISP. Could that be caused by incorrect settings? Is it possible to recover from that?
                                        The error I'm getting is this one:
                                        avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x32

                                        Thanks and happy easter!
                                        Rene

                                        1 Reply Last reply
                                        0
                                        • tekkaT tekka

                                          @Nicolas-Charrier Welcome to MySensors. Please do not post the same question in different threads. Maybe you can give additional information that help to understand what you tried so far (logs, screenshots, HW configuration, CPU frequency, etc.). Did you follow the OTA/bootloader instructions here?

                                          AffordableTechA Offline
                                          AffordableTechA Offline
                                          AffordableTech
                                          wrote on last edited by
                                          #66

                                          Hi All,

                                          I'm currently upgrading to MySensors 2.0.0 and it would make sense to change over to the MYSBootloader as I upgrade each node. (I'd like to be able to use the remote re-boot command from MYSController).

                                          I have been reading about the MYSBootloader and have some questions . . .

                                          Q1 - My nodes are a mixture of Pro-Micro's, Leonardo's, Mega 2560's and the odd UNO. From what I can see, the MYSbootloader.hex file is for the Mega328p, is this correct, or can the same bootloader be adjusted (fuse settings etc) for others like the Leonardo processor?

                                          Q2 - One post I read seemed to imply that to use the remote reboot feature you needed 'either' the MYSBootloader OR OptiBoot. In the OptiBoot readme, it doesn't mention reboot as a feature, so I am wondering if it really does support reboot - can anyone please confirm?

                                          Many thanks,

                                          Paul

                                          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