---
title: "[W5500-EVB-Pico] chatserver 에러 TCP connection error :10061"
url: "https://maker.wiznet.io/forum/14874"
markdown_url: "https://maker.wiznet.io/forum/14874/md"
type: "Forum topic"
category: "General"
author: "kimhd99"
created: "2023-04-19T03:08:44+09:00"
last_activity: "2023-04-19T03:08:45+09:00"
language: "en"
views: 424
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# [W5500-EVB-Pico] chatserver 에러 TCP connection error :10061

## Question

Asked by kimhd99 on 2023-04-19 in General.

## [W5500-EVB-Pico]

#include &lt;SPI.h>
#include &lt;Ethernet2.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 100, 22);
IPAddress gateway(192, 168, 100, 1);
IPAddress subnet(255, 255, 255, 0);

// telnet defaults to port 23
EthernetServer server(23);
boolean alreadyConnected = false; // whether or not the client was connected previously

void setup() {

Ethernet.init(17); // 수정한 부분

// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);
// start listening for clients
server.begin();
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

Serial.print(“Chat server address:”);
Serial.println(Ethernet.localIP());
}

void loop() {
// wait for a new client:
EthernetClient client = server.available();

// when the client sends the first byte, say hello:
if (client) {
if (!alreadyConnected) {
// clead out the input buffer:
client.flush();
Serial.println(“We have a new client”);
client.println(“Hello, client!”);
alreadyConnected = true;
}

if (client.available() > 0) {
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.write(thisChar);
}
}
}

출처
<https://blog.naver.com/yusanghyun26/222527712230>

---

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d420e7bb754cd75e14e40e99869fdfd282dcae1c.png) image623×540 11.5 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d420e7bb754cd75e14e40e99869fdfd282dcae1c.png)

Hercules 접속시 TCP connection error :10061 에러 발생
접속이 안됩니다.

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/2/217fcb805f822fd43a59b16a26129a730af1fac2.jpeg) image563×756 53.9 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/2/217fcb805f822fd43a59b16a26129a730af1fac2.jpeg)

다른 아두이노 보드로 chatserver 예제 파일이 동작하는 것은 확인하였습니다.
방화벽 문제는 아닌 것 같습니다.
문제 해결에 도움을 주시면 감사하겠습니다.

제 pc ipconfig 는 아래와 같습니다.
이더넷 어댑터 이더넷:

연결별 DNS 접미사. . . . :
링크-로컬 IPv6 주소 . . . . : fe80::eb8xxxxx:c7e1:dd8b%9
IPv4 주소 . . . . . . . . . : 192.168.100.6
서브넷 마스크 . . . . . . . : 255.255.255.0
기본 게이트웨이 . . . . . . : 192.168.100.1

---

Source: https://maker.wiznet.io/forum/14874
