Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

UDP sendto() problems

Honored Contributor II



I'm having some strange problems with sending udp data using sendto() and was wondering if this is a known issue?  


I currently have multiple tasks running network applications, 4 tcp/ip sockets sending and receiving on multiple ethernet interfaces, as well as three UDP sockets using recvfrom() to receive packets. However, I'm unable to send data using sendto(). It's not a software problem as I've tested the very same network code in several linux distros and it works as expected. 


One really strange thing I've noticed is, if I create a recvfrom() before the sendto() and send a packet from the application waiting to receive, then the application on the board actually does send to the host over the specified port, but only when this is done.  


My platform looks like this, 


Cyclone-III Dev board 

Nios II processor 

Iniche network libraries 



Thanks for any help in advance! 

0 Kudos
3 Replies
Honored Contributor II

Maybe an ARP problem? 

Responding to the ARP request (sent from the remote system before it sends the datagram) may wll add an arp table entry on the fgpa. 

If true, then a ping is also very likely to be enough.
Honored Contributor II

Ok, I'll try to ping from the remote and see if I get the same result. I think you may be right and something is going wrong with the ARP request and reply. I'll also try to monitor the network traffic.

Honored Contributor II

I should have mentioned previously that I'm communicating with the dev board using a Centos VMware Player appliance. Using Wireshark, I've confirmed that the UDP packets are being read in correctly by the host Windows OS, but they never reach the VM. It seems there is a routing issue between the two.