python-udp icon indicating copy to clipboard operation
python-udp copied to clipboard

How about an example for a local network?

Open StefanL38 opened this issue 4 years ago • 0 comments

Hello,

so far I have only found python-UDP-examples that use localhost or 127.0.0.0.1. What changes have to be made to make it work in my local network (= local WiFi-network.)

I have found a very easy to use example that uses ESP8266 microcontrollers where two ESP8266 µC connect to the local WifI thrugh SSID and WPA-key and then send/receive UDP-packets. So if a microcontroller can do it it should be quite easy to code for python But If I change the IP-adress from 127.0.0.1 to the IP-adress of the ESP8622 that sends the UDP-message and I try to setup the python-UDP-server to receive theses messages I get an error-message from python saying

[WinError 10049] the requested adress is not valid in this context.

Now I'm stumped.

Your demo does not use any IPadress at all. Do you happen to know of some other demo-code that shows how to exchange UDP-messages between two computers both connected to a local network using adresses like

example 192.168.178.20 and 192.168.178.21 ???

I'm really astonished that google did not find dozens of examples for the 192.168.178.20 / 192.168.178.21 situation

best regards Stefan

StefanL38 avatar Mar 29 '21 19:03 StefanL38