---
title: "TCP port closed"
url: "https://maker.wiznet.io/forum/13463"
markdown_url: "https://maker.wiznet.io/forum/13463/md"
type: "Forum topic"
category: "Wireless"
author: "ExtSol"
created: "2019-08-29T17:04:58+09:00"
last_activity: "2019-09-02T00:17:20+09:00"
language: "en"
views: 587
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# TCP port closed

## Question

Asked by ExtSol on 2019-08-29 in Wireless.

Hy All,

I initialized my wizfi310 module to TCP server mode. When i try to connect its all ok, the wizfi310 module send back messages to me:
[CONNECT 1]
[DISCONNECT 1]

When i start the Advanced port scanner, scan ports i get a following messages:
[CONNECT 1]
[DISCONNECT 0]
[DISCONNECT 1]

Why i got [DISCONNECT 0]? After that, i cant connect to module. Its port 2020 is closed.
Need to reinitialize and working again.

Here is my initialization:
WizFi310 Version 1.0.3.3 (WIZnet Co.Ltd)
AT+MECHO=0
AT+MECHO=0
[OK]
AT+WSET=0,[SSID],
[OK]
AT+WSEC=0,[password]
[OK]
AT+WNET=1
[OK]
AT+SCON=S,TSN,2020,1
[OK]
AT+WJOIN

[Link-Up Event]
IP Addr : 192.168.0.114
Gateway : 192.168.0.1
[OK]

Best Regards:
ExtSol

## Replies

### Reply 1 by wizdaniel, 2019-09-02

Hi

![](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/48.png) ExtSol:

> [CONNECT 1]
> [DISCONNECT 0]
> [DISCONNECT 1]
>
> Why i got [DISCONNECT 0]? After that, i cant connect to module. Its port 2020 is closed.

The message [DISCONECT 0] displayed when your server is down.
The messages [CONECT 1] , [DISCONECT 1] displayed when TCP Client is connected/disconnected.

could you please test the TCP Server as Command mode for Advanced port scanner?
because I tested one of port scanner on the internet(<https://www.advanced-port-scanner.com/>)
that tool tried multiple connection to the Module during the port scan like below.
![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/6/654a9f524150fdf74e0b0f7490285a274c9a0000.png)

so, as your Data mode of your module, your module can keep only 1 connection because of Data mode.

so please test it again with Command mode.

`at+scon=o,tsn,,,2020,0`

---

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