UDP packet fails to transmit to object when I have two ethernet connections

2 views (last 30 days)
I am trying to send UDP packets to an FPGA through a Gigabit Ethernet to USB port. The FPGA has an IP and MAC address hard coded and works fine when that is the only Cat6 cable I have connected to the computer. The error occurs when I connect another Cat6 cable to my computer's network card. The transmissions stop and MATLAB reports an error in the fwrite block (see below). When I unplug the internet connection I have access to the FPGA again. Hooking up the FPGA to the network is not an option in this case. I've checked my packet parameters and have been using wireshark to monitor the packets, no luck so far. I am currently using 64-bit MATLAB with a Windows 7 OS. Can any one help?
MATLAB error: ??? Error using ==> icinterface.fwrite at 191 An error occurred during writing.
Error in ==> regwrite at 18 fwrite(uobj,[a,d]);
MATLAB code that the error links to: % Call the write java method. try fwrite(igetfield(obj, 'jobject'), cmd, length(cmd), type, mode, signed); catch aException error('MATLAB:serial:fwrite:opfailed', aException.message); end

Answers (1)

Jason Ross
Jason Ross on 1 Jul 2011
I suspect when you attach the second network cable, the network is trying to route the packets to that IP address, which likely exists on the Internet as a "real" address. I'd suggest resetting the IP of your FPGA to a "private" IP address (<http://en.wikipedia.org/wiki/Private_network>) and seeing if that takes care of it.
  1 Comment
David
David on 1 Jul 2011
The original IP of the FPGA was set to 169.254.166.155 and the USB-to-Gbit controller was set to 169.254.166.150 which is listed as a range for private networks but is considered APIPA only. Not sure what that really means, or if it should matter to me. I will try IPs in the 172.16.0.0 through 172.31.255.255 or 192.168.0.0 through 192.168.255.255 ranges. Thanks for the suggestion.

Sign in to comment.

Categories

Find more on System on Chip (SoC) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!