Hello i have been trying to find the best way to flash my Arduino Mega 2560 over wifi using an ESP8266-12.
I have found two sketches that i can get working perfectly on a Uno just not a aMega, the first is called BootDrive but uses an SD card and STK500v1 instead of v2 but i can not figure out how i could adjust it, so it reads data from a server, using GET, i can easily print out the HEX file stored on my server in the arduino serial monitor, but i would then need to store it to the EEPROM or Flash of the ESP so i can then read it line by line quickly and that above my coding skills.
And the second is some Spanish persons sketch which uses Python and flashes over a TCP transparent connection from my pc to the ESP and sends the data over serial to the Mega, but it uses STK500v1 and so i had to use the stk500v1 and flash Optiboot to my Mega but that limited the pins and other functions to the scope of a 328p, AND the sketch runs on the Arduino to be flashed so if the TCP connection drops a packet the Flash fails and the Mega then needs to be re flashed via the IDE which is not ideal, just imagine this is a final product and can not be associated with Arduino IDE or command prompt and so on it must be very easy to update and 100% reliable.
Lastly i have found ESP-Link which looks very promising but from what i can see it takes up the entire ESP's resources, rather than being a arduino based sketch. This is not acceptable as i already have an Arduino sketch running on the ESP which reads data sent from the Mega over serial to the ESP and then sends that data to a server to be inserted into a database.
Concluding on all that, I have not found any thing that meets my needs, being get the hex file from a server or local pc and sending it to the ESP which in turn flashes the Arduino Mega 2560, without the need for Python or Command Prompt or a SD card, the ESP has 4Mb of Flash or EEPROM so that could be used to store the 296Kb HEX file if needed.
So after explaining my issue, can any one here write or modify a code to do what i want for paid work ? All it needs to do is connect to the server get the hex file save it to EEPROM and then just modify the BootDrive code so instead it reads the EEPROM rather than from a SD card.
Cheers From Kawasaki