---
title: "How to Not Listen to Broadcast in TCP Server"
url: "https://maker.wiznet.io/forum/13256"
markdown_url: "https://maker.wiznet.io/forum/13256/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Mtuan"
created: "2019-03-29T16:48:50+09:00"
last_activity: "2019-03-29T20:27:38+09:00"
language: "en"
views: 523
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# How to Not Listen to Broadcast in TCP Server

## Question

Asked by Mtuan on 2019-03-29 in Ethernet Chips.

I set my TCP Server in the SOCK_LISTEN (S0_SR = 0x14) all the time, so it can receive and immediately reply to a request from a peer every 100ms. I am polling S0_SR every 10ms, and everything works fine. However, the broadcast “Who has…” crew up my app …???

After receiving a broadcast message, my S0_SR was changed to 0x01, 0x02, and 0x03 with S0_IR interrupt (CON, RECV, SEND_OK). After that, my code puts it back to the SOCK_LISTEN mode again. During the broadcast, I lost several requests from my peer, and finally the peer sent a DISCONN request.

Is there anyway to avoid the response to the broadcast or any work around this, please help.

Thank you very much.

## Replies

### Reply 1 by Eugeny, 2019-03-29

“Who has” is an ARP packet working at level 2. TCP/IP is at level 4. ARP packets must not affect TCP communication.

But it will affect overall communication if you use W5500 in MAC RAW mode.

![](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/48.png) Mtuan:

> After receiving a broadcast message, my S0_SR was changed to 0x01, 0x02, and 0x03

I see your other post asking about these states. I never seen them, but they may exist and be transitional if you poll device very quickly.

![](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/48.png) Mtuan:

> with S0_IR interrupt (CON, RECV, SEND_OK).

But this clearly means there was a communication in place. Please share Wireshark log.

---

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