Make necessary changes to support MDNS name lookup of camera server
This commit is contained in:
parent
cc8d401172
commit
58c584e456
|
@ -6,6 +6,7 @@
|
|||
#include <ArduinoOTA.h>
|
||||
#include "src/parsebytes.h"
|
||||
#include "time.h"
|
||||
#include <ESPmDNS.h>
|
||||
|
||||
|
||||
/* This sketch is a extension/expansion/reork of the 'official' ESP32 Camera example
|
||||
|
@ -712,7 +713,16 @@ void setup() {
|
|||
ArduinoOTA.begin();
|
||||
} else {
|
||||
Serial.println("OTA is disabled");
|
||||
|
||||
if (!MDNS.begin(myName)) {
|
||||
Serial.println("Error setting up MDNS responder!");
|
||||
}
|
||||
Serial.println("mDNS responder started");
|
||||
}
|
||||
|
||||
//MDNS Config -- note that if OTA is NOT enabled this needs prior steps!
|
||||
MDNS.addService("http", "tcp", 80);
|
||||
Serial.println("Added HTTP service to MDNS server");
|
||||
|
||||
// Set time via NTP server when enabled
|
||||
if (haveTime) {
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
*/
|
||||
|
||||
|
||||
/* Give the camera a name for the web interface */
|
||||
/* Give the camera a name for the web interface
|
||||
* A word of warning: This name is also used for OTA updates and MDNS addressing.
|
||||
* Pick something convenient!
|
||||
*/
|
||||
#define CAM_NAME "ESP32 camera server"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue