I ran your client and server code on my Pico W and it worked flawlessly after adjusting network address. I even got replying from the server working. No errors or exceptions at all.FYI, here are my 3 pieces of code if you are interested. The first one is the server. The second one is the standalone PC python code which acts like a client. The third one is the simple_client.py that is my code for using the pico-w as a client.
On getting reply working; don't close the socket, client and server, and for replying in the server change -
- connection.send(response.encode('UTF-8'))
- connection.sendto(response.encode('UTF-8'), address)
Maybe it is something to do with the router, as unexpected that may seem. Maybe a signal strength issue, interference, power supply ?
Statistics: Posted by hippy — Tue Mar 12, 2024 4:15 pm