When I tried this code
Code: Select all
#include "esp_camera.h"
#include <WiFi.h>
#include "camera_pins.h"
const char* ssid = "xxxxxxxxxx";
const char* password = "xxxxxx";
const char* hostname = "Sillage";
// Set your Static IP address
IPAddress local_IP(192, 168, 1, 208);
// Set your Gateway IP address
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 0, 0);
IPAddress primaryDNS(192, 168, 1, 1); //optional
IPAddress secondaryDNS(192, 168, 1, 1); //optional
void setup() {
........
WiFi.disconnect(); //Prevent connecting to wifi based on previous configuration
WiFi.setHostname(hostname);
// Configures static IP address
if (!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
Serial.println("STA Failed to configure");
}
WiFi.begin(ssid, password);
............
When i tried with a dynamic hostname is wake Sillage
What is the problem
thank you so much