Nano ArduinoOTA

I use Arduino Nano with ENC28J60 and EthernetENC library. All working fine. Now I'd like to be able to upload sketches through ethernet, so I got interested in ArduinoOTA. I installed the library but the network port doesn't show up, and neither does the name ArduinoOTA in the programmers list. I understand from the Github webpage that things may not be very straightforward for some boards, but after several days I still can't figure it out. Any hints?

is this the one?

Supported micro-controllers*

** classic ATmega AVR with at least 64 kB of flash (Arduino Mega, MegaCore MCUs, MightyCore 1284p and 644)*
** Arduino SAMD boards like Zero, M0 or MKR and the new "Nano 33 IoT"*
** nRF5 board supported by nRF5 core.*
** RP2040 boards with Pico core*
** STM32F boards with STM32 core*
** boards supported by ESP8266 and ESP32 Arduino boards package*
** any board with MCU with SD bootloader

Was it this library:

If it was, then the section "Supported micro-controllers" in the readme says classic ATmega AVR with at least 64 kB of flash.

Yes, it is that ArduinoOTA. But now I see, I have only 32 kB of flash.

In the explanations for Atmega support on Github it is mentioned the folder "my_boards/avr". There I found the bootloader for Uno/Nano/Mini (Atmega328p) and the settings for it in the file boards.txt. So this leads me to think that there may be some possibility. Am I wrong?

Can you explain that, please?

It was said that ArduinoOTA supports from 64 kB of flash upwards. But here are some files that make reference to Arduino Nano with Atmega328p (32 kB). Maybe I don't fully understand, but it looks to me that there may be some support for this board.

And the Nano has how many?

I know how much and I wrote it already.

Look, the author of the library created a bootloader for Uno/Nano/Mini, I suppose with intention to make it possible to upload sketches to those boards via Wifi or Ethernet. But then says that it doesn't support those boards (that is, boards with the corresponding memory size). I don't get it. Maybe I'm stupid, maybe I just don't know enough about microcontrollers, libraries etc. If somebody will take two minutes to write a few reasonable sentences of explanation it would be very nice. If not, nevermind.

What don't you get?
The basic bootloader uses a simple, pretty reliable serial link.
The code to run the serial link is (relatively) simple and compact.
If anything goes wrong with the boot, at best you've got your old code and a working bootloader.
At worst, you've got a working bootloader.

OTA relies on a potentially fallible link, using a much more complex protocol, requiring more software, requiring more program space.

from the README

The sizes of networking library and the SD library allows the use of ArduinoOTA library only with ATmega MCUs with at least 64 kB flash memory.

for OTA you need the networking library.
using internal flash requires half of the flash to store the update binary and a sketch with any networking library is larger then a half of the flash of ATmega328.
alternatively using SD as storage for the update binary requires SD library and size of a sketch with networking library and SD library doesn't let much flash space for your code on the Atmega328p.

I created the board definition for a Uno with 'big boot' because it is possible to get the update binary to internal flash with some transport that doesn't require a large library (for example SPI or I2C) but that is advanced use.

you don't get OTA port with EnternetENC because

UIPEthernet, EthernetENC and WiFi library don't support UDP multicast for MDNS, so Arduino IDE will not show the network upload port

Thank you.

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