---
title: "Force close TCP connection"
url: "https://maker.wiznet.io/forum/11773"
markdown_url: "https://maker.wiznet.io/forum/11773/md"
type: "Forum topic"
category: "Serial-to-Ethernet & ConfigTool"
author: "Techne"
created: "2016-04-04T07:13:25+09:00"
last_activity: "2017-05-04T08:38:35+09:00"
language: "en"
views: 659
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Force close TCP connection

## Question

Asked by Techne on 2016-04-04 in Serial-to-Ethernet & ConfigTool.

Hi,

How can I, from the MCU side, force a FIN packet to be sent from the WIZ107SR?

I have been looking around here in the forum, but haven’t been able to find any similar question.

My situation is this: I have a MCU that periodically sends heartbeats to a server. This MCU should just send the heartbeat (a small TCP packet) and then close the connection.

/Toby

## Replies

### Reply 1 by irina, 2016-04-08

Hi, Toby.
WIZ107/108SR device can forced disconnect (send FIN packet) to server when switching device mode.

1. TCP connect and Send the heartbeat packet to server

2. Switch to command mode using 3-byte mode switch trigger code (forced send the FIN packet)

3. Switch to data mode using ‘EX’ command

Thanks.
Eric.

---

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