AnsweredAssumed Answered

Connect to WPA2 network using micropython

Question asked by Mark Wagoner on Sep 28, 2017

I'm a noob and I actually have two problems.


First, I'm trying to connect a SPWF04SA board to a WPA2 protected network using micropython.  From some examples I have found on the micropython website it looks like I should be able to use the statement:


But I get the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'WLAN' has no attribute 'WPA2'

How do I specify WPA2 security when trying to connect?


My second problem is probably my own doing.  After playing with the board for a while it started acting a little flaky so I tried resetting it with the command AT&F.  Now, however, I can no longer start the python shell.  I get the error:

ERROR:16:Cannot switch to Python shell

I have tried re-enabling the console with AT+S.SCFG=console_enabled,2 but it still doesn't work.  How do I get this working again?  Note the board came "python enabled" and I haven't changed any of the jumper settings.


Thanks for any help.