Status on local OTA?

Are there any news on support for local OTA ?

For pure ESP32 boards, you can upload your code with OTA support and then when your board and PC are on the same wifi network, the esp32 will show up as a network port in Arduino Ide, so that you can update the code without being physical connected to the board - that is what is required ?

We need to be able to install the boards in large closed wifi network (without internet access) and update them without collecting and connect them to the PC.

Thx in advance for your support.

If you know how to write to flash, you could add support to (my) generic ArduinoOTA library. It supports the WiFiNINA library, only InternalStorage needs to support the RP2040. Now it supports SAMD21, SAMD51 and nRF5 ARM MCU. I only don't now if writing to flash doesn't collide with mbed OS.

1 Like

I will look at your library and the InternalStorage function, it should be possible , but think the internal Arduino people can do it much faster and better than me :wink:

I added the support but only for the

not for the arduino mbed core

the support is not yet released. you can try it by downloading the zip from the repository

Great, I had already installed 'Raspberry Pi Pico Arduino core' and 'ArduinoOTA' so I removed 'ArduinoOTA' downloaded and installed the latest zip version and started to test.

What wifi library should be used for this ?

WiFiNINA.h give compile error 'WiFi' was not declared
WiFi.h compile, but wont connect

for Nano RP2040 Connect use WiFiNINA.
what exact error do you get?
the WiFi101_OTA example of the ArduinoOTA library should work as it is with Nano RP2040

EDIT: I see the error. Something changed in the WiFiNINA library. I fix it later today.

temporarily add #define WiFiNINA_h before #include <ArduinoOTA.h>

Thx, i will retest later today and give feedback.

sorry it some other problem. I investigate

Yes, when I select 'Raspberry Pi RP2040 Boards (1.9.8)' > 'Arduino Nano RP2040 Connect'

and include WiFiNINA
#include <WiFiNINA.h>

compiler says: error 'WiFi' was not declared in this scope

yes. the basic examples of WiFiNINA don't compile in Pico core for some reason. the messages are as if the library wasn't included at all

you will need master version of the Pico core too. it has a change for ArduinoOTA, which is not in released version yet

I found the problem with WiFiNINA even I don't understand why it happens.
in
%HOMEPATH%\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\1.9.7\variants\arduino_nano_connect\nina_pins.h
comment out some lines

//#if __has_include("WiFiNINA.h")
#  define NINA_ATTRIBUTE
//#else
//#  define NINA_ATTRIBUTE __attribute__ ((error("Please include WiFiNINA.h to use this pin")))
//#endif

I created an issue https://github.com/earlephilhower/arduino-pico/issues/373

I made the change in 'nina_pins.h and now it compile without errors, normal sketch upload works, it runs and connect to my wifi, but it does not show up as a network port in Arduino ide, so cant test OTA upload.

don't forget to copy platform.local.txt from extras

with the port sometimes IDE restart helps or use the fake programmer trick
https://github.com/jandrassy/ArduinoOTA#ota-upload-from-ide-without-network-port

Sorry, copy it to where ?

restart does not help, but I will take a look at your link.

https://github.com/jandrassy/ArduinoOTA#troubleshooting

hmm .. still no sign of the network port , not sure what else to try, but will look at it again tomorrow.

the network port is propagated as MDNS record. MDNS on Windows is not well supported but mostly works. google about it. it depends on Widows versions (updates) or installed applications

I dont use Windows any more, using the latest Ubuntu LTS.

When i use my setup with pure esp32 board (incl esp32-C3) the OTA works fine, no speciel settings or config required.

I developed RP2040 support with PI Pico and Ethernet module and the port was detected on Linux Mint. But as I tested my new Nano IoT few months ago the port didn't show. I had to use the programmer way. Maybe WiFiNINA has some problem.