Merge pull request #796 from larsks/bug/795
try both binascii and ubinascii in inisetup.py
This commit is contained in:
commit
2fe552694b
|
@ -3,9 +3,13 @@ import network
|
|||
import storage
|
||||
|
||||
def wifi():
|
||||
import ubinascii
|
||||
try:
|
||||
import ubinascii as binascii
|
||||
except ImportError:
|
||||
import binascii
|
||||
|
||||
ap_if = network.WLAN(network.AP_IF)
|
||||
essid = b"MicroPython-%s" % ubinascii.hexlify(ap_if.config("mac")[-3:])
|
||||
essid = b"MicroPython-%s" % binascii.hexlify(ap_if.config("mac")[-3:])
|
||||
ap_if.config(essid=essid, authmode=network.AUTH_WPA_WPA2_PSK, password=b"micropythoN")
|
||||
|
||||
def check_bootsec():
|
||||
|
|
Loading…
Reference in New Issue