LoPy use WIFI to communicate with Computer
-
Hello
i am a beginner of LoPy, i am now trying do to a project that use LoPy connect to the same WiFi as my computer.
i want to achieve that both device using TCP/IP or any other
methon to communicate, when my LoPy receive any message from my computer, i can send it using LoRa to another LoPy.
Any source code i can using to try out
Thanks for help and reply!! -
I cannot supply a complete solution to you, but I just started tinkering around with with wifi on the LoPy the other night. I'm learning one step at a time and this is what I learned so far.
SSID = 'yourwifiSSID'
AUTH = 'yourWPA2password'
wlan = WLAN(mode=WLAN.STA) #Set wlan mode to station
wlan.mode() #Check what mode is running on wlan.
nets = wlan.scan() # Scan for networks and list them in
print(nets) #Print available networkswlan.connect(SSID, auth=(WLAN.WPA2, AUTH), timeout=5000) #Connect
if (wlan.isconnected()): #Returns true
print("Connected to wifi") -
@stroggo thanks, i am able to connect my LoPy with the WiFi, i am thinking how to make it communicate with my computer in the same WiFi environment.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login