How to build OTA for ATMEGA2560 by using SD card and SIM800L

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I'm a basic developer.

I'm building OTA with AMEGA2560, GSM800L and SD card.

Receive firmware from the server and store it on SDcard or SIM800L.
Then I need to upload firmware of ATGEMA2560 from SD CARD 

What should I do?
I have no idea how to do that.
We would be very grateful if you could provide us with some useful information.

Regard.

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OTA?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:
OTA?
Over The Air

Wireless communication.

Stefan Ernst

Last Edited: Tue. Oct 31, 2017 - 07:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AARON2017 wrote:

I'm a basic developer.

 What does this mean, you have used BASIC programming language???

What experience do you have using the M2560?  Arduino Mega?

Begin by breaking down your project into manageable pieces.

Have you ever written a bootloader before? 

Have you ever written a comm program to receive data and check it's integrity?

Have you ever written a program to store data on an SD card?

 

All of these types of projects can be found using an Arduino Mega on the internet.

We do not provide solutions (unless your willing to pay through the nose for them, post ad in marketplace forum)

But we will help you over the stumbling blocks, if you show us what you have done and explain where your stuck.

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the reply.

I'm an engineer.

I am visiting this site for the first time.

I have experience using Arduino Mega and Library.

I have been written the code for UART, SD card, and SIM800. and working well.

My personal project is to trans the data from a device to a server by SIM800L.

and to maintain a device, sometimes I need to upload firmware through the network with SIM800L.

This is my plan, but I have no way.

So I asked to help.

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Data from your device to the server should be pretty straight forward. The software/firmware update is likely to the most challenging task. 

 

Others will surely add to this but I suspect that what you will want to do is transfer the updated firmware from the server to the SD card in your device. Then have your device check the validity of the candidate update. Perhaps, you will want a signature that shows that the update originated from the place it was supposed to come from (to prevent someone from changing your device without your permission). Certainly, you will want some kind of a CRC to verify that it arrived without error. Then, you will need a way to trigger your device to cause it to bootload using the update in the SD card. 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very thank you for your kindness.

I can get data from the server and save to SDcard.

However, I do not know what kind of operation I need to operate on the Atmega2560.
I have no experience with the bootloader.

if you have the guide or URL for it. please send me.

Good luck

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You will need a bootloader that is designed to work with a file on the SD card. Most work through the serial port. So, you will either need to find one that DOES work from an SD card or you will need to modify one.

 

I seem to recall that there are "issues" with the large flash space, needing more than 16 bits worth or address. If this is correct, then you won't be able to use a generic loader but will need to find one that is built to work with larger program spaces. Or, again, modifying one yourself.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AARON2017 wrote:
I'm a basic developer ... We would be very grateful if you could provide us with some useful information.

So how many of you are there?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your help.

I will look again for this in GitHub or other platforms.

If there is a good solution, let you know the result.

I would be grateful if you would continue to advise me on this.

Thank you for your time.

Regard.

AARON.

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice to meet you.

I'm an engineer of a small factory.

I'm working with my partners(two engineers).

I have a lot of technical problems in operating the factory.

I ask for your active help.

I will help you as much as possible.

Thank you.

aaron

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So do either/both of your partners have any experience with programming - in particular, with embedded microcontroller programming?

 

When you say, "engineer" - what, exactly, do you mean by that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

they have no experience in Microcontroller

I'm an electronic engineer.They are power engineers.

We are developing this project on our own to improve our business and plant management.

Regard.

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AARON2017 wrote:
 to improve our business and plant management.

Would it not make more sense to get an off-the-shelf unit ?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's also a good solution.

But this is my hobby and I want to improve my skills.

My enhanced skills will have a major impact on my business.

laugh

thank you.

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Take a look at this project on github:  https://github.com/zevero/avr_boot

 

Play with this until you understand how it works, then you should be able to adapt it to your needs.

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hint: just about anything you want to do with an AVR has been done using the Arduino platform (which is just an AVR).

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your help

yes

Love ATMEGA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AARON2017 wrote:
Then I need to upload firmware of ATGEMA2560 from SD CARD What should I do?
Shameless self promotion...

 

https://spaces.microchip.com/gf/...

 

You will have to handle the reception and writing of the data to the card in the first place elsewhere.

 

(in fact there is an argument to say that if you aren't using the card for other file storage you might as well ditch FAT32 all together and just store the received data into raw sectors on the SD)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your help.

I'll  try your advice again.

Thank you

Love ATMEGA