---
title: "Project Description & Issue Help Needed"
url: "https://maker.wiznet.io/forum/15812"
markdown_url: "https://maker.wiznet.io/forum/15812/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "ayeung"
created: "2025-07-22T21:51:30+09:00"
last_activity: "2025-07-23T15:15:40+09:00"
language: "en"
views: 2
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Project Description & Issue Help Needed

## Question

Asked by ayeung on 2025-07-22 in Ethernet Chips.

Hello,

I'm working on a project using a W5500 Ethernet module with a PIC32 microcontroller using MPLab X v6.0. The goal is to:

Use DHCP to obtain an IP address (with fallback to static IP if DHCP fails).

Open a TCP socket on port 23 (Telnet).

Wait for an incoming client connection.

Use external interrupt from the W5500 to detect socket events like connect, disconnect, and data received.

Echo incoming messages back to the client, or respond with network info depending on the command sent.

Show debug messages over UART1.

Everything builds fine and I see this over UART:

`>> DHCP failed, using static IP >> Applying Default Network Settings Network Information: Assigned IP: 192.168.1.20 Subnet Mask: 255.255.255.0 Gateway: 192.168.1.1 DNS Server: 0.0.0.0 MAC Address: 00:08:DC:76:EC:D1 >> DHCP IP: 192.168.1.20 Waiting for connection... >> Socket listening on port 23 `

But when I try to connect using Telnet to `192.168.1.20:23`, I get:

`Could not open connection to the host, on port 23: Connect failed`

---

### **Suspected Issue:**

I think the interrupt may not be detecting the connection event (`Sn_IR_CON`) properly, or the socket never transitions to `SOCK_ESTABLISHED`. After connecting the INTn pin to an oscilloscope, the signal stays high and doesn't drop low.

Also, I was previously able to connect to telnet without the interrupt. Is there any other way to test the INTn pin of the WIZnet WIZ550io?

---

Attached is what I have in my main.c file. Any suggestions would be greatly appreciated.

Thanks!

Attachments:

- [test.c](https://maker.wiznet.io/forum/getAttach.asp?aidx=271)

## Replies

### Reply 1 by Aimee0, 2025-07-23

This is a reference link you can use when verifying interrupt behavior.

<https://github.com/WIZnet-ioNIC/WIZnet-PICO-FREERTOS-C/blob/main/examples/tcp_client_over_ssl/wizchip_tcp_client_over_ssl.c>

Also, when using ctlwizchip(CW_GET_INTERRUPT, &sir); inside the interrupt handler, it returns a 16-bit value where the upper 8 bits represent the SIR (Socket Interrupt Register) and the lower 8 bits represent the IR (Common Interrupt Register).
If you want to check the SIR register specifically, you can use the getSIR function.

---

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