ask specific address from client
This commit is contained in:
parent
6147be7728
commit
86eb3a9f59
1 changed files with 9 additions and 3 deletions
|
|
@ -4,13 +4,16 @@
|
|||
// D. Yi @ 2023 5 5
|
||||
//
|
||||
|
||||
//wi-fi
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
////network!
|
||||
const char* ssid = "nolink";
|
||||
const char* password = "2222277777";
|
||||
const int NETWORK_PORT = 27016;
|
||||
|
||||
//wi-fi
|
||||
#include <ESP8266WiFi.h>
|
||||
IPAddress local_IP(192, 168, 221, 114);
|
||||
IPAddress gateway(192, 168, 221, 1);
|
||||
IPAddress subnet(255, 255, 255, 0);
|
||||
|
||||
//wi-fi event handlers : re-connect automatically
|
||||
WiFiEventHandler wifiConnectHandler;
|
||||
|
|
@ -66,6 +69,9 @@ void setup()
|
|||
Serial.println();
|
||||
Serial.print("Connecting to ");
|
||||
Serial.println(ssid);
|
||||
if (!WiFi.config(local_IP, gateway, subnet)) {
|
||||
Serial.println("STA Failed to configure");
|
||||
}
|
||||
WiFi.begin(ssid, password);
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
// Serial.print(".");
|
||||
|
|
|
|||
Loading…
Reference in a new issue