This is a cache of https://discuss.96boards.org/t/fixing-a-mac-address-on-i96/6994. It is a snapshot of the page at 2024-11-01T01:51:21.725+0000.
Fixing a mac address on i96 - Orange Pi i96 - 96Boards Forum

Fixing a mac address on i96

I am running the Raspbian Image on the i96 - seems debian and ubuntu images have some wifi issues - cannot get wifi to work at all. On Raspbian … the following in /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-ssid airCube
wpa-psk <thecorrectpassword>

Correctly brings up wlan0 and grabs an IP address.

However, it grabs a different address every time i reboot because a random (I think?) mac address is assigned every reboot. How do I fix the mac address so that I can create a DHCP reservation for this? I have tried
adding

hwaddress ether 00:01:c0:13:fb:ef

but this apparently causes DHCP to fail …

root@OrangePI-i96:~# ifup wlan0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:01:c0:13:fb:ef
Sending on   LPF/wlan0/00:01:c0:13:fb:ef
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

removing the hwaddress line and rebooting gets wifi happy again, but of course with another new IP address!

So the question is really – how do I fix the mac address AND get WiFi working too!!

Set static IP address, not DHCP…