---
title: "Plugged/unplugged ethernet cable"
url: "https://maker.wiznet.io/forum/9834"
markdown_url: "https://maker.wiznet.io/forum/9834/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Daniele"
created: "2014-01-17T09:18:08+09:00"
last_activity: "2017-05-04T08:33:09+09:00"
language: "en"
views: 776
replies: 3
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Plugged/unplugged ethernet cable

## Question

Asked by Daniele on 2014-01-17 in Ethernet Chips.

Hi, I’d like to know if there is a way to understand if the Ethernet cable is plugged or unplugged in w5300.
thanks

## Replies

### Reply 1 by lr15, 2014-01-17

I don’t think so with W5300. But depending on the socket mode you are using, you might have some answer here.

If it’s TCP then check out RTR and RCR registers. If the transmission doesn’t succeed even after the retries they’ll eventually close the socket. So when you do TCP, status register would ideally be in established state as long as everything is fine. If you unplug the cable, the time out will cause the socket to close and the status register will now be in closed state.

### Reply 2 by Daniele, 2014-01-22

Ok, I’ll try the 2 solutions!!!
Thanks to midnightcow and lr15 for the answer.

### Reply 3 by mboehmer, 2014-06-14

midnightcow:

> For monitoring LINKLED, You should connect LINKLED to your host GPIO pin as input.

Dont forget the pullup, otherwise you will read garbage on this GPIO pin.
uC internal pullup on GPIO usually is sufficient.

Michael

---

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