---
title: "W5500 - Arduino Ethernet2 Udp.endPacket() freezes"
url: "https://maker.wiznet.io/forum/13996"
markdown_url: "https://maker.wiznet.io/forum/13996/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "josr"
created: "2020-09-05T07:04:46+09:00"
last_activity: "2020-09-07T23:31:27+09:00"
language: "en"
views: 1180
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 - Arduino Ethernet2 Udp.endPacket() freezes

## Question

Asked by josr on 2020-09-05 in Ethernet Chips.

Hi,

I am using a W5500 chip. This works (with the default Arduino Ethernet 2 library) but if my internet is down, then `Udp.endPacket();` results in a freeze/hang.

So it seems that the timeout is not working. Should I use a different library for W5500 (if yes, which one?)

Thanks, Jos

## Replies

### Reply 1 by irina, 2020-09-07

Did you use the UDP example provided by arduino?
If no, the first thing to do is check out the UDP send/recv example.
Also, please add this debug message your code.

```
Serial.print("Udp.beginPacket is ");Serial.println(Udp.beginPacket(ntpServer, ntpPort));
Serial.print("Udp.write is ");Serial.println(Udp.write(packetBuffer, NTP_PACKET_SIZE));
Serial.print("Udp.endPacket is ");Serial.println(Udp.endPacket());
```

If Udp.endPacket don’t return the value, you are running out of SRAM,that would cause corrupted variables.

---

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