---
title: "Is there a way to check whether the Ethernet cable is connected or not?"
url: "https://maker.wiznet.io/forum/15146"
markdown_url: "https://maker.wiznet.io/forum/15146/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "park-bitset"
created: "2024-02-09T09:21:24+09:00"
last_activity: "2024-03-04T08:41:34+09:00"
language: "en"
views: 112
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Is there a way to check whether the Ethernet cable is connected or not?

## Question

Asked by park-bitset on 2024-02-09 in Ethernet Chips.

I’m programming on W5100S-EVB-Pico using [this library(Wiznet/RP2040-HAT-C)](https://github.com/Wiznet/RP2040-HAT-C).
When I try to initialize the wizchip by below code, things go well when the ethernet cable is connected to a proper network.
But when the network is dead or ethernet cable is not connected, the process is stuck inside below codes.

```
wizchip_spi_initialize();
wizchip_cris_initialize();
wizchip_reset();
wizchip_initialize();
wizchip_check();
const wiz_NetInfo wiz_net_info = {
  .mac = {0x00, 0x08, 0xDC, 0x11, 0x22, 0x33},
  .ip = {IP_ADD_0, IP_ADD_1, IP_ADD_2, MY_IP_ADDR},
  .sn = {255, 255, 255, 0},
  .gw = {IP_ADD_0, IP_ADD_1, IP_ADD_2, 1},
  .dns = {IP_ADD_0, IP_ADD_1, IP_ADD_2, 1},
  .dhcp = NETINFO_DHCP
};
network_initialize(wiz_net_info);
```

How can I avoid this?

---

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