My Windows7 UDP server with the code below from wiki.python.org is not working.
I am sending a UDP packet from an Arduino , but nothing is being received. I think the problem is that TCPview says the socket exists, but it does not say "listening". I'm not certain that it should say "listening" like most other ports, but I'm guessing it should.
I am a new Python user, but I have a lot of networking experience and I think that have configured my routers and firewalls correctly.
Any ideas?
-----------------------------------------------code ----------------------
I am sending a UDP packet from an Arduino , but nothing is being received. I think the problem is that TCPview says the socket exists, but it does not say "listening". I'm not certain that it should say "listening" like most other ports, but I'm guessing it should.
I am a new Python user, but I have a lot of networking experience and I think that have configured my routers and firewalls correctly.
Any ideas?
-----------------------------------------------code ----------------------
1 2 3 4 5 6 7 8 9 10 11 12 |
import socket UDP_IP = "0.0.0.0" UDP_PORT = 9000 sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP sock.bind((UDP_IP, UDP_PORT)) while True : data, addr = sock.recvfrom( 1024 ) # buffer size is 1024 bytes print "received message:" , data |