Flashing an AVR OTA by using ESP32 as a tunnel?

Resch2061
Posts: 40
Joined: Mon May 01, 2017 1:56 pm

Flashing an AVR OTA by using ESP32 as a tunnel?

Postby Resch2061 » Thu Aug 24, 2017 3:44 pm

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...?

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

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

Postby permal » Thu Aug 24, 2017 6:02 pm

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.

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

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

Postby martinayotte » Thu Aug 24, 2017 9:59 pm

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

Resch2061
Posts: 40
Joined: Mon May 01, 2017 1:56 pm

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

Postby Resch2061 » Mon Sep 25, 2017 12:14 pm

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.

meowsqueak
Posts: 151
Joined: Thu Jun 15, 2017 4:54 am
Location: New Zealand

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

Postby meowsqueak » Mon Apr 16, 2018 6:11 am

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?

Resch2061
Posts: 40
Joined: Mon May 01, 2017 1:56 pm

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

Postby Resch2061 » Thu Sep 13, 2018 10:48 am

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.

Who is online

Users browsing this forum: Bing [Bot] and 131 guests