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. 💬 FOTA (Wireless Programming)

💬 FOTA (Wireless Programming)

Scheduled Pinned Locked Moved Announcements
wirelessupdateover the airsensebenderfotafirmware over the airwireless programming
130 Posts 46 Posters 31.6k Views 44 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.
  • mfalkviddM Offline
    mfalkviddM Offline
    mfalkvidd
    Mod
    wrote on last edited by
    #108

    I guess the main hurdle would be that while MySensors stores the node id in eeprom today, the nrf channel is not stored in eeprom. Since bootloader and sketch use the same eeprom, there would have to be some sort of agreement on where to store the channel.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jimmy loyens
      wrote on last edited by
      #109

      Hello, I have my MySensors gateway permanently attached to my openhab server (RPI3), but i want to do FOTA uploads from my desktop. How do I do this since MYSController needs to attatch to a gateway? Can i use an other gateway, both with the same address (ID0)? Thanks

      1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @guillermo-schimmel not always, but by default. To change the channel, the bootloader must be recompiled. I have added a note to the howto. Could you check if the information is sufficiently clear?

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

        @mfalkvidd Hello.
        From what I read it is possible to somehow modify the channel for OTA updates, this is also said here.
        https://www.mysensors.org/about/fota

        But I can not find other info on how to proceed to change the channel .....
        Can you give me some other clarification or link to follow ???

        G 1 Reply Last reply
        0
        • S sindrome73

          @mfalkvidd Hello.
          From what I read it is possible to somehow modify the channel for OTA updates, this is also said here.
          https://www.mysensors.org/about/fota

          But I can not find other info on how to proceed to change the channel .....
          Can you give me some other clarification or link to follow ???

          G Offline
          G Offline
          Guillermo Schimmel
          wrote on last edited by
          #111

          @sindrome73 You have to recompile the bootloader.

          It's easier than it seems.

          1. Mirror this repo on some machine with devel tools (I use OpenSUSE)

          https://github.com/mysensors/MySensorsBootloaderRF24

          1. Edit the file MYSBootloader.c, only the line:

          #define RF24_CHANNEL (76) // RF channel for the sensor net, 0-127; default 76

          1. Run Make

          Probably it's going to need all the set of avr devel tools. Install them according to your distribution instructions.

          1. You are going to get a .hex. That is the bootloader with the new channel. Install it according the standard instructions. I use AVRDUDESS.

          I can confirm that I did this and it's working great.

          S 1 Reply Last reply
          1
          • G Guillermo Schimmel

            @sindrome73 You have to recompile the bootloader.

            It's easier than it seems.

            1. Mirror this repo on some machine with devel tools (I use OpenSUSE)

            https://github.com/mysensors/MySensorsBootloaderRF24

            1. Edit the file MYSBootloader.c, only the line:

            #define RF24_CHANNEL (76) // RF channel for the sensor net, 0-127; default 76

            1. Run Make

            Probably it's going to need all the set of avr devel tools. Install them according to your distribution instructions.

            1. You are going to get a .hex. That is the bootloader with the new channel. Install it according the standard instructions. I use AVRDUDESS.

            I can confirm that I did this and it's working great.

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

            @guillermo-schimmel Thanks for the reply.
            Very useful, but can you tell me more accurately what software to use to recompile after making the change ????
            Maybe some links to the software to download ..... thanks again for the availability

            G S 2 Replies Last reply
            0
            • S sindrome73

              @guillermo-schimmel Thanks for the reply.
              Very useful, but can you tell me more accurately what software to use to recompile after making the change ????
              Maybe some links to the software to download ..... thanks again for the availability

              G Offline
              G Offline
              Guillermo Schimmel
              wrote on last edited by
              #113

              @sindrome73 You have to use the Make tool, which is going to call the avr-gcc compiler.

              Have you ever compiled something using command line tools?

              If you don't know what I'm talking about, just tell me your channel and I can compile a bootloader for you.

              1 Reply Last reply
              1
              • acbA Offline
                acbA Offline
                acb
                wrote on last edited by
                #114

                Quick question: Should FOTA work with personalized nodes/gateway?

                If the answer should be yes, then I appear to have a problem…

                As soon as I enable signing and signature requesting, the node will no longer respond to any internal or stream commands (e.g. Request Presentation, Reboot, Firmware, etc.) made via @tekka’s MYSController app. I haven’t tried anything else yet.

                The node still happily sends signed sensor data to the gateway and they ping-pong with heartbeats, etc.

                And as soon as I disable signing and signature requesting, the node will respond to all those same commands, quite happily rebooting, updating the firmware, etc.

                So, am I doing something wrong?

                (MYSController Version: 1.0.0beta, b3316. MySensors Library v2.3.1)

                acbA 1 Reply Last reply
                0
                • S sindrome73

                  @guillermo-schimmel Thanks for the reply.
                  Very useful, but can you tell me more accurately what software to use to recompile after making the change ????
                  Maybe some links to the software to download ..... thanks again for the availability

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

                  @sindrome73 Hi Good evening, and I'm sorry for the delay in the reply.
                  As you have never done a Bootloader, if you are kind enough to do it, I thank you.
                  The channel I'm using is the "Channel 84" for now I'm using only the 16MHZ Bootloade, but if you want, the others are fine too.
                  In addition you can give me some starting point to be able to fill in too ??
                  Thanks for your availability, greetings

                  G 1 Reply Last reply
                  0
                  • S sindrome73

                    @sindrome73 Hi Good evening, and I'm sorry for the delay in the reply.
                    As you have never done a Bootloader, if you are kind enough to do it, I thank you.
                    The channel I'm using is the "Channel 84" for now I'm using only the 16MHZ Bootloade, but if you want, the others are fine too.
                    In addition you can give me some starting point to be able to fill in too ??
                    Thanks for your availability, greetings

                    G Offline
                    G Offline
                    Guillermo Schimmel
                    wrote on last edited by Guillermo Schimmel
                    #116

                    @sindrome73 here you have bootloaders for all the channels.

                    https://github.com/guillebot/MYSensors-Bootloaders

                    They are unchanged from default elsewhere. Only RF CHANNEL.

                    G 1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      sindrome73
                      wrote on last edited by
                      #117

                      Hello!! And thank you again ......
                      A really good job, it's something that was definitely missing ......
                      I would suggest to the directors to expand the guide on OTA you better explain the steps to change channels and make a link to your great job !!

                      Now if I understand this and the Bootloader that I have to load on my Arduino Pro-Mini, in practice insert in the path of the IDE of Arduino when I make the updates use that channel

                      As soon as I can I try them and I'll let you know, in a lot of thanks again ......

                      1 Reply Last reply
                      0
                      • acbA acb

                        Quick question: Should FOTA work with personalized nodes/gateway?

                        If the answer should be yes, then I appear to have a problem…

                        As soon as I enable signing and signature requesting, the node will no longer respond to any internal or stream commands (e.g. Request Presentation, Reboot, Firmware, etc.) made via @tekka’s MYSController app. I haven’t tried anything else yet.

                        The node still happily sends signed sensor data to the gateway and they ping-pong with heartbeats, etc.

                        And as soon as I disable signing and signature requesting, the node will respond to all those same commands, quite happily rebooting, updating the firmware, etc.

                        So, am I doing something wrong?

                        (MYSController Version: 1.0.0beta, b3316. MySensors Library v2.3.1)

                        acbA Offline
                        acbA Offline
                        acb
                        wrote on last edited by
                        #118

                        @acb

                        So, I’m answering my own question a little here after digging into the gateway/node logs and code - and so I'm replying to my own post.

                        Should FOTA work with personalized nodes/gateway?

                        Yes, it should and it does. FOTA (and any other internal commands) works with personalization (signed commands) using the MYSController.

                        What doesn’t appear to work is if you’re using smartSleep and asking the MYSController app to trigger sending your internal command upon receiving from the node - in this case, simply a heartbeat from smartSleep.

                        Does that make sense?

                        So, if I don’t sleep the node, I can issue reboots and other internal commands that are signed, no problem.

                        As soon as I switch to using smartSleep(DURATION) instead of wait(DURATION) and ask the MYSController app to trigger sending, for example, an internal reboot command “Upon RX”, then the reboot command never makes it to the node before it goes back to sleep. So the gateway tries to send the queued command, but the node has already gone back to sleep, and so it gets ignored.

                        I’ve tried varying the smartSleep duration as well as the MY_SMART_SLEEP_WAIT_DURATION_MS define.

                        I haven’t tried varying the MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS define, but it didn’t immediately appear that this was a transport connection issue.

                        It looks like the gateway/node do all their NONCE request/response just fine, but it could be something to do with how all that gets queued and ordered.

                        Doesn’t look like it has anything to do with ATC at all, since I’ve tried enabling/disabling on both node and gateway.

                        Also doesn’t look like it has anything to do with the new driver, since I’ve tried both the old and the new and get the same behaviour.

                        The only difference appears to be the way smartSleep interacts with signed messages.

                        I’ll keep digging, but if anyone has any ideas what I might be doing wrong here, I’d appreciate any help or advice.

                        Thanks!

                        1 Reply Last reply
                        0
                        • G Guillermo Schimmel

                          @sindrome73 here you have bootloaders for all the channels.

                          https://github.com/guillebot/MYSensors-Bootloaders

                          They are unchanged from default elsewhere. Only RF CHANNEL.

                          G Offline
                          G Offline
                          Guillermo Schimmel
                          wrote on last edited by
                          #119

                          @guillermo-schimmel It was bothering me that I was using a 16MHz compiled bootloader for 8MHz Arduino Pro Mini.

                          So I recompiled the bootloader for all the channels and 1MHz, 8MHz and 16MHz.

                          I don't know yet if it makes a difference but it seems right.

                          https://github.com/guillebot/MYSensors-Bootloaders

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mmanzanelli
                            wrote on last edited by
                            #120

                            Hi, Can i burn mysbooloder on arduino mega2560?? its to use as a node. i have a node full functional that manage 24 signals, sensors and actuators. Now i want to make it FOTA node Thanks

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mmanzanelli
                              wrote on last edited by
                              #121

                              hi, can i use mysbootloder with arduino mega2560? The mega is used as a node that manage 24 sensors / actuators, i use this by the number of pins needed. thnks

                              M 1 Reply Last reply
                              0
                              • M mmanzanelli

                                hi, can i use mysbootloder with arduino mega2560? The mega is used as a node that manage 24 sensors / actuators, i use this by the number of pins needed. thnks

                                M Offline
                                M Offline
                                manutremo
                                wrote on last edited by
                                #122

                                @mmanzanelli I don't think you can, the Mega has a different memory structure not supported by the present bootloaders.

                                1 Reply Last reply
                                1
                                • badmannenB Offline
                                  badmannenB Offline
                                  badmannen
                                  wrote on last edited by
                                  #123

                                  I have a quick question. so I don´t screw things up more than necessary, What bootloader should I use on a barebone 328p? ... I was just going to burn the "mini pro" that ´@Guillermo Schimmel so kindly uploaded on GitHub. but then I realised ..that might be wrong ..
                                  Can anyone guide me about what to burn in, I am making a bunch of" 2AA Slim-nodes"

                                  Also I ahve 3 old ones, I actually don´t remember but If I understood things correct, the Channel have to be the same on all nodes on the network I assume , and by default it is set to Channel 76, unless manually changed in the "old" code before this FOTA-generation?

                                  I think I read too much info so my mind is slightly confused now =) so I hope it was clear enough

                                  rPi 3 - UNO R3 - Mini - Nano - custom

                                  G 1 Reply Last reply
                                  0
                                  • badmannenB badmannen

                                    I have a quick question. so I don´t screw things up more than necessary, What bootloader should I use on a barebone 328p? ... I was just going to burn the "mini pro" that ´@Guillermo Schimmel so kindly uploaded on GitHub. but then I realised ..that might be wrong ..
                                    Can anyone guide me about what to burn in, I am making a bunch of" 2AA Slim-nodes"

                                    Also I ahve 3 old ones, I actually don´t remember but If I understood things correct, the Channel have to be the same on all nodes on the network I assume , and by default it is set to Channel 76, unless manually changed in the "old" code before this FOTA-generation?

                                    I think I read too much info so my mind is slightly confused now =) so I hope it was clear enough

                                    G Offline
                                    G Offline
                                    Guillermo Schimmel
                                    wrote on last edited by
                                    #124

                                    @badmannen 76 is the default. I uploaded different versions for all the channel numbers.

                                    Have in mind that they all have to match (gateway and all the nodes).

                                    If they don't match they aren't going to see each other.

                                    badmannenB 2 Replies Last reply
                                    0
                                    • G Guillermo Schimmel

                                      @badmannen 76 is the default. I uploaded different versions for all the channel numbers.

                                      Have in mind that they all have to match (gateway and all the nodes).

                                      If they don't match they aren't going to see each other.

                                      badmannenB Offline
                                      badmannenB Offline
                                      badmannen
                                      wrote on last edited by
                                      #125

                                      @guillermo-schimmel
                                      Ok so If I push this one "MYSBootloader.ch76.8000000L.RF24_PA_LOW.hex" into the FLASH on my barebone 328P via AVRDudess
                                      It should , in theory at least , do the trick ?
                                      0_1573768411797_ab8606c9-3933-40d4-8b29-024d4aa8da3d-image.png

                                      And then After I can upload any sketch on top of it, in the Arduino IDE, with just choosing "Programmer-----> USBasp"
                                      which is what I use to connect to the 328P

                                      rPi 3 - UNO R3 - Mini - Nano - custom

                                      G 1 Reply Last reply
                                      0
                                      • badmannenB badmannen

                                        @guillermo-schimmel
                                        Ok so If I push this one "MYSBootloader.ch76.8000000L.RF24_PA_LOW.hex" into the FLASH on my barebone 328P via AVRDudess
                                        It should , in theory at least , do the trick ?
                                        0_1573768411797_ab8606c9-3933-40d4-8b29-024d4aa8da3d-image.png

                                        And then After I can upload any sketch on top of it, in the Arduino IDE, with just choosing "Programmer-----> USBasp"
                                        which is what I use to connect to the 328P

                                        G Offline
                                        G Offline
                                        Guillermo Schimmel
                                        wrote on last edited by
                                        #126

                                        @badmannen

                                        1st: In order to upload soft using a cable, you don't need to modify the bootloader. Any bootloader will work.

                                        if and only if you want to experiment with FOTA (uploading firmware via wireless), then:

                                        2nd: if you want to use FOTA and you choose MYSBOOTLOADER, then please check the fuses and lock bits, I dont remember them all. But it seems ok, have a try and let us know!

                                        1 Reply Last reply
                                        1
                                        • G Guillermo Schimmel

                                          @badmannen 76 is the default. I uploaded different versions for all the channel numbers.

                                          Have in mind that they all have to match (gateway and all the nodes).

                                          If they don't match they aren't going to see each other.

                                          badmannenB Offline
                                          badmannenB Offline
                                          badmannen
                                          wrote on last edited by
                                          #127

                                          @guillermo-schimmel OR Am I making things more complicated than I need? ... maybe it is easier just to copy your hexfile into -->
                                          "ARDUINO_PATH" > hardware > arduino > avr > bootloaders

                                          and then burn it in the Arduino IDE ?

                                          rPi 3 - UNO R3 - Mini - Nano - custom

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


                                          15

                                          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