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.5k 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.
  • maghacM maghac

    I installed mycontroller.org for this purpose (OTA updates).

    I have a MQTT gateway running on a NodeMCU, which connects to my MQTT server (mosquitto running on a ubuntu server) via wifi. This setup works very well, and I don't have to keep anything running on my desktop machine (which is a windows 10 box) while the OTA updates are being pushed out (which takes ages, since they are running on battery and only wake up once every few hours).

    rozpruwaczR Offline
    rozpruwaczR Offline
    rozpruwacz
    wrote on last edited by
    #52

    @maghac said in 💬 Wireless Programming:

    updates a

    lately I was also tinkering with the OTA updates. I'm using RPI as a gateway and controller at the same time. I'm using MQTT gateway and the controller software is OpenHAB. As I studied the documentation about OTA I learned that it is not working with MQTT gateway. Can You explain how to setup OTA with MQTT gateway ? For now I have to kill the MQTT gateway process and launch serial gateway with virtual serial port which in turn has to be shared through the network with the ser2net to be able to use it with mycontroller running on my desktop.

    maghacM 1 Reply Last reply
    0
    • rozpruwaczR rozpruwacz

      @maghac said in 💬 Wireless Programming:

      updates a

      lately I was also tinkering with the OTA updates. I'm using RPI as a gateway and controller at the same time. I'm using MQTT gateway and the controller software is OpenHAB. As I studied the documentation about OTA I learned that it is not working with MQTT gateway. Can You explain how to setup OTA with MQTT gateway ? For now I have to kill the MQTT gateway process and launch serial gateway with virtual serial port which in turn has to be shared through the network with the ser2net to be able to use it with mycontroller running on my desktop.

      maghacM Offline
      maghacM Offline
      maghac
      wrote on last edited by
      #53

      @rozpruwacz Have a look here: https://forum.mysensors.org/topic/4345/mqtt-client-gateway-node-controller-ota

      1 Reply Last reply
      0
      • hoegaarden_bierH Offline
        hoegaarden_bierH Offline
        hoegaarden_bier
        wrote on last edited by
        #54

        Not sure what I am doing wrong here,... I followed the instructions for bootloader MYSController using an 'Arduino as ISP',... now when trying eg. the Blink sketch, I see that it takes about 10 seconds before it starts and after some 'blinks' it seems to miss some 'blinks',... any suggestions what might be wrong? The normal optiboot seems to work fine...

        1 Reply Last reply
        0
        • maghacM Offline
          maghacM Offline
          maghac
          wrote on last edited by
          #55

          I just enabled OTA on a non-sleeping node - it doesn't call smartSleep() and the loop function is mostly empty (except for sending one initial message). I do have a receive() function since I need to respond to incoming messages.

          How can I properly enable OTA in this kind of node? Sending the "New firmware" command in MyController sends the message which gets caught by receive() and just gives me an error message since it's not one of the message types I expect. Telling the node to reboot sends it into some sort of endless loop which I cannot break unless I kill power to the board.

          gohanG 1 Reply Last reply
          0
          • maghacM maghac

            I just enabled OTA on a non-sleeping node - it doesn't call smartSleep() and the loop function is mostly empty (except for sending one initial message). I do have a receive() function since I need to respond to incoming messages.

            How can I properly enable OTA in this kind of node? Sending the "New firmware" command in MyController sends the message which gets caught by receive() and just gives me an error message since it's not one of the message types I expect. Telling the node to reboot sends it into some sort of endless loop which I cannot break unless I kill power to the board.

            gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #56

            @maghac did you see this? https://forum.mysensors.org/topic/6769/node-reboot-issue/7

            maghacM 1 Reply Last reply
            0
            • gohanG gohan

              @maghac did you see this? https://forum.mysensors.org/topic/6769/node-reboot-issue/7

              maghacM Offline
              maghacM Offline
              maghac
              wrote on last edited by
              #57

              @gohan Thanks. I seem to have the same issue and I'm also using a 5V pro mini, although I actually am using the MYSBootloader.

              1 Reply Last reply
              0
              • maghacM Offline
                maghacM Offline
                maghac
                wrote on last edited by
                #58

                I am having problems flashing a new bootloader on a 5V 16Mhz Pro Mini board. Or rather. the flashing is fine, it's just that I cannot upload a new sketch via FTDI afterwards.

                Here are my custom entries from boards.txt:

                ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader
                ## -------------------------------------------------
                
                
                proMYSBL.name=ATmega328 16Mhz MYSBootloader 1.3 beta 
                
                proMYSBL.upload.tool=avrdude
                proMYSBL.upload.protocol=arduino
                proMYSBL.upload.maximum_size=30720
                proMYSBL.upload.maximum_data_size=2048
                proMYSBL.upload.speed=115200
                
                proMYSBL.bootloader.tool=avrdude
                proMYSBL.bootloader.low_fuses=0xF7
                proMYSBL.bootloader.high_fuses=0xDA
                proMYSBL.bootloader.extended_fuses=0xfe
                proMYSBL.bootloader.unlock_bits=0x3F
                proMYSBL.bootloader.lock_bits=0x0F
                proMYSBL.bootloader.file=MySensors/MYSBootloader.hex
                
                proMYSBL.build.mcu=atmega328p
                proMYSBL.build.f_cpu=16000000L
                proMYSBL.build.board=AVR_UNO
                proMYSBL.build.core=arduino
                proMYSBL.build.variant=standard
                
                ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader
                ## -------------------------------------------------
                
                
                proMYSBL16.name=ATmega328 16Mhz MYSBootloader 1.3 beta DEV
                
                proMYSBL16.upload.tool=avrdude
                proMYSBL16.upload.protocol=arduino
                proMYSBL16.upload.maximum_size=30720
                proMYSBL16.upload.maximum_data_size=2048
                proMYSBL16.upload.speed=57600
                
                proMYSBL16.bootloader.tool=avrdude
                proMYSBL16.bootloader.low_fuses=0xF7
                proMYSBL16.bootloader.high_fuses=0xDA
                proMYSBL16.bootloader.extended_fuses=0xFD
                proMYSBL16.bootloader.unlock_bits=0x3F
                proMYSBL16.bootloader.lock_bits=0x0F
                proMYSBL16.bootloader.file=MySensors/MYSBootloader_16MHz.hex
                
                proMYSBL16.build.mcu=atmega328p
                proMYSBL16.build.f_cpu=16000000L
                proMYSBL16.build.board=AVR_UNO
                proMYSBL16.build.core=arduino
                proMYSBL16.build.variant=standard
                
                
                ## Arduino Pro or Pro Mini (3V3 & 5V, 8 MHz) w/ ATmega328 MYSBootloader
                ## -------------------------------------------------
                
                
                proMYSBL8.name=ATmega328 8Mhz MYSBootloader 1.3 beta DEV
                
                proMYSBL8.upload.tool=avrdude
                proMYSBL8.upload.protocol=arduino
                proMYSBL8.upload.maximum_size=30720
                proMYSBL8.upload.maximum_data_size=2048
                proMYSBL8.upload.speed=57600
                
                proMYSBL8.bootloader.tool=avrdude
                proMYSBL8.bootloader.low_fuses=0xE2
                proMYSBL8.bootloader.high_fuses=0xD2
                proMYSBL8.bootloader.extended_fuses=0xFE
                proMYSBL8.bootloader.unlock_bits=0x3F
                proMYSBL8.bootloader.lock_bits=0x3F
                proMYSBL8.bootloader.file=MySensors/MYSBootloader_8MHz.hex
                
                proMYSBL8.build.mcu=atmega328p
                proMYSBL8.build.f_cpu=8000000L
                proMYSBL8.build.board=AVR_UNO
                proMYSBL8.build.core=arduino
                proMYSBL8.build.variant=standard
                
                

                MYSBootloader.hex is from the master branch of MYSBootloader 1.3.0-beta.3, the other two are from the development branch.

                Doesn't matter which one I use, I can never get my 5V 16MHz boards to accept a new sketch via FTDI cable. I have to go back to the standard Pro Mini bootloader.

                gohanG 1 Reply Last reply
                0
                • maghacM maghac

                  I am having problems flashing a new bootloader on a 5V 16Mhz Pro Mini board. Or rather. the flashing is fine, it's just that I cannot upload a new sketch via FTDI afterwards.

                  Here are my custom entries from boards.txt:

                  ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader
                  ## -------------------------------------------------
                  
                  
                  proMYSBL.name=ATmega328 16Mhz MYSBootloader 1.3 beta 
                  
                  proMYSBL.upload.tool=avrdude
                  proMYSBL.upload.protocol=arduino
                  proMYSBL.upload.maximum_size=30720
                  proMYSBL.upload.maximum_data_size=2048
                  proMYSBL.upload.speed=115200
                  
                  proMYSBL.bootloader.tool=avrdude
                  proMYSBL.bootloader.low_fuses=0xF7
                  proMYSBL.bootloader.high_fuses=0xDA
                  proMYSBL.bootloader.extended_fuses=0xfe
                  proMYSBL.bootloader.unlock_bits=0x3F
                  proMYSBL.bootloader.lock_bits=0x0F
                  proMYSBL.bootloader.file=MySensors/MYSBootloader.hex
                  
                  proMYSBL.build.mcu=atmega328p
                  proMYSBL.build.f_cpu=16000000L
                  proMYSBL.build.board=AVR_UNO
                  proMYSBL.build.core=arduino
                  proMYSBL.build.variant=standard
                  
                  ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader
                  ## -------------------------------------------------
                  
                  
                  proMYSBL16.name=ATmega328 16Mhz MYSBootloader 1.3 beta DEV
                  
                  proMYSBL16.upload.tool=avrdude
                  proMYSBL16.upload.protocol=arduino
                  proMYSBL16.upload.maximum_size=30720
                  proMYSBL16.upload.maximum_data_size=2048
                  proMYSBL16.upload.speed=57600
                  
                  proMYSBL16.bootloader.tool=avrdude
                  proMYSBL16.bootloader.low_fuses=0xF7
                  proMYSBL16.bootloader.high_fuses=0xDA
                  proMYSBL16.bootloader.extended_fuses=0xFD
                  proMYSBL16.bootloader.unlock_bits=0x3F
                  proMYSBL16.bootloader.lock_bits=0x0F
                  proMYSBL16.bootloader.file=MySensors/MYSBootloader_16MHz.hex
                  
                  proMYSBL16.build.mcu=atmega328p
                  proMYSBL16.build.f_cpu=16000000L
                  proMYSBL16.build.board=AVR_UNO
                  proMYSBL16.build.core=arduino
                  proMYSBL16.build.variant=standard
                  
                  
                  ## Arduino Pro or Pro Mini (3V3 & 5V, 8 MHz) w/ ATmega328 MYSBootloader
                  ## -------------------------------------------------
                  
                  
                  proMYSBL8.name=ATmega328 8Mhz MYSBootloader 1.3 beta DEV
                  
                  proMYSBL8.upload.tool=avrdude
                  proMYSBL8.upload.protocol=arduino
                  proMYSBL8.upload.maximum_size=30720
                  proMYSBL8.upload.maximum_data_size=2048
                  proMYSBL8.upload.speed=57600
                  
                  proMYSBL8.bootloader.tool=avrdude
                  proMYSBL8.bootloader.low_fuses=0xE2
                  proMYSBL8.bootloader.high_fuses=0xD2
                  proMYSBL8.bootloader.extended_fuses=0xFE
                  proMYSBL8.bootloader.unlock_bits=0x3F
                  proMYSBL8.bootloader.lock_bits=0x3F
                  proMYSBL8.bootloader.file=MySensors/MYSBootloader_8MHz.hex
                  
                  proMYSBL8.build.mcu=atmega328p
                  proMYSBL8.build.f_cpu=8000000L
                  proMYSBL8.build.board=AVR_UNO
                  proMYSBL8.build.core=arduino
                  proMYSBL8.build.variant=standard
                  
                  

                  MYSBootloader.hex is from the master branch of MYSBootloader 1.3.0-beta.3, the other two are from the development branch.

                  Doesn't matter which one I use, I can never get my 5V 16MHz boards to accept a new sketch via FTDI cable. I have to go back to the standard Pro Mini bootloader.

                  gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #59

                  @maghac why don't you use the ota feature?

                  maghacM 1 Reply Last reply
                  0
                  • gohanG gohan

                    @maghac why don't you use the ota feature?

                    maghacM Offline
                    maghacM Offline
                    maghac
                    wrote on last edited by
                    #60

                    @gohan Good question :)

                    I was afraid it would get stuck in a neverending loop and I would have to cycle power to the board, but actually OTA programming with mycontroller works fine.

                    The problem is that OTA uploades takes around 10 mins, which is annoying if I want to test something while I have the node on my desk, before placing it somewhere in my house. So while I anyway have it on the desk, I'd like to use the FTDI cable.

                    Anyway, things seem to work fine now :)

                    1 Reply Last reply
                    1
                    • A Offline
                      A Offline
                      arraWX
                      wrote on last edited by
                      #61

                      Is it possible to do FOTA from my raspberry pi (serial gateway + domoticz)?

                      As it is now I move the gateway from the rpi to a windows pc running MYSController. It would be nice to avoid this step.

                      V 1 Reply Last reply
                      0
                      • A arraWX

                        Is it possible to do FOTA from my raspberry pi (serial gateway + domoticz)?

                        As it is now I move the gateway from the rpi to a windows pc running MYSController. It would be nice to avoid this step.

                        V Offline
                        V Offline
                        Viciousman
                        wrote on last edited by Viciousman
                        #62

                        @arraWX you can create a Ethernet gateway in raspberry pi and connect MYScontroller to you raspberry pi gateway.
                        See instructions to create raspberrypi ethernet gateway on https://www.mysensors.org/build/raspberry
                        From there you can perform FOTA in MYScontroller.

                        A 1 Reply Last reply
                        2
                        • V Viciousman

                          @arraWX you can create a Ethernet gateway in raspberry pi and connect MYScontroller to you raspberry pi gateway.
                          See instructions to create raspberrypi ethernet gateway on https://www.mysensors.org/build/raspberry
                          From there you can perform FOTA in MYScontroller.

                          A Offline
                          A Offline
                          arraWX
                          wrote on last edited by
                          #63

                          @Viciousman Thank you!

                          How do I create a Ethernet gateway?

                          Will I have to build this: https://www.mysensors.org/build/ethernet_gateway

                          or

                          Will I have to do some kind of configuration on the rpi and continue using my serial gateway?

                          V 1 Reply Last reply
                          0
                          • A arraWX

                            @Viciousman Thank you!

                            How do I create a Ethernet gateway?

                            Will I have to build this: https://www.mysensors.org/build/ethernet_gateway

                            or

                            Will I have to do some kind of configuration on the rpi and continue using my serial gateway?

                            V Offline
                            V Offline
                            Viciousman
                            wrote on last edited by
                            #64

                            @arraWX I find more simple to simply connect nrf24 to raspberry pi as instructed in https://www.mysensors.org/build/raspberry
                            But you can also build the Ethernet gateway with W5100.

                            1 Reply Last reply
                            2
                            • T Offline
                              T Offline
                              Tommas
                              wrote on last edited by
                              #65

                              Dear all!

                              I have an mysensors ethernet gateway and nodes with nrf24 . I have an openhab2 controller. Could i use the above solution to program my nodes over the air through my current gateway? So i write my sketch on windows arduino and send it through my gateway to the node? Or i have to connect my computer direct to nodes over air?

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

                                You can use myscontroller to connect to the ethernet gateway and assign the firmware to upload for each node

                                T V 2 Replies Last reply
                                0
                                • gohanG gohan

                                  You can use myscontroller to connect to the ethernet gateway and assign the firmware to upload for each node

                                  T Offline
                                  T Offline
                                  Tommas
                                  wrote on last edited by
                                  #67

                                  Dear @gohan

                                  Thank you! Superb!

                                  1 Reply Last reply
                                  0
                                  • gohanG gohan

                                    You can use myscontroller to connect to the ethernet gateway and assign the firmware to upload for each node

                                    V Offline
                                    V Offline
                                    vikasjee
                                    wrote on last edited by vikasjee
                                    #68

                                    @gohan , Thanks for this idea... I am going to try this with a serial gateway instead. Do you perceive a problem? Will this work only with an ethernet gw?

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

                                      Myscontroller works only as ethernet. Mycontroller should also work with mqtt gateway but I'm not sure about serial.

                                      V 1 Reply Last reply
                                      0
                                      • gohanG gohan

                                        Myscontroller works only as ethernet. Mycontroller should also work with mqtt gateway but I'm not sure about serial.

                                        V Offline
                                        V Offline
                                        vikasjee
                                        wrote on last edited by
                                        #70

                                        @gohan Ook! Are you talking about installing MysController on Raspberrypi (I think not)? If you are going to run it on Windows and connect to Raspi Ethernet gateway remotely then using the the same option we can remotely connect to a serially connected gateway on Raspberrypi (using a USB port) from MysController running on Windows.

                                        Are there steps somewhere to install MysController on Raspi [some Windows pre-installer running on Debian Linux]? I remember reading some Mysensors posts here a couple of years back(!!!), but cant seem to locate it now...

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

                                          MyScontroller is a windows application.
                                          MyController is a controller that you can install anywhere. I personally try to avoid the usb gateways because of the limitations.

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


                                          8

                                          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