How to do OTA upload to Nano ESP32 without using Arduino Cloud?

Is there anything new on the subject? I also would like to upload code onto a Nano Esp32 ota without the "detour" via the cloud!

Hi @Joegi. Yes, it has always been supported, just like any other ESP32-based board.

I'll provide instructions you can follow to do it:

  1. Select File > Examples > ArduinoOTA > BasicOTA from the Arduino IDE menus.
    The "BasicOTA" example sketch will open in a new Arduino IDE window.
  2. Set the ssid variable at line 6 of the "BasicOTA" sketch to the SSID of your Wi-Fi access point:
    const char* ssid = "..........";
    
  3. Set the password variable at line 7 of the "BasicOTA" sketch to the password of your Wi-Fi access point:
    const char* password = "..........";
    
  4. If you want to require a password for OTA uploads to the board, uncomment line27 of the "BasicOTA" sketch and set it to the password you want.
    For example, if I wanted to set a password of "foobar", I would change it to this:
    ArduinoOTA.setPassword("foobar");
    
  5. Upload the sketch to the Nano ESP32 board via the USB cable as usual.
    It is necessary to use a USB connection for this first upload because the board only has an OTA upload capability when it is running a sketch that provides such a capability. After that first "bootstrap" upload via the USB connection, you can then make all subsequent uploads via the network port (as long as you make sure the sketches you upload have the necessary OTA upload support code).
  6. Wait for the upload to finish successfully.
  7. Open the board selector menu on the Arduino IDE toolbar.
  8. Watch the menu until you see a new port appear. This port should have a Wi-Fi logo icon to the left of it instead of a USB icon, and should have an IP address (e.g., "192.168.254.139") instead of a serial port name below it.
  9. Select the network port from the menu.
  10. Select Sketch > Upload from the Arduino IDE menus (or click the upload button if you prefer).
    The "Configure and Upload" dialog will open.
  11. If you set a password in line 27 of the "BasicOTA" sketch, type that password into the "Password" field of the dialog. If you didn't set a password, just type anything into the field (there is a bug in Arduino IDE 2.x that makes it so you can't leave the field empty, but putting something in there doesn't do any harm when the board is not password protected).
  12. Click the "UPLOAD" button in the dialog.
    An OTA upload process will start.
  13. Wait for the upload to finish successfully.

Thanks, I overlooked the entry in the "Examples for arduino nano esp32"!

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per