views:

79

answers:

2

Hi all,

I'm trying to send UDP packets from my PC to an FPGA via my laptop's ethernet cable. I've been using Java's DatagramPacket and DatagramSocket to send the UDP packets. However, these packets will only send over my laptop's wireless interface. How can I specify that the packets should go through my ethernet interface?

Thank you.

+1  A: 

Maybe it works if use the public DatagramSocket(int port, InetAddress laddr) constructor to create your DatagramSocket and pass it the InetAddress of your local ethernet interface.

x4u
A: 

You may of course bind your DatagramSocket to a specific interface as x4u suggested, but if your UDP packets are sent on an incorrect interface, I would rather assume that the routing table of your operating system's network stack is configured incorrectly, so that the operating system believes your FPGA to be reachable through the WLAN interface instead of your ethernet interface.

jarnbjo