开发者

Python socket for receiving UDP packages from an FPGA

I am trying to read the UDP packages in python, which were sent from an FPGA. I see the packages in wireshark, and they look allright. Python, h开发者_C百科owever does not receive anything when I use this simple script:

import socket
import sys

HOST, PORT = "192.168.1.1", 21844
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.connect((HOST,PORT))
received = sock.recv(1024)


You don't connect with a UDP server (I assume the Python code is the server), you bind.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜