Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    LoPy use WIFI to communicate with Computer

    Scheduled Pinned Locked Moved LoPy
    lopylopy-wlanlopy wifi
    3 Posts 2 Posters 1.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1 Offline
      150716T
      last edited by

      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!!

      1 Reply Last reply Reply Quote 0
      • S Offline
        Stroggo
        last edited by

        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 networks

        wlan.connect(SSID, auth=(WLAN.WPA2, AUTH), timeout=5000) #Connect
        if (wlan.isconnected()): #Returns true
        print("Connected to wifi")

        1 1 Reply Last reply Reply Quote 0
        • 1 Offline
          150716T @Stroggo
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0

          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
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom