mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1128] CANNOT SET STATIC IP #966
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#966
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @birrex on GitHub (Sep 18, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1128
Hello, I have many days looking for a solution to my problem, I am trying to connect to the wifimanager with a fixed IP, but I cannot.
My case:
I want to connect my nodemcu to a Wi-Fi network through the wifimanager library, then I want to put the fixed IP on the device, to make url requests to do various tasks but I can't.
This is my code
I have searched a lot and I can not find a solution.
`/*
*/
#include <ESP8266WiFi.h>
//#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
// change these values to match your network
//char ssid[] = "MyNetwork_SSID"; // your network SSID (name)
//char pass[] = "Newtwork_Password"; // your network password
WiFiServer server(80);
String header = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n";
String html_1 = "<html><head></head>
test
";String html_2 = "";
String html_4 = "
String request = "";
int LED_Pin = D1;
String onlyURL;
int index1;
int index2;
String NoUrl;
String NoUrl3;
int Index1 ;
int Index2;
String NoUrl1;
String onlyURL1;
WiFiManager wifiManager;
void setup()
{
pinMode(LED_Pin, OUTPUT);
} // void setup()
void loop()
{
//here not work!!!!!!
}
} // void loop()`
@EgHubs commented on GitHub (Dec 11, 2020):
Just try this example (AutoConnectWithFSParametersAndCustomIP).
But first, you may need to reset your wifi settings which can be done by uncommenting this line
wifiManager.resetSettings();and then reupload the code with that line commented.
@jordanadania commented on GitHub (Apr 15, 2021):
Bad Link
@tablatronix commented on GitHub (Apr 15, 2021):
setSTAStaticIPConfig only works when you are using autoconnect and before anything
@EgHubs commented on GitHub (Apr 16, 2021):
My bad, link updated