Bill SUCCESS !! As per your suggestion - I changed localhost in WSJT-X to 127.0.0.1 and that did the trick now to covert the output to readable - as str(output) doesn’t work will see what encoding to use in the documentation
THANKS AGAIN - !!! 73 Dan VA3MA On Aug 20, 2016, at 3:36 PM, Bill Somerville <[email protected]> wrote: On 20/08/2016 18:28, Dan - VA3MA wrote: > But I cannot get your or my program to revfrom ?? -just sits there at > that statement ! Hi Dan, the most like problem is that WSJT-X is not sending messages to the interface or port you are binding. Try calling bind with an empty string as the first element of the pair, that will then receive from all interfaces on your machine. If that doesn't get you any messages then check carefully what address and port WSJT-X is set to send to in "Settings->Reporting". Beware of using 'localhost' as the server address as it may not be mapped to the loopback address, always safer to specify 127.0.0.1 to be certain to send to the IPv4 loopback. Another thing to try is to use IPv6, set the server address to '::1' (the IPv6 loopback) in WSJT-X and change your code to: >>> from socket import socket, AF_INET6, AF_INET, SOCK_DGRAM >>> sock = socket (AF_INET6, SOCK_DGRAM) >>> sock.bind (('::', 2237)) >>> while True: sock.recvfrom (1024) ... By using socket.recvfrom(1024) you can see which address incoming datagrams are coming from, don't worry about the service port returned at the moment (that is the reply port if you want to send a reply). By binding to '::' you are accepting datagrams from all IPv6 interfaces including the local loopback. the only difference between socket.recv(n) and socket.recvfrom(n) is that socket.recvfrom(n) tells you the address and sending port of the sender for sending replies to. 73 Bill G4WJS. ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wsjt-devel ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wsjt-devel
