---
title: "Problem writing in the Sn_DIPR registers"
url: "https://maker.wiznet.io/forum/9614"
markdown_url: "https://maker.wiznet.io/forum/9614/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "jbc"
created: "2013-10-04T13:17:39+09:00"
last_activity: "2017-05-04T08:30:11+09:00"
language: "en"
views: 1023
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Problem writing in the Sn_DIPR registers

## Question

Asked by jbc on 2013-10-04 in Ethernet Chips.

hi,

I’m trying to connect as a client to a server with W5200.

I use a Ethernet Shield V2.0 from [seeedstudio.com](http://seeedstudio.com) and the chip version that i can read in 0x001F register is 0x03.

I can initialize W5200 successfully (with a private ip address and i can ping from my pc to W5200 successfully), and I can open the socket properly and then the socket is in the INIT state.
Then, when I try to write the server’s address in the SnDIPR register, the W5200 does not agree, and when I read these registers to verify that the server ip is entered correctly, tells me that the IP is 0.0.0.0

I am quite sure that the registers are written correctly through SPI. and i don´t know why when I read them again the W5200 responds with 0

the same is true with the Sn_DPORT register
What’s the matter?
thank

## Replies

### Reply 1 by hjjeon0608, 2013-10-07

Hi, jbc.

Try one more after connection established.

DIPR and DPORT register value are not changed immediately.
They are changed after connection established.

Best regards.

### Reply 2 by jbc, 2013-10-07

thank you very much for the reply.

I solved the problem. I did two things:

1.- write the DIPR and DPORT registers before opening the socket (I’ve read in another post).
2.- read those registers for verificartion after conexion stablished.

I think this information should be updated in the datasheet for futures issues.

regards

---

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