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.3pre2 testing

MYSBootloader 1.3pre2 testing

Scheduled Pinned Locked Moved Development
otamyscontrollermysbootloader
73 Posts 25 Posters 30.6k Views 31 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.
  • Mark SwiftM Offline
    Mark SwiftM Offline
    Mark Swift
    wrote on last edited by
    #4
    This post is deleted!
    1 Reply Last reply
    0
    • NeverDieN Offline
      NeverDieN Offline
      NeverDie
      Hero Member
      wrote on last edited by
      #5

      I read somewhere that there has been a wireless bootloader for the RFM69 "under development" now for some time, and that it can work without using additional external memory chips (such as a winbond memory chip). Is that true, and if so, has the development completed or is it still unreleased?

      1 Reply Last reply
      0
      • tekkaT tekka

        Hi all,
        Here is the second pre-release of MYSBootloader 1.3 for testing purposes.

        Download here. Thanks for your feedback.

        MYSBootloader 1.3pre2 (1.3NS)

        • requires MySensors 2.0.x
        • supports OTA FW AND serial FW updates
        • no external flash needed for OTA FW updates (thus, offline update)
        • communicates via assigned parent node (if found)
        • 2kb bootloader size
        • bootloader commands removed (size constraints, STK500 code instead)
        • nRF24 (Channel 76, base address 0xA8A8E1FC00, data rate 250kbs)
        • serial uploads: 115200 baud (16Mhz), 38400 (8Mhz) or 9600 (1Mhz)

        Using Arduino IDE 1.6.12:

        Add these lines (or copy from included add_to_boards.txt file) to the boards.txt file in your Arduino IDE installation folder:

        
        ##############################################################
        
        MYSBL13.name=ATmega328 with MYSBootloader
        
        MYSBL13.upload.tool=avrdude
        MYSBL13.upload.protocol=arduino
        
        MYSBL13.bootloader.tool=avrdude
        MYSBL13.bootloader.unlock_bits=0x3F
        MYSBL13.bootloader.lock_bits=0x0F
        
        MYSBL13.build.mcu=atmega328p
        MYSBL13.build.board=AVR_PRO
        MYSBL13.build.core=arduino
        MYSBL13.build.variant=standard
        
        ## Arduino with MYSBootloader 1.3pre
        ## -------------------------------------------------
        MYSBL13.menu.cpu.16MHzatmega328=ATmega328 16MHz (XTAL, BOD1V8)
        MYSBL13.menu.cpu.16MHzatmega328.upload.maximum_size=30720
        MYSBL13.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
        MYSBL13.menu.cpu.16MHzatmega328.upload.speed=115200
        MYSBL13.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
        MYSBL13.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
        MYSBL13.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x06
        MYSBL13.menu.cpu.16MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_16Mhz.hex
        MYSBL13.menu.cpu.16MHzatmega328.build.mcu=atmega328p
        MYSBL13.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
        
        MYSBL13.menu.cpu.8MHzatmega328=ATmega328 8MHz (RC, BOD1V8)
        MYSBL13.menu.cpu.8MHzatmega328.upload.maximum_size=30720
        MYSBL13.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
        MYSBL13.menu.cpu.8MHzatmega328.upload.speed=38400
        MYSBL13.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xE2
        MYSBL13.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
        MYSBL13.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0x06
        MYSBL13.menu.cpu.8MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_8Mhz.hex
        MYSBL13.menu.cpu.8MHzatmega328.build.mcu=atmega328p
        MYSBL13.menu.cpu.8MHzatmega328.build.f_cpu=8000000L
        
        MYSBL13.menu.cpu.1MHzatmega328=ATmega328 1MHz (RC/8, BOD1V8)
        MYSBL13.menu.cpu.1MHzatmega328.upload.maximum_size=30720
        MYSBL13.menu.cpu.1MHzatmega328.upload.maximum_data_size=2048
        MYSBL13.menu.cpu.1MHzatmega328.upload.speed=9600
        MYSBL13.menu.cpu.1MHzatmega328.bootloader.low_fuses=0x62
        MYSBL13.menu.cpu.1MHzatmega328.bootloader.high_fuses=0xDA
        MYSBL13.menu.cpu.1MHzatmega328.bootloader.extended_fuses=0x06
        MYSBL13.menu.cpu.1MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_1Mhz.hex
        MYSBL13.menu.cpu.1MHzatmega328.build.mcu=atmega328p
        MYSBL13.menu.cpu.1MHzatmega328.build.f_cpu=1000000L
        
        ##############################################################
        

        Please read this excellent guide written by @scalz about MySensors OTA programming.

        In brief:

        Copy bootloader *.hex files (from Bootloader folder) to the [Arduino IDE installation folder]/hardware/arduino/avr/bootloaders/MYSBootloader/

        Restart Arduino IDE, choose under Tools | Board | ATmega328 with MYSBootloader |, select correct board under Processor tab. Connect USBasp to sensor node and select Tools | Programmer | USBasp and hit "Burn Bootloader"
        Please use the AVR fuse calculator to retrieve the individual fuse settings. If you need to change frequency, BOD or other settings, change the fuse settings based on the fuse calculator.

        OTA FW updates using MYSController 3315 (included) (refer to @scalz's guide):

        Copy Arduino FW .hex file to MYSController/Firmware folder and edit firmware_config.csv file according to the existing lines.

        Hit "Refresh Repo" in MYSController and the newly copied firmware should appear in the Assign FW dropdown list, ready to be uploaded.

        Read this thread for discussions on MYSBootloader 1.3pre1

        Have fun!

        RedferneR Offline
        RedferneR Offline
        Redferne
        wrote on last edited by
        #6

        @tekka

        Finally some action here again! Yeah!
        Any chance we can get our hands on the source so that we can change channels/power and finetune led status and such?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mannkind
          wrote on last edited by mannkind
          #7
          This post is deleted!
          jmkhaelJ 1 Reply Last reply
          0
          • tekkaT tekka

            @NiklasO you can use the internal RC oscillator (that is 8Mhz), no need to use external XTAL. For AVR fuse calculator, refer to http://www.engbedded.com/fusecalc/ or http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega328p and the documentation therein.

            NiklasON Offline
            NiklasON Offline
            NiklasO
            wrote on last edited by NiklasO
            #8

            @tekka said:

            @NiklasO you can use the internal RC oscillator (that is 8Mhz), no need to use external XTAL. For AVR fuse calculator, refer to http://www.engbedded.com/fusecalc/ or http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega328p and the documentation therein.

            I don't understand the fusecalc yet. I don't know all the terms used on that calc page or how it really works but I'm learning I guess. ;) The Pro Mini clones i got from eBay has this extremely small external 8 MHz (for 3.3V) and 16MHz (for 5V) crystal/oscillator/resonator or what they are called. Why is it there if not needed? Genuine interested here.

            1 Reply Last reply
            0
            • NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by
              #9

              So, I gather there is no RFM69 version?

              1 Reply Last reply
              0
              • M mannkind

                This post is deleted!

                jmkhaelJ Offline
                jmkhaelJ Offline
                jmkhael
                wrote on last edited by
                #10

                @mannkind what other software do you use for ota firmware update?
                thanks

                M 1 Reply Last reply
                0
                • NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by
                  #11

                  Not getting an answer here. Should I be asking the question somewhere else?

                  1 Reply Last reply
                  0
                  • jmkhaelJ jmkhael

                    @mannkind what other software do you use for ota firmware update?
                    thanks

                    M Offline
                    M Offline
                    mannkind
                    wrote on last edited by
                    #12
                    This post is deleted!
                    jmkhaelJ 1 Reply Last reply
                    1
                    • M mannkind

                      This post is deleted!

                      jmkhaelJ Offline
                      jmkhaelJ Offline
                      jmkhael
                      wrote on last edited by
                      #13

                      @mannkind thank you for your reply. I don't want to get you in trouble regarding the rules. i don't feel it is against the rules to promote open source or contribution around mysensors if it makes the journey more enjoyable. maybe a mod or admin can pitch in and clarify in any case.
                      I understand that the gateway role is to open up integration with other controllers (and we have quite many thanks to that)
                      The problem i am trying to wrap my head around is to have mysensors network attached to my current controller, and ideally be able to update over the air the sketches. how can i begin doing that? i am ready to use 2 or more controller (mycontroller or myscontroller or...), 2 ore more gateways and even maybe have the nodes on two different rf channels.

                      Basically, what is the recommended way to achieve that, while having for the time being at least, another controller attached.?

                      1 Reply Last reply
                      0
                      • Velo17V Offline
                        Velo17V Offline
                        Velo17
                        wrote on last edited by
                        #14

                        Hello! Will there be a chance to change the radio channel used for the bootloader OTA process?

                        1 Reply Last reply
                        0
                        • jmkhaelJ Offline
                          jmkhaelJ Offline
                          jmkhael
                          wrote on last edited by jmkhael
                          #15

                          @mannkind : thank you for your message. I'll give that a go later on.

                          @tekka , @anyone :)
                          I am trying to make this work using MYSController (from MYSBootloader_V13pre2/). I've followed the instructions above from @tekka, but it feels like the OTA process kicks around quite quick, then it seems to block in a loop

                           [2016-10-17 23:09:29.821 Info] RX	1;255;4;0;0;0A0001005000D4460102
                           [2016-10-17 23:09:29.821 Info] INFO	BL version=258
                           [2016-10-17 23:09:29.821 Info] INFO	Send FW info to node 1: type=A, version=1, blocks=0x0050, CRC=0x46D4
                           [2016-10-17 23:09:29.822 Info] TX	1;0;4;0;1;0A0001005000D446
                          

                          I'll try to keep it going all night, but here are my full log till now.
                          Any idea what is going wrong?
                          0_1476738954886_MySensors_20161017-230018.log

                          M tekkaT 2 Replies Last reply
                          0
                          • jmkhaelJ jmkhael

                            @mannkind : thank you for your message. I'll give that a go later on.

                            @tekka , @anyone :)
                            I am trying to make this work using MYSController (from MYSBootloader_V13pre2/). I've followed the instructions above from @tekka, but it feels like the OTA process kicks around quite quick, then it seems to block in a loop

                             [2016-10-17 23:09:29.821 Info] RX	1;255;4;0;0;0A0001005000D4460102
                             [2016-10-17 23:09:29.821 Info] INFO	BL version=258
                             [2016-10-17 23:09:29.821 Info] INFO	Send FW info to node 1: type=A, version=1, blocks=0x0050, CRC=0x46D4
                             [2016-10-17 23:09:29.822 Info] TX	1;0;4;0;1;0A0001005000D446
                            

                            I'll try to keep it going all night, but here are my full log till now.
                            Any idea what is going wrong?
                            0_1476738954886_MySensors_20161017-230018.log

                            M Offline
                            M Offline
                            mannkind
                            wrote on last edited by
                            #16
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • jmkhaelJ jmkhael

                              @mannkind : thank you for your message. I'll give that a go later on.

                              @tekka , @anyone :)
                              I am trying to make this work using MYSController (from MYSBootloader_V13pre2/). I've followed the instructions above from @tekka, but it feels like the OTA process kicks around quite quick, then it seems to block in a loop

                               [2016-10-17 23:09:29.821 Info] RX	1;255;4;0;0;0A0001005000D4460102
                               [2016-10-17 23:09:29.821 Info] INFO	BL version=258
                               [2016-10-17 23:09:29.821 Info] INFO	Send FW info to node 1: type=A, version=1, blocks=0x0050, CRC=0x46D4
                               [2016-10-17 23:09:29.822 Info] TX	1;0;4;0;1;0A0001005000D446
                              

                              I'll try to keep it going all night, but here are my full log till now.
                              Any idea what is going wrong?
                              0_1476738954886_MySensors_20161017-230018.log

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

                              @jmkhael Looks like a bad radio connection (GW too close / far, interference, power) What happens if you upload the FW via serial link?

                              jmkhaelJ 1 Reply Last reply
                              1
                              • tekkaT tekka

                                @jmkhael Looks like a bad radio connection (GW too close / far, interference, power) What happens if you upload the FW via serial link?

                                jmkhaelJ Offline
                                jmkhaelJ Offline
                                jmkhael
                                wrote on last edited by
                                #18

                                @mannkind : thanks for the clarifications. My problem is that the node seems to hang at the booting phase in MYSController sa per the screenshot.

                                @tekka that should be it (gw in the 50 cm range). I'll try more tests and get back here in any case.

                                @mannkind, @tekka: How do we interpret the OTA logs?

                                0_1476786275039_MYSController 1.0.png

                                jmkhaelJ 1 Reply Last reply
                                0
                                • jmkhaelJ jmkhael

                                  @mannkind : thanks for the clarifications. My problem is that the node seems to hang at the booting phase in MYSController sa per the screenshot.

                                  @tekka that should be it (gw in the 50 cm range). I'll try more tests and get back here in any case.

                                  @mannkind, @tekka: How do we interpret the OTA logs?

                                  0_1476786275039_MYSController 1.0.png

                                  jmkhaelJ Offline
                                  jmkhaelJ Offline
                                  jmkhael
                                  wrote on last edited by
                                  #19

                                  @tekka: it was probably a mix of power/distance. when change these two parameters, OTA went fine. thank you

                                  What is the best way to handle OTA for sleeping nodes? is there something else todo besides setting the property under settings in MYSController? Do I need to powercycle the node or will MYSController kicks in when the node sleeps/smartSleeps?
                                  thank you for your time

                                  tekkaT 1 Reply Last reply
                                  1
                                  • jmkhaelJ jmkhael

                                    @tekka: it was probably a mix of power/distance. when change these two parameters, OTA went fine. thank you

                                    What is the best way to handle OTA for sleeping nodes? is there something else todo besides setting the property under settings in MYSController? Do I need to powercycle the node or will MYSController kicks in when the node sleeps/smartSleeps?
                                    thank you for your time

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

                                    @jmkhael MYSController will reboot the node as soon as it wakes up, sends and processes incoming messages.

                                    jmkhaelJ 1 Reply Last reply
                                    1
                                    • tekkaT tekka

                                      @jmkhael MYSController will reboot the node as soon as it wakes up, sends and processes incoming messages.

                                      jmkhaelJ Offline
                                      jmkhaelJ Offline
                                      jmkhael
                                      wrote on last edited by
                                      #21

                                      @tekka my node wakes up every two minutes (or on pir movement) sends some messages (temperature, light level...) and sleeps right away. will MYSController be able to do that in this small time window? is there something i can code to help it? (heartBeat, wait, smartSomething?)
                                      (as i saw during my few tests, i had to powercycle my node, maybe i wasn't patient enough :))

                                      tekkaT 1 Reply Last reply
                                      0
                                      • jmkhaelJ jmkhael

                                        @tekka my node wakes up every two minutes (or on pir movement) sends some messages (temperature, light level...) and sleeps right away. will MYSController be able to do that in this small time window? is there something i can code to help it? (heartBeat, wait, smartSomething?)
                                        (as i saw during my few tests, i had to powercycle my node, maybe i wasn't patient enough :))

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

                                        @jmkhael place smartSleep() instead of sleep(), before sending any values to the controller - MYSController will pick this up and send a reboot command. Also, you need to mark the node as battery-powered/sleeping node...

                                        1 Reply Last reply
                                        0
                                        • JCLBJ Offline
                                          JCLBJ Offline
                                          JCLB
                                          wrote on last edited by JCLB
                                          #23

                                          Just tried with this release, works great (had no problem with previous release)

                                          The only drawback is the packet bitrate, around 40 per minute with 45 bytes each.
                                          It takes 1h to flash a node. few minutes, just make sure of your wiring as this is a very intensive process compared to node's standard radio use.

                                          Here is a flash running on a test network:

                                          snip

                                          Can we update many nodes at the same time ? haven't tried

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


                                          19

                                          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