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

    Problem with WiFi connection

    Scheduled Pinned Locked Moved LoPy
    lopywifitutorial
    6 Posts 3 Posters 2.0k Views 3 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.
    • R Offline
      rahul
      last edited by

      Hi Forum members,

      I am new to use #LoPy which I bought recently. I was following the tutorials and while setting up the WiFi somehow I totally lost the connection to #LoPy and cannon even able to reset with button provided. What I have done was copying this piece of code to boot.py and restart thats it.

      from network import WLAN
      wlan = WLAN(mode=WLAN.STA)
      nets = wlan.scan()
      for net in nets:
      if net.ssid == 'mywifi':
      print('Network found!')
      wlan.connect(net.ssid, auth=(net.sec, 'mywifikey'), timeout=5000)
      while not wlan.isconnected():
      machine.idle() # save power while waiting
      print('WLAN connection succeeded!')
      break

      Yes, of course, I have edited the file with my #WiFi credentials.

      Let me know what I have done wrong and how I can get the #LoPy again working.

      Thanks in advance.

      Rahul.

      RobTuDelftR 1 Reply Last reply Reply Quote 0
      • RobTuDelftR Offline
        RobTuDelft @rahul
        last edited by

        @rahul You can boot in safe mode, or use Atom plugin for serial communication to still access it. Have you tried that?

        Without data you're just another person with an opinion.
        Hackster | About me

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rahul @RobTuDelft
          last edited by

          @RobTuDelft Thanks for the quick reply. Safe boot seems quite tricky as I have lifted up the G20 pin while booting (correct me if I am wrong) and somehow either I cannot do it properly or is not working. About the Atom, how can I access the atom plugin if LoPy is not get connected? At plugin I am getting this error:
          Connecting on 192.168.4.1....
          Connection error: Error: Login time out

          L RobTuDelftR 2 Replies Last reply Reply Quote 0
          • L Offline
            livius @rahul
            last edited by

            @rahul
            as you use G20 i assume you have expansion board
            try connecting by UART
            i do not work with Atom but i suppose there is possibility to change connection from TCP/IP to UART.

            Or use putty or Arduino IDE and there is Commport monitor

            think about people first, then computers

            1 Reply Last reply Reply Quote 0
            • RobTuDelftR Offline
              RobTuDelft @rahul
              last edited by

              @rahul With the Atom plugin you can specifiy the com port to use in the settings. So you would change the ip-adress to a serial port. Username and password are not needed for serial coms. Under 'More' you can also find the option to 'Find Serial Ports'.

              Without data you're just another person with an opinion.
              Hackster | About me

              R 1 Reply Last reply Reply Quote 0
              • R Offline
                rahul @RobTuDelft
                last edited by

                @RobTuDelft thx for the help.

                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