cannot get mac address?
Posted: Mon May 09, 2016 10:06 pm
Hi, the following code does not work on my board:
But in the Quick Reference (http://docs.micropython.org/en/latest/e ... rd-control) it says that the function mac() should be available. Any thoughts? I am actually looking for a way to uniquely identify individual boards, since I have a bunch of them. I thought the MAC address to be a pretty good candidate.
(Witty Cloud ESP-12, micropython, firmware built with latest commit 65402ab1ec05fd552ceae63e2dcac69095ab1338):
Code: Select all
>>> import network
>>> wlan=network.WLAN()
>>> wlan.mac() # get the interface's MAC adddress
Traceback (most recent call last):
File "<stdin">, line 1, in <module>
AttributeError: 'WLAN' object has no attribute 'mac'
>>> dir(wlan)
['active', 'connect', 'disconnect', 'status', 'scan', 'isconnected', 'config', 'ifconfig']
>>>
(Witty Cloud ESP-12, micropython, firmware built with latest commit 65402ab1ec05fd552ceae63e2dcac69095ab1338):