Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5251

MicroPython • Re: pico-to-pico via intenral router: accept () issue

$
0
0
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.
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.

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'))
to
  • connection.sendto(response.encode('UTF-8'), address)
The only difference I can see is that your network is "192.168.1.*" and mine is "192.168.0.*". I wouldn't expect that to be an issue though.

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



Viewing all articles
Browse latest Browse all 5251

Trending Articles