I'm experiencing some difficulties when I attempt to identify the MAC address of the built-in wifi in my raspberry pi 3 model B. My application requires the built-in wifi to always be identified as wlan0 (not to mix interface name with other wifi adapter connected)
I have had success configuring the wifi adapter manually, when I know the mac address of the adapter. Such as using the the 70-persistent-net.rules to set the interface name such as:
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="b8:27:cc:cc:cc:cc", NAME="wlan0"
However, this manual method is undesirable and I’m seeking an automated method that would allow configuring a new raspberry using an image, rather than configuring it with SSH or other ways.
Does anyone know a method to in python to read and identify the correct mac address of built-in wifi and write a new 70-persistent-net.rules to name this wifi to interface to wlan0?
I thank you all in advance!