WIZnet Developer Forum

Disabling the reception of broadcast packets in UDP (mbed)

Hi,

I have a W7500 based board that runs in a local network with other device. The other device broadcast an UDP packet each 2 seconds. I’ve realized when the other device broadcast a packet, the W7500 fails most of the time when trying to transmit a UDP packet. Both W7500 and the device runs on the same port. When the other device is not broadcasting, everything works fine.
The function sendto() do not return any error, but the packet is not transmitted to the router.
I have no other traffic on the router, so it is impossible to have a lot of failed packets after receiving broadcast.

Edit:

I temporary solved this issue opening another UDP socket to transmit the message. I bind with dummy port as i only wanna transmit. Any ideia what is going on?

Best regards

Dear joaopaulob

I think you have to use another socket.
There are maximum 8 socket in W7500.
And I recommand to use TCP protocol.

Thanks

Is there a reason to have to use another socket?
It works, but i would like to know what is going on.

Thanks

I’m worried about some errors in your code.
If you need the example for UDP Broadcasting, you can refer to the following link.

https://github.com/Wiznet/WIZ550SR/blob/master/WIZ550SR_App/src/Configuration/ConfigMessage.c
void do_udp_config(uint8_t sock)
{

}

It’s the commerical product. So source code is not simple.
But it would be helpful if you could figure out the code.

Thanks.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.