Page 1 of 1

Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Thu Aug 24, 2017 3:44 pm
by Resch2061
Hello,

We have an AVR, I believe it's an AT-Mega2560, on a seperate part of our custom print. This AVR is supposed to work with the ESP32 and we decided to be able to flash it OTA by using ESP32's wifi functionality as a tunnel. At least, if it works...
Avrdude seems to be quite a complex and large system. I'm wondering if it would be possible to directly flash a hex file to this AVR somehow? We do have a UART directly connected to this AVR, which allows communication between the AVR and the ESP32. In theory, it should be possible, right...?

Re: Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Thu Aug 24, 2017 6:02 pm
by permal
I'm not familiar with the protocol used to flash the AVR, but to the AVR your ESP32 will look just like any other device you use to flash it. So yes, I don't see anything preventing you from accomplishing that. Also give the security aspect of such a solution a thought.

Re: Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Thu Aug 24, 2017 9:59 pm
by martinayotte
Maybe the ESP-LINK, written for ESP8266, could be adapted for ESP32, it is support AVR stk500v1 programming protocol :

https://github.com/jeelabs/esp-link
built-in stk500v1 programmer for AVR uC's: program using HTTP upload of hex file

Re: Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Mon Sep 25, 2017 12:14 pm
by Resch2061
I figured it out! Expect a component some time in the future, once I work out the oddities here and there. I figure it might be useful for other people as well.

Re: Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Mon Apr 16, 2018 6:11 am
by meowsqueak
Resch2061 wrote:I figured it out! Expect a component some time in the future, once I work out the oddities here and there. I figure it might be useful for other people as well.
I'm interested - do you have your component on github?

Re: Flashing an AVR OTA by using ESP32 as a tunnel?

Posted: Thu Sep 13, 2018 10:48 am
by Resch2061
meowsqueak wrote:I'm interested - do you have your component on github?
At the moment, not yet. I've asked the project lead about discussing this, so maybe some time in the future.