if ($ser_dev =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) {
$isEthernet = 1;
- $port = IO::Socket::INET->new(PeerAddr => $ser_dev, PeerPort => 23, Proto => "tcp", Type => SOCK_STREAM, Timeout => 1)
+ $port = IO::Socket::INET->new(PeerAddr => $ser_dev, PeerPort => 2323, Proto => "tcp", Type => SOCK_STREAM, Timeout => 1)
or (print("Device not found") && return);
}
else {
# ### author: O.Artz ### #
# ### ### #
# ### ### #
-# ### UPDATE 2020-07-15 ### #
+# ### UPDATE 2020-07-22 ### #
# ### ### #
#####################################################
ETH MAC: 24:6F:28:1E:C5:57
IPv4: 192.168.8.64
-Telnet: 192.168.8.64 23
+Telnet: 192.168.8.64 2323
Visual Status via Board LEDs:
ETH Start -> Green LED blink for 1 sec
//#include <WiFi.h>
//how many clients should be able to telnet to this ESP32
-#define MAX_SRV_CLIENTS 1
+#define MAX_SRV_CLIENTS 10
-WiFiServer server(23);
+WiFiServer server(2323);
WiFiClient serverClients[MAX_SRV_CLIENTS];
//used to check the number every time, cause could changed
{
pinMode(2, OUTPUT); // yellow LED
pinMode(15, OUTPUT); // green LED
- Serial.begin(115200);
+ Serial.begin(57600);
Serial.println("\nConnecting");
WiFi.onEvent(WiFiEvent);
delay(1000);
Serial.print("Ready! Use 'telnet ");
Serial.print(ETH.localIP());
- Serial.println(" 23' to connect");
+ Serial.println(" 2323' to connect");
//visual status for telnet work
digitalWrite(2,LOW);
digitalWrite(15,HIGH);