mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1284] Hello Could someone take a look at my #1101
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#1101
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 @Moriscoc on GitHub (Aug 26, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1284
Hello
Could someone take a look at my code where is the error of my project with Esp8266 which is crashing in the wifiMonager configuration web when I near the wifi password configuration button
here the program to send data through the serial port.
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
WiFiServer server(80);
// Variável para armazenar a solicitação HTTP
String header;
void setup() {
Serial.begin(9600);
// WiFiManager
// Inicialização local. Uma vez que seu negócio esteja concluÃdo, não há necessidade de mantê-lo por perto
WiFiManager wifiManager;
wifiManager.autoConnect("AutoConnectAP");
Serial.println("Connected.");
server.begin();
initWifi();
}
void loop(){
}
void initWifi() {
WiFiClient client = server.available(); // Listen for incoming clients
if (client) { // If a new client connects,
Serial.println("New Client."); // print a message out in the serial port
String currentLine = ""; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client's connected
if (client.available()) { // if there's bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
header += c;
if (c == '\n') { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row.
// that's the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println("Connection: close");
client.println();
}
}
@Moriscoc commented on GitHub (Aug 26, 2021):
Hello
Could someone take a look at my