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 init

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 2wifi
    2 Posts 2 Posters 1.2k 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.
    • A Offline
      anthony_soben
      last edited by anthony_soben

      Hi,
      I try to connect the wipy2 to my network but I have always an error on wlan.init()
      I used the code witch is proposed on the pycom documentation

      import machine
      from network import WLAN
      wlan = WLAN() # get current object, without changing the mode

      if machine.reset_cause() != machine.SOFT_RESET:
      wlan.init(mode=WLAN.STA)
      # configuration below MUST match your home router settings!!
      wlan.ifconfig(config=('192.168.178.107', '255.255.255.0', '192.168.178.1', '8.8.8.8'))

      if not wlan.isconnected():
      # change the line below to match your network ssid, security and password
      wlan.connect('mywifi', auth=(WLAN.WPA2, 'mywifikey'), timeout=5000)
      while not wlan.isconnected():
      machine.idle() # save power while waiting

      the error is
      Traceback (most recent call last):

      File "boot.py", line 6, in <module>

      TypeError: extra positional arguments given

      Have you an idea?

      Thanks.
      Anthony

      1 Reply Last reply Reply Quote 0
      • X Offline
        Xykon administrators
        last edited by

        Can you please check your firmware version?

        import os
        os.uname()
        

        Christian Ehlers

        1 Reply Last reply Reply Quote 1

        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