Hi Juraj, thank you for nice job. I tried your library and when I want to do update in ethernet example on my bluepill, Arduino shows no available port and if I reset It, it doesnt start anymore and I have to upload example again to start.
#include <SPI.h>
#include <Ethernet.h>
#include <ArduinoOTA.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
void setup() {
//Initialize serial:
Serial.begin(9600);
while (!Serial);
// start the Ethernet connection:
Serial.println("Initialize Ethernet with DHCP:");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
} else {
Serial.print(" DHCP assigned IP ");
Serial.println(Ethernet.localIP());
}
// start the OTEthernet library with internal (flash) based storage
ArduinoOTA.begin(Ethernet.localIP(), "Arduino", "password", InternalStorage);
}
void loop() {
// check for updates
ArduinoOTA.poll();
// add your normal loop code below ...
}
Can you help me, where could be the problem? Thank you...
Thank you for your answer. Main problem is that, when I upload OTethernet example, Serial monitor show, that´s working, but when I reset board, it doesn´t run anymore. I have to upload sketch again. I use STM32CubeProgrammer (Serial) for uploading sketch to Bluepill. Could be there any problem?
Yes, everything works normally, until I add include your library & ArduinoOTA.poll(); After reset it freezes as soon as it get ArduinoOTA.poll(); command...
no, but there are examples for alternative bin transports in Advanced section of the examples. and the arduinoOTA upload uses http so in WiFiOTA.cpp in the library source code you can find a function which receives a http upload.