Does anyone have a solution or an idea on how to update the firmware of an Arduino Mega via the internet without the WiFi shield?
burn SD bootloader. then you can download the new firmware to SD card and self reset.
or
burn Optiboot with 'copy_flash_pages" function. then you can apply the downloaded binary over InternalStorage object of my ArdunioOTA library. InternalStorage uses upper half of he flash memory
That's the only way possible? So how do other machines do it, like a D-Link router or a Wireless wifi plug?
Regards,
Ronen
amnon18:
That's the only way possible? So how do other machines do it, like a D-Link router or a Wireless wifi plug?Regards,
Ronen
I don't understand what is unclear on:
download to flash, apply, reset.
how else should it be done?
amnon18:
That's the only way possible? So how do other machines do it, like a D-Link router or a Wireless wifi plug?Regards,
Ronen
Having the micro program itself is one option. It's high risk strategy as if something goes wrong it could brick the device or lose communication with the update server so preventing further updates.
Systems such as the 'nocan platform' (Omzlo: The NoCAN platform) use a co-processor next to the main processor that is responsible for communicating back to base and programming the main processor. The general idea is that the co-processor never needs to be updated so there is no risk of the system getting into a permanently broken state. If there is a problem with programming the main processor then you just repeat the process until it succeeds.
Try using try using a ESP8266 family member. They boot from an external memory chip. Look into OTA (Over The Air) programming for lots of details. it has WiFi and probably enough memory do do the job and program the Mega. The price if very low. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
Thank you Mike and Gil.
For the rest, it's very nice to type in your remarks and think that everyone knows what you mean while not everyone is on the same level.
My question to the so-called Gurus is...
Is there a way to upload a HEX file to an Arduino Mega via the internet? where the file is located on a web server somewhere on earth. And, without using an access point connected to the Arduino only Wifi service.
I hope this is a clear question.
BTW I'm not waiting for the solution, just a confirmation that someone had done it and that I'm not looking for something that doesn't exist or can not be done.
Thank you again to everyone.
amnon18:
Thank you Mike and Gil.For the rest, it's very nice to type in your remarks and think that everyone knows what you mean while not everyone is on the same level.
My question to the so-called Gurus is...
Is there a way to upload a HEX file to an Arduino Mega via the internet? where the file is located on a web server somewhere on earth. And, without using an access point connected to the Arduino only Wifi service.
I hope this is a clear question.
BTW I'm not waiting for the solution, just a confirmation that someone had done it and that I'm not looking for something that doesn't exist or can not be done.
Thank you again to everyone.
if you can download it, you can apply it
"Is there a way to upload a HEX file to an Arduino Mega via the internet?"
By itself? Probably not. I have a mega and it has no way to interface with the internet on its own as far as I can tell.
amnon18:
@Juraj, Do you know how and did you ever do it?Thanks
I already mentioned my ArduinoOTA library
If you don't mind vendor lock in there are also a series of microcontrollers from particle.io that are programmed and managed via the cloud.
ota sketch download examples:
Yes it can be done OTA and is done millions of time every week. Apple and others do it with there products when they update the operating system. They have enough memory to save the code in, then check it to be sure it is correct, if not you can brick the unit. Once that is done they validate they have enough energy available then program. During programming nothing else on the device is available. There is also a fall back mode where with the operator doing specific things it will enable the permanent boot-loader. Then they reboot it or switch a pointer so it runs out of the new memory block. Since you do not want to use the wifi shield you will have to find some way to get the data from the internet. You can do it via a cell link or wifi device such as a ESP3 etc. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil