element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Custom Bootloader
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 13 replies
  • Subscribers 385 subscribers
  • Views 2214 views
  • Users 0 members are here
  • code
  • arduino_development_environment
  • bootloader_arduino
  • arduino
Related

Custom Bootloader

nicolaoscon96
nicolaoscon96 over 2 years ago

Hello team,

Hope I find you all well, I need your help on a small part of a personal project that am working on. So I made an Arduino based custom circuit board that it has on board GSM, GPS, Relays, Sensors and am receiving them on the phone on a custom application that I wrote. I can monitor the sensors, I can control the switches etc... So an idea that I had is to update the Arduino's firmware OTA (over the air) with the GSM. I setup a server at home (raspberry pi) nothing fancy that I can push to the binary file then go into the browser UI declare the new version upload the file and POST it and the Arduino see the new version and is downloading it into the EEPROM (by the way is an ATmega2560) and the updates may be for optimization, add new features


So my need for help is that in writing a bootloader I have no idea how. I need someone to guide me or help me to create a custom bootloader for the ATmega2560, so before jumping into the main sketch to check if there is a new update available saved to install it. and then continue with the new one.

If further discussion is needed please let me know so  i can explain more.

  • Sign in to reply
  • Cancel

Top Replies

  • balajivan1995
    balajivan1995 over 2 years ago in reply to shabaz +1
    Arduino comes with its own bootloader format for AVR devices right? Is it possible to edit that file?
Parents
  • dougw
    0 dougw over 2 years ago

    It sounds to me like that is how the normal OTA process works?

    https://www.youtube.com/watch?v=7Xdsc1qqoro

    What am I missing?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • nicolaoscon96
    0 nicolaoscon96 over 2 years ago in reply to dougw

    The OTA process that you mentioning is for WIFI. The board it self is completely remotely that's why i want to do it with GSM

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • BigG
    0 BigG over 2 years ago in reply to nicolaoscon96

    Well, you'll still need to understand what it's doing via WiFi as WiFi is simply the transport layer.

    When it comes to data via a cellular network you will still need to rely on TCP protocols. As such you need a publicly accessible server for your remote device to connect to via the GSM network. So unless you configure your Raspberry Pi for the world to see your remote device will not be able to see it either. Then it will be your remote device that has to request this data from the server. You cannot simply push the binary to the device, like you would by sending it a SMS etc. Then with GSM you will probably have to handle a chunked download as it doesn't just download a full binary seamlessly. With GSM there are usually bandwidth restrictions etc. This whole logic is dependent on the GSM module you are using as it will have it's own API.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • balajivan1995
    0 balajivan1995 over 2 years ago in reply to BigG

    If RPi server port exposed using advanced router settings,the file will be available outside local network.  A simple key exchange or authentication can secure the communication between Arduino and RPi. If crc checking is enabled, if any bytes of data is missed while downloading from gsm that file can be deleted.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • balajivan1995
    0 balajivan1995 over 2 years ago in reply to BigG

    If RPi server port exposed using advanced router settings,the file will be available outside local network.  A simple key exchange or authentication can secure the communication between Arduino and RPi. If crc checking is enabled, if any bytes of data is missed while downloading from gsm that file can be deleted.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • BigG
    0 BigG over 2 years ago in reply to balajivan1995

    I am not sure if this is possible with a GSM module. You would need to check the methods available via the AT command set.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • balajivan1995
    0 balajivan1995 over 2 years ago in reply to BigG

    I think it is safe to assume GSM supports AT commands for get post as well. I have done the above using a library called tinygsm few months ago. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube