Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
IPAddress local_IP(192,168,1,1);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
WiFiServer wifiServer(23);
void setup() {
WiFi.softAPConfig(local_IP, gateway, subnet);
WiFi.softAP("TESTAPNAME","TESTPASSWORD");
WiFi.softAPIP();
Serial.begin(115200);
wifiServer.begin();
}
void loop() {
WiFiClient client = wifiServer.available();
if (client) {
while (client.connected()) {
while (client.available()>0) {
char c = client.read();
Serial.write(c);
}
delay(10);
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// add it to the inputString:
client.write(inChar);
}
}
client.stop();
// Serial.println("Client disconnected");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.