Hey all!
Trying to send a dummy message from pynq-z2 to host using this protocol:
hostListen.py
:
import socket
host = "192.168.2.1" # FPGA IP
port_ = 9091 # Shared port
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((host, port_))
s.listen()
conn, addr = s.accept()
with conn:
print(f"Connected by {addr}")
while True:
data = conn.recv(1024)
if not data:
break
conn.sendall(data)
z2SendPing.ipynb
:
import socket
host = "192.168.2.1" # The server's hostname or IP address
port_ = 9091 # The port used by the server
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((host, port_))
s.sendall(b"Hello, world")
data = s.recv(1024)
print(f"Received {data!r}")
But the ping-er stalls …
Does anyone know what the issue is?
If it helps; this is my connection config on windows:
PS C:\Users\...> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5097:8a00:5ec2:25fe%18
IPv4 Address. . . . . . . . . . . : 192.168.2.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Wireless LAN adapter Local Area Connection* 1:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 10:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::14cd:fe3c:9991:cfd7%42
IPv4 Address. . . . . . . . . . . : 172.24.144.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
And this is the Z2 config:
root@...:/# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::205:6bff:fe02:6ab8 prefixlen 64 scopeid 0x20<link>
ether 00:05:6b:02:6a:b8 txqueuelen 1000 (Ethernet)
RX packets 13478 bytes 6199746 (6.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12932 bytes 7722885 (7.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 28 base 0xb000
eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.99 netmask 255.255.255.0 broadcast 192.168.2.255
ether 00:05:6b:02:6a:b8 txqueuelen 1000 (Ethernet)
device interrupt 28 base 0xb000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 45006 bytes 4340801 (4.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 45006 bytes 4340801 (4.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Thanks!