UDP packet fails to transmit to object when I have two ethernet connections
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
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.
See Also
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!