problem with wifi init
-
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 documentationimport machine
from network import WLAN
wlan = WLAN() # get current object, without changing the modeif 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 waitingthe 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 -
Can you please check your firmware version?
import os os.uname()
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