---
title: "W5500 Sn_IMR and Sn_IR Issues"
url: "https://maker.wiznet.io/forum/15277"
markdown_url: "https://maker.wiznet.io/forum/15277/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Mobius1"
created: "2024-09-13T15:10:19+09:00"
last_activity: "2024-09-13T15:10:19+09:00"
language: "en"
views: 12
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 Sn_IMR and Sn_IR Issues

## Question

Asked by Mobius1 on 2024-09-13 in Ethernet Chips.

Hello friends,
I seem to be having an issue where on W5500 TCP Server when I attempt to connect with telnet connection nothing happens. I have check the ports and IP address and code and things seem to be correct logically. I tested the connection via wireshark and the client seems to be attempting to connect as it shows a SYN packet is present.

[![wireshark test](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d743eb5fe63f1ac8059a53205747c635bb6abe2f.png) wireshark test1182×554 26 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d743eb5fe63f1ac8059a53205747c635bb6abe2f.png)

It is to my understanding that once the SYN packet is detected that the Sn_SR should change to SOCK_SYNRECV and then transmits a SYN/ACK packet. This is not happening on my device and I was wonder what I need to do to fix it. Any help is appreciated!

printf(“\r\nSOCKET IS NOW LISTENING\r\n”);

```
uint8_t srData;
while(WIZCHIP_SOCKET_READ(Sn_SR(3) | 0x68) == SOCK_LISTEN) {
	printf("\r\nWAITNG FOR CONNECTION\r\n");
	//CHECK STATUS OF SR IN BEGINNING
	printf("\r\nTHIS IS THE VALUE OF SOCKET 3 SR: %02X\r\n", WIZCHIP_SOCKET_READ(Sn_SR(3) | 0x68));
	
	//Check IMR AND IR
	printf("\r\nTHIS IS THE VALUE OF SOCKET 3 IMR: %02X\r\n", WIZCHIP_SOCKET_READ(Sn_IMR(3) | 0x68));
	printf("\r\nTHIS IS THE VALUE OF SOCKET 3 IR: %02X\r\n", WIZCHIP_SOCKET_READ(Sn_IR(3) | 0x68));
	
	//CHECK STATUS OF SR AT END
	printf("\r\nTHIS IS THE VALUE OF SOCKET 3 SR: %02X\r\n", WIZCHIP_SOCKET_READ(Sn_SR(3) | 0x68));
	
	if (WIZCHIP_SOCKET_READ(Sn_IR(3) | 0x68) == 0x01) {
		printf("\r\nSOCKET IS WELLFORMED\r\n");
	}
	
if (WIZCHIP_SOCKET_READ(Sn_SR(3) | 0x68) == SOCK_ESTABLISHED) {
	printf("\r\nSOCKET ESTABLISHED\r\n");
  	break;
}

delay_ms(5000);
```

}

[![waiting for connection test](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/784a329efaeaba52cb4da53c9acb65ad33eac94c.png) waiting for connection test864×811 10.1 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/784a329efaeaba52cb4da53c9acb65ad33eac94c.png)

---

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