Skip to content

Proposal for a new, more simple Network Upload Notification concept #5617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
holgerlembke opened this issue Nov 22, 2016 · 1 comment
Closed

Comments

@holgerlembke
Copy link

holgerlembke commented Nov 22, 2016

Hi.

I think the current implementation of OTA port detecting is a little bit to buggy. There are a lot of reoccurring issues from people not getting it to work. (/me coming from the esp8266 side) I struggled the better part of some days to get it to work, never had stable success. Opinions about the reason differ, the state of esp8266mdns, jmdns and the Discoverer-concept (why use timers?) inside the IDE...

That said, I think there is way too many and complex software involved, I would like a more basic approach. This will give other hardware a very fast road to OTA update without porting any mdns stuff.

My current solution uses this inside the sketch:

String initmsg1 = "mysoftware version 1.0";

void PostMyself(void) {
  IPAddress broadcastIp(WiFi.localIP() | ( ~WiFi.subnetMask()));

  WiFiUDP udp;
  udp.begin(8765);
  udp.beginPacket(broadcastIp, 8531); 
  udp.print("1\nesp8266 "+initmsg1+"\n8266\n");
  udp.endPacket();
}

It can be located inside a "if (millis()-ticker>5000)"-Timer thing inside the loop(). IDE sees these broadcasts and adds the menue.

Changes are (mainly) at https://github.com/holgerlembke/Arduino-IDE/tree/master/arduino-core/src/cc/arduino/packages/discoverers It is the basic outline, sure needs some work, but should be a good demonstration for this proposal.

I tested it with the current esp8266-ArduinoOTA solution, works.

Opinions?

@sandeepmistry
Copy link
Contributor

This is possible for third party cores now via the pluggable discovery feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants