OTA [ERROR]: No Answer

Hello. I have a problem with OTA and Platformio. With IDE Arduino run correct.
I desactive fireware and my platformio.ini is:

platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =
  #Using a library name

; Serial Monitor options
monitor_speed = 115200

; Configuración OTA
upload_port =
upload_protocol = espota

In my setup() funtion:

 //Actualización código por OTA

In my loop() funtion:

ArduinoOTA.handle(); // Actualización código por OTA

Fixed IP: in the code.


17:09:51 [DEBUG]: Options: {'esp_ip': '', 'host_ip': '', 'esp_port': 8266, 'host_port': 45206, 'auth': '', 'image': '.pio\\build\\d1_mini\\firmware.bin', 'spiffs': False, 'debug': True, 'progress': True}
17:09:51 [INFO]: Starting on
17:09:51 [INFO]: Upload size: 318192
17:09:51 [INFO]: Sending invitation to:
17:10:01 [ERROR]: No Answer
*** [upload] Error 1

I have read everything related to OTA in the forum but I can’t find a solution, please help

Can you ping this IP, as a first test? What is the full sketch? Have you tried the official example sketch first with PIO? Arduino/BasicOTA.ino at master · esp8266/Arduino · GitHub

1 Like

There is also no need for ArduinoOTA.setPort(8266); unless you want a port other than 8266, as this is the port the ArduinoOTA code will default to. I would be checking that the IP is pingable and that your firewall isn’t blocking access, assuming that you have tested this to be working with the stock example sketch first to make sure the fault isn’t somewhere in your code.


I have tried BasicOTA.ino and error.

19:18:41 [DEBUG]: Options: {‘esp_ip’: ‘’, ‘host_ip’: ‘’, ‘esp_port’: 8266, ‘host_port’: 47288, ‘auth’: ‘’, ‘image’: ‘.pio\build\nodemcuv2\firmware.bin’, ‘spiffs’: False, ‘debug’: True, ‘progress’: True}
19:18:41 [INFO]: Starting on
19:18:41 [INFO]: Upload size: 310576
19:18:41 [INFO]: Sending invitation to:
19:18:51 [ERROR]: No Answer
*** [upload] Error 1


Haciendo ping a con 32 bytes de datos:
Respuesta desde bytes=32 tiempo=338ms TTL=255
Respuesta desde bytes=32 tiempo=26ms TTL=255
Respuesta desde bytes=32 tiempo=51ms TTL=255
Respuesta desde bytes=32 tiempo=67ms TTL=255

Estadísticas de ping para
Paquetes: enviados = 4, recibidos = 4, perdidos = 0
(0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
Mínimo = 26ms, Máximo = 338ms, Media = 120ms

With Arduino IDE BasicOTA.ino run ok.

¿Help please? I would like works with Platformio and OTA.


Problem with Firewall. I have given permisions to Visual Studio Code to use ports.