JiriBilek / WiFiSpi

SPI library for Arduino AVR and STM32F1 to connect to ESP8266
GNU Lesser General Public License v3.0
62 stars 13 forks source link

Possible to set MAC address of ESP? #28

Open fredlcore opened 3 years ago

fredlcore commented 3 years ago

Is it possible, similar to the Ethernet library, to set a fixed MAC address for the WiFi connection? Or is the MAC address fixed as part of the ESP and not changeable?

JiriBilek commented 3 years ago

I believe it is, there is a function bool wifi_set_macaddr(uint8 if_index, uint8 *macaddr); in ESP8266 firmware. But it is not implemented in this library. I searched more information and there are gotchas as you may change MAC only before initializing the wifi. See https://yoursunny.com/t/2017/change-ESP8266-MAC/ I have never tried it myself, I can look at it but unfortunately I am quite busy now.