Click “Read the original text” to access more VxWorks resources
Overview
This article discusses the key points of UDP network communication between VxWorks 6.8 and Windows.
Code Description
On the Windows side, we ran a UDP server program named win_udpServer.ext, designed by vxbus.com.
On the VxWorks 6.8 side, we designed a UDP client program code named mkvxUdpClient.c.
Testing Steps
On the Windows Side
Open the command line terminal console, then switch to the directory where win_udpServer.exe is located, and type the name of the application win_udpServer.exe, as shown in the figure below:

It will show how to correctly start the application, where we can type win_udpServer.exe 5002, as shown in the above figure.
After starting the application, we can see the following image:

From the above figure, we can see that the Windows IP address is “192.168.128.240”.
On the VxWorks 6.8 Side
On the VxWorks 6.8 shell, type mkvxUdpClient “192.168.128.240”, as shown in the figure below:

On the Windows Side
We can see that the VxWorks 6.8 client continuously sends data to the Windows server, as shown in the figure below:

Key Points
On VxWorks
To receive and send larger data buffers (for example, 10240 bytes each time), we should increase the macros for “default socket receive buffer size” and “default socket send buffer size”. Here we change the default value from “10000” to “200000”.

On Windows
Similar to VxWorks, we should increase the data buffer of the “winUdpServer.c” program.
And remember to add “libwsock32.a” to the linker in the project options, as shown in the figure below:
