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. General Discussion
  3. OTA without EEPROM

OTA without EEPROM

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 1.4k Views 3 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.
  • S Offline
    S Offline
    Stuart Middleton
    wrote on last edited by
    #1

    I've been involved in a project recently that needed to write to FLASH memory at runtime. This made me think about OTA updates of MySensor nodes. As I understand it, MySensors uses an external EEPROM to store the update in then rewrites the FLASH from this EEPROM. I'm thinking, would it be possible to do this without the EEPROM?

    This is what I'm thinking... Let's say your sketch takes up 55% of atmega328 FLASH (based on a recent sketch of mine). You can write an independent sketch that could handle comms, downloading and flashing that can sit at top of memory. Assuming it is small enough to fit in with your existing sketch and any replacement sketch you may upload. It would obviously have to be a little more intelligent than a dumb flash bootloader. For instance, it would need to know if a download has failed or is partial and be able to communicate this back to the controller and only reboot when the entire new sketch is flashed.

    I think it would be a pain to write and be very limited in flexibility regarding the size of the sketches you can upload, but it would mean you could make nodes without having custom boards with EEPROM built-in or adding EEPROMs to your simple designs.

    Am I crazy, or is this something that would be useful to some? I'd certainly find it useful.

    mfalkviddM 1 Reply Last reply
    0
    • S Stuart Middleton

      I've been involved in a project recently that needed to write to FLASH memory at runtime. This made me think about OTA updates of MySensor nodes. As I understand it, MySensors uses an external EEPROM to store the update in then rewrites the FLASH from this EEPROM. I'm thinking, would it be possible to do this without the EEPROM?

      This is what I'm thinking... Let's say your sketch takes up 55% of atmega328 FLASH (based on a recent sketch of mine). You can write an independent sketch that could handle comms, downloading and flashing that can sit at top of memory. Assuming it is small enough to fit in with your existing sketch and any replacement sketch you may upload. It would obviously have to be a little more intelligent than a dumb flash bootloader. For instance, it would need to know if a download has failed or is partial and be able to communicate this back to the controller and only reboot when the entire new sketch is flashed.

      I think it would be a pain to write and be very limited in flexibility regarding the size of the sketches you can upload, but it would mean you could make nodes without having custom boards with EEPROM built-in or adding EEPROMs to your simple designs.

      Am I crazy, or is this something that would be useful to some? I'd certainly find it useful.

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @Stuart-Middleton I think MySensors already has got you covered :-) https://github.com/mysensors/MySensorsBootloaderRF24

      From https://www.mysensors.org/about/ota

      MYSBootloader does not require external flash.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Stuart Middleton
        wrote on last edited by
        #3

        Awesome! That has saved me a lot of work ;)

        I knew I should have spent some time doing the research before emptying my ideas into the forum! :)

        mfalkviddM 1 Reply Last reply
        1
        • S Stuart Middleton

          Awesome! That has saved me a lot of work ;)

          I knew I should have spent some time doing the research before emptying my ideas into the forum! :)

          mfalkviddM Online
          mfalkviddM Online
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @Stuart-Middleton no worries :)

          Could you share some information on the project you are working on?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Stuart Middleton
            wrote on last edited by
            #5

            The project where I had to write to flash?

            This was a network connected temperature and humidity sensor for a store room which had a built-in OLED display but was also network connected and hosted a website for graphing data output and displaying historical and real-time data. I wrote to flash so I could update the web page and other data OTA which was too big to fit in RAM or EEPROM and I didn't want to store on the SD card in case it was removed for any reason. It wasn't MySensors connected, unfortunately :)

            1 Reply Last reply
            1
            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