from socket import *HydraRaptor replies with its x,y,z coordinates and the number of steps remaining. The reply packet arrives at my PC which then sends an ICMP destination unreachable (port unreachable) message back. I have no idea why. netstat -ad shows :
# Set the socket parameters
hydra = "10.0.0.42"
inPort = 21000
inAddr = (hydra,inPort)
outPort = 21001
outAddr = ("localhost",outPort)
buf = 1024
# Create sockets
sendSock = socket(AF_INET,SOCK_DGRAM)
recvSock = socket(AF_INET,SOCK_DGRAM)
# Send a get status command
cmd = "\x12\x34\x56\x78\x00"
print "Sending message ....."
# Receive the reply
data,addr = recvSock.recvfrom(buf)
print " Received message '", data, "'"
print "Read failed"
# Close sockets
UDP shuttle:21001 *:* 2412Which looks to me to show that the port is being listened to. I have tried turning my firewall off but that made no difference. I am sure the problem is at the PC end because Ethereal shows me that the packets are well formed. I have had enough for this evening. Any Python socket experts out there? I have never done sockets in Python before.