cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joe306
Scholar
Scholar
790 Views
Registered: ‎12-07-2018

UDP Server Example

Hello, I am not an Ethernet expert so this is probably an easy question for the forum members. I have a custom board with a Zynq Ultrascale+ MPSoc XCZU7EV. I have configured the PS for an Ethernet connection. I have created an application that implements the UDP Client example in Vitis and was able to send data from the FPGA to my QT program that prints out the transmitted data. Now I'm running the UDP Server example which receives UDP data. I have a simple QT application to transmit UDP data to my custom hardware.

The problem I have is when running the UDP Server example I don't know which function I can look at that will show where the received UDP packet is saved? I want to verify the received data.

Can anyone help me please?

Thank you

Joe

0 Kudos
5 Replies
nanz
Moderator
Moderator
727 Views
Registered: ‎08-25-2009

Hi @joe306 ,

In Linux environment, you can run tcpdump on the board, for example:

tcpdump -i eth0 'udp'

Then you can view it in the terminal or add "-w test.pcap" to store the data in the pcap file.

But in baremetal, you may not have the terminal on the board. However, you can still open wireshark to monitor all the traffics transmitted to the board.

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos
joe306
Scholar
Scholar
717 Views
Registered: ‎12-07-2018

Hello, thank you for responding to my post. Do you know which variable or which function captures the data?

Thank you

Joe

0 Kudos
nanz
Moderator
Moderator
664 Views
Registered: ‎08-25-2009

Hi @joe306 ,

I am not sure I understand exactly what you asked.

But "tcpdump" is the function you can use to dump the data.


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos
joe306
Scholar
Scholar
658 Views
Registered: ‎12-07-2018

Hello, sorry I should have asked, what array, buffer or other C variable can I look at in the debug mode to see the received data? If I am not running Linux does this not work?

Respectfully,

Joe

0 Kudos
joe306
Scholar
Scholar
591 Views
Registered: ‎12-07-2018

Hello, I found the variable that you can access the Received UPD Data on the Server.

pic.jpg

The "udp_perf_server" example is a great example to run. It will receive UDP data and then transmit the same data back to the Client. I have QT application running on a PC that transmits 10 words and receives back 10 words from my custom board. Things are going good!

The problem is on the server side. I know p->payload is the interface to the received UDP data but when I send data over and over again the data words are not the same. I am not using a MicroBlase IP, my code is running on A530 core.

Can you please tell me what I must do to read the received data properly?

Is the payload 32 bits?  Am I using the wrong kind of point?

If the Client sends 0,0,0,0,0,6,7,8,9,10 it does receive that back from the Server, that good!

But on the Server I print: 0,6,2320,0,3568,3568,3568,3568,3568

Any ideas what I am doing wrong?

Thank you

0 Kudos