开发者

Python socket for receiving UDP packages from an FPGA

开发者 https://www.devze.com 2022-12-31 18:55 出处:网络
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

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

精彩评论

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

关注公众号