- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to send messages from my EP4S230GX device to my computer. I don't know how to use Nios and write linux drivers so I packet UDP frames without using an OS.
My IP is fixed at 192.168.0.1 with mask 255.255.255.0 and MAC address is 10-C3-7B-44-FA-8A. The "1000M Small MAC" IP core is used in my fpga application. I found that wireshark can recognize my udp packets but my applications can not. http://www.alteraforum.com/forum/attachment.php?attachmentid=11493&stc=1 I tried two applications that written in python and matlab as follows python:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
s.bind((192.168.0.1, 4096))
buf=s.recvfrom(65536)
matlab:
u = udp('192.168.0.2',4096,'LocalPort',4096,'LocalHost','192.168.0.1');
fopen(u)
buf=fread(u,1000)
Both of applications prompt timeout after excute their last line. Something is wrong?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At first glance I can't see anything wrong with your code, even if most Python examples that I see don't specify the IPPROTO_UDP parameter when creating the socket object. The documentation also says it can be omitted.
Do you have the Windows firewall enabled? If yes try and turn it off and see if it works. If it does then you can try tuning it on again and just open the port 4096. Did you try sending the UDP packets from another PC? It can help you find out if the problem is on the receiving part on your PC on on the sending part from the FPGA design.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page