Remote Sketch updates on a Mega 2560 via Ariadne and Athena

Hardware: Mega2560 + W5500 Ethernet Shield + Athena Bootloader for remote sketch updates

Hi all,
we are a small non profit club and everything is done by the selfless contributions from kind volunteers like you, from all over this great world.

We are greatful for and were using Ariadne remote bootloader for remote updates to our mountaintop unit since 2016ish, thank you really much for that!
https://github.com/per1234/Ariadne-Bootloader

We needed to make some minor refresh/changes and within our limited (SW/HW) resources chose to use Mega2560 + W5500 + Athena going forward.

Mainly because with Athena we could change the Ethernet CS Pin and issue a reset to the W5500 prior to usage.

Meanwhile we managed to TFTP programs with Athena, both manual EEPROM.enableUpdateMode and with AthenaEthernetReset.
https://github.com/embeddedartistry/athena-bootloader#enabling-remote-reset-and-reprogram-capabilities

However, the functionality of Ariadne's "TFTP-waiting for 10 seconds after reset" seems not to be working.
A 10 second wait is still there, but any attempts to upload via TFTP during period fails.

Is there a way to have the TFTP functionality without any dependence on any EEPROM flag, in the (still implemented) 10 second timeout?

Basically how Ariadne was working, unconditionally offering a remote TFTP sketch upload during 10 seconds after any reset?

Thank you all very much for your kind contributions and help!!!

Seems we can update FW remotely during the ten seconds, sorry.
I don't understand most of this and just try to figure out what to do.
Since our software guy left, we have very limited help in getting things going, sorry.

So it seems that Athena does go into the "TFTP-waiting for 10 seconds after reset" ONLY after a reset was issued by the button on the Mega board!

This was hunted down to this expression:

\athena-bootloader\bootloaders\athena\src\main.c 

line 51

	/* Disable the watchdog timer to prevent
	 * eternal reset loop of doom and despair */
	ch = MCUSR;
	MCUSR = 0;
	if(ch & (_BV(WDRF) | _BV(BORF) | _BV(PORF)))
	{
		if(eeprom_read_byte((uint8_t*)NETEEPROM_IMG_STAT) == NETEEPROM_IMG_OK_VALUE)
		{
			wdt_disable();
			appStart();
		}
	}
	wdt_enable(WDTO_8S);

Since we cannot press the reset button of that remote station, we would need to change the decision/behaviour to "watchdog reset" only.
Then we could trigger a remote TFTP session with a WD timeout. That we can accomplish.
But we have no means/knowledge to compile all this.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.