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

    Wlan Probleme

    Scheduled Pinned Locked Moved WiPy 2&3
    wipylopywlannetwork
    4 Posts 2 Posters 338 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.
    • W Offline
      Wolli01
      last edited by

      Who can help? My Wipy connects to a TP-Link router at home without any problems. When I'm with my colleague, he has a Fritzbox, the Wipy connects once, sends data and does not connect when restarting. Does anyone know what this can be? Here is a program excerpt from the connection.

          if (Verbindung) == 1:
              from network import WLAN
              wlan = WLAN(mode=WLAN.STA)
      
              nets = wlan.scan()
              for net in nets:
                  if net.ssid == settings.Router:
                      print('Netzwerk gefunden!')
      
                      if not wlan.isconnected():
                          wlan.connect(net.ssid, auth=(WLAN.WPA2, settings.Pass), timeout=5000)
      
                      while not wlan.isconnected():
                          machine.idle() # save power while waiting
                      print('WLAN-Verbindung erfolgreich!')```
      robert-hhR 1 Reply Last reply Reply Quote 0
      • W Offline
        Wolli01
        last edited by

        I had that first.
        wlan.connect(net.ssid, auth=(net.sec, settings.pass), timeout=5000)
        so it runs on the Fritzbox only once and then it doesn't connect anymore.

        Have it then with
        wlan.connect(net.ssid, auth=(WLAN.WPA2, settings.Pass), timeout=5000)
        and the first.
        So far I don't know if I can do it yet, the colleague with the FritzBox hasn't contacted me yet.

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @Wolli01
          last edited by robert-hh

          @wolli01 At least I can confirm the same behavior. It connects to a TP-Link AP without problems, but with a Fritzbox router it behaves different. After power on, it connects fast. Using reset with the reset button, it connects only every second time. That is reproducible. So it looks like some initial state is kind of toggled after reset. Using machine.deepsleep() it reconnects every time.
          Firmware 1.20.0.rc7.2. Test close to the router.
          A bad receiving condition complicate the situation.
          Edit:
          The second reset must not follow the first one immediately. I have to wait until after the first flash of the heartbeat LED.

          W 1 Reply Last reply Reply Quote 0
          • W Offline
            Wolli01 @robert-hh
            last edited by

            @robert-hh
            Thanks for the info. Always rescued it via software.
            Will test it with machine Deepsleep

            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