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

    WiPy broadcasts AP when in STA mode

    Scheduled Pinned Locked Moved Issues & Bugs
    wipywlanwifiap modesta mode
    3 Posts 2 Posters 615 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.
    • H Offline
      Henning
      last edited by

      Problem
      When connecting to a WiFi in STA mode the WiPy sometimes broadcasts its own AP for some time.

      Reproducing the issue
      I use just basic example code to reproduce the issue, however this behavior seems to be non-deterministic. Sometimes the AP appears, sometimes it doesn't.

      from network import WLAN
      import machine
      
      wlan = WLAN(mode=WLAN.STA)
      wlan.connect("**SSID**", auth=(WLAN.WPA2, "**PW**"), timeout=5000)
      
      while True:  
          machine.idle()
      

      Discussion
      I searched the github issues and forums and found this report:
      https://github.com/espressif/arduino-esp32/issues/1718
      It is in the arduino section but sounds very similar to the behavior I'm experiencing.

      Can anybody confirm this issue? Any ideas how to fix it or where the apparent bug might be located and what would be the best place to ask?

      1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron
        last edited by

        Is it actually broadcasting after you switch to STA mode, or do you just see it in "available networks" lists on other devices? If the latter, those usually have a cache and keep displaying a network after the last received advertisement.

        You may want to use pycom.wifi_on_boot(false);. This way the firmware won't configure Wi-Fi as an AP before you switch to STA. Note that you will probably need to start Server yourself if you need it.

        H 1 Reply Last reply Reply Quote 1
        • H Offline
          Henning @jcaron
          last edited by

          @jcaron
          Thank you very much for your reply. Turning off WiFi on boot seems to fix the issue. Apparently it was related to the PyCom starting in AP mode for telnet.

          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