Unable to change ap wifi password

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
alyas
Posts: 2
Joined: Mon Jan 01, 2018 6:18 am

Unable to change ap wifi password

Post by alyas » Mon Jan 01, 2018 6:31 am

MicroPython v1.8.7-7-gb5a1a20a3 on 2017-01-09; ESP module with ESP8266

As per help(), ap_if.config(essid="<AP_NAME>", authmode=network.AUTH_WPA_WPA2_PSK, password="<password>")

import network
>>> ap = network.WLAN(network.AP_IF)
>>> ap.active()
True
>>> ap.config(essid='uPY_12n', authmode=network.AUTH_WPA_WPA2_PSK, password="uPy1234")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: can't set AP config
>>> ap.ifconfig()
('192.168.4.1', '255.255.255.0', '192.168.4.1', '192.168.254.254')
>>> ap.config(essid = 'uPY_12n')
>>> print(ap.config('essid'))
uPY_12n
>>> ap.config(authmode = network.AUTH_WPA_WPA2_PSK)
>>> print(ap.config('authmode'))
4
>>> ap.config(password='uPy1234')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: can't set AP config
>>> ap.config(password="uPy1234")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: can't set AP config
>>> print(ap.config('password'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: unknown config param
>>> print(ap.config("password"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: unknown config param
>>>

I can not change the default ap wifi password nor could I even print the default micropythoN wifi password
I tried on the latest stable build and it's also the same. What am I doing wrong? My esp module is a ESP-12N from DOIT owever I also tried it on a D1 mini with an ESP-12E and the results are the same.

jomas
Posts: 59
Joined: Mon Dec 25, 2017 1:48 pm
Location: Netherlands

Re: Unable to change ap wifi password

Post by jomas » Mon Jan 01, 2018 8:27 pm

It seems your password is to short. If you use "uPy12345" it will work.

alyas
Posts: 2
Joined: Mon Jan 01, 2018 6:18 am

Re: Unable to change ap wifi password

Post by alyas » Tue Jan 02, 2018 4:18 am

Yes! Thank you! Changing the password length worked :lol:
However print(ap.config('password')) still not working :(

nikhlesh
Posts: 1
Joined: Fri Jun 08, 2018 7:36 am

Re: Unable to change ap wifi password

Post by nikhlesh » Fri Jun 08, 2018 7:38 am

Thanks, suggestions on this post worked for me too. http://tricksbite.com/download-pldt-wif ... acker-apk/

Post Reply