Currently I try to use it in client mode. I use the systemd script to start the device, which works:
root@bpi-r2:~# ip link show mt6625_0
9: mt6625_0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:08:22:60:d1:fb brd ff:ff:ff:ff:ff:ff
wpa_supplicant is setup and using dhclient mt6625_0
lets me connect to my home wifi successfully.
I’m running kernel bpi-r2 5.4.134-bpi-r2-main
I have set following udev rule:
ACTION=="add", SUBSYSTEM=="net", KERNEL=="mt6625_0", RUN+="/sbin/ip link set dev %k address 00:00:00:00:13:37"
in file
/etc/udev/rules.d/00-static-mac-address.rules
This rule should work, as indicated by
root@bpi-r2:~# udevadm test /sys/class/net/mt6625_0
Load module index
Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
Reading rules file: /etc/udev/rules.d/00-static-mac-address.rules
[...]
Reading rules file: /lib/udev/rules.d/99-systemd.rules
Rules contain 24576 bytes tokens (2048 * 12 bytes), 12552 bytes strings
1781 strings (22159 bytes), 1171 de-duplicated (10218 bytes), 611 trie nodes used
Using default interface naming scheme 'v240'.
Config file /lib/systemd/network/99-default.link applies to device mt6625_0
link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
DEVPATH=/devices/platform/180f0000.wifi/net/mt6625_0
DEVTYPE=wlan
INTERFACE=mt6625_0
IFINDEX=9
ACTION=add
SUBSYSTEM=net
ID_NET_NAMING_SCHEME=v240
ID_NET_NAME_MAC=wlx00082260d1fb
ID_OUI_FROM_DATABASE=InPro Comm
ID_PATH=platform-180f0000.wifi
ID_PATH_TAG=platform-180f0000_wifi
ID_NET_DRIVER=mt-wifi
ID_NET_LINK_FILE=/lib/systemd/network/99-default.link
TAGS=:systemd:
SYSTEMD_ALIAS=/sys/subsystem/net/devices/mt6625_0
USEC_INITIALIZED=26118286
run: '/sbin/ip link set dev mt6625_0 address 00:00:00:00:13:37'
run: 'bridge-network-interface'
run: 'ifupdown-hotplug'
run: '/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/mt6625_0 --prefix=/net/ipv4/neigh/mt6625_0 --prefix=/net/ipv6/conf/mt6625_0 --prefix=/net/ipv6/neigh/mt6625_0'
Unload module index
Unloaded link configuration context.
The command to set the mac address is found in the output here. Unfortunately, after a reboot, the mac address is not 00:00:00:00:13:37
.
Manually trying to change the mac yields this:
root@bpi-r2:~# ip link set dev mt6625_0 down
root@bpi-r2:~# ip link show mt6625_0
9: mt6625_0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:08:22:60:d1:fb brd ff:ff:ff:ff:ff:ff
root@bpi-r2:~# /sbin/ip link set dev mt6625_0 address 00:00:00:00:13:37
RTNETLINK answers: Operation not supported
root@bpi-r2:~# ip link show mt6625_0
9: mt6625_0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:08:22:60:d1:fb brd ff:ff:ff:ff:ff:ff
I hope I’m just making a stupid mistake. Thanks for your help in advance!