5 years, 7 months ago.  This question has been closed. Reason: Duplicate question

UDPSocket without DHCP working with brodcast but not for unicast

Hello everyobdy, i have a little experiance in mbed, but a few months ago started working on a complex embeded project, everything was great before starting with connection part. I am using the latest release of mbed-os (5.9.2), imported into compiler from git url. When using UdpSocket with DHCP everything works great, i receive and send broadcast and also unicast packages. Packages are 20bytes long nothing special. But when assigning static IP address to nucleo (ip address is valid and non-taken), problem begins. I get positive return value from ethernet interface connect function, and can receive packets regulary. Sending broadcast packets also works fine in this scenario. But when sending to a specific ip (in same network), udpsocket function returns 20 (which is a number of bytes intended to be sent) but nothing leaves the device. Wireshark shows brodcast packets from device, but unicast cannot be found.

Tryed with different versions of mbed-os, didnt help. I have 3 nucleo F429ZI boards, doesnt work on any of them. Also tryed with DHCP on/off but with static IP doesnt work. Only if DHCP is the one who gives the ip address. I am working with non blocking udpsockets, binded to port that works normal for other embeded devices, without any threads, everything is in free run.

Thank you in advance, for any possible help Nikola

Question relating to:

STM32 Nucleo-144 development board with STM32F429ZIT6 MCU, supports Arduino, ST Zio and morpho connectivity