Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 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