I have two of these devices and after a few frustrating days trying to get them both setup and running on the same LAN I have realised the problem is both have the same wlan MAC address - I presume therefore that all of these devices do. After some research this seemed to be the solution:
#!/bin/sh
### BEGIN INIT INFO
# Provides: macchanger
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Changes the MAC address at boot time.
# Description: Changes the wireless cards MAC addresses
### END INIT INFO
# Change the MAC address
ifconfig wlan0 down
ifconfig wlan0 hw ether DC:44:6D:D3:A6:77
ifconfig wlan0 up
exit 0
It works if you run it from the command line but I want to run it on boot.
you can test, to manually edit /etc/network/interfaces
But I can’t test it, sorry don’t have a Orange Pi Zero.
If something going wrong, you will to put your sd-card into another Linux device and have to withdraw your changes.
I get close in that it does change the MAC but then I cannot get wifi to work. Of the other solutions I have looked at some change the MAC but getting the change to occur on boot has not been possible.
Kernel : Linux Orange2 3.4.113-sun8i #2 SMP PREEMPT Mon Dec 5 19:40:45 GMT 2016 armv7l GNU/Linux
DietPi v142
On board wifi using module xradio_wlan
options xradio_wlan macaddr=DC:44:6D:D3:A6:7F
The MAC is always DC:44:6D:D3:A6:7F - does the above file therefore set this? Changeing it to another MAC stops wifi from working.
I can change it using the methods described above but then can’t connect by wifi and I cannot get a change to survive a reboot.
(Or, if you want, you can test, whether DietPi for OrangePi Zero with Mainline kernel get another mac-address on your special device)
But couldn’t get it going. Instead I tried Armbian and have got this working but when I do ifconfig -a I get a different MAC address.
The question is - does DietPi therefore assign a MAC address to the device? If not then how can two devices having the same MAC address be explained?
With the two devices now having different MAC addresses they can happily co-exist on the network, but Armbian take a lot of extra work to set stuff up.