RTL8811AU / MAC Address / Wrong driver

Hi,

Just purchased a 802.11ac USB dongle which has a RTL8811AU chip (printed on packaging and detected in Windows 10 as such). When installed in my Pi 2 w/OSMC July 2017.07-1, I can connect to my router, however each time I reboot I have to go back to the Wifi GUI and re-enter my details. When I looked at dmsg it seemed to show it’s picked up as 8812AU and is assigning a random MAC address each time I reboot (Note: Windows 10 shows a valid MAC address when it’s detected as a RTL8811AU)

[ 2.615575] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[ 2.746557] usb 1-1.5: New USB device found, idVendor=0bda, idProduct=a811
[ 2.746581] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber =3
[ 2.746592] usb 1-1.5: Product: 802.11ac WLAN Adapter
[ 2.746600] usb 1-1.5: Manufacturer: Realtek
[ 2.746610] usb 1-1.5: SerialNumber: 00e04c000001

[ 11.133348] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
[ 11.137882] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 14.698576] 8812au: loading out-of-tree module taints kernel.
[ 15.726276] RTL871X: module init start
[ 15.726299] RTL871X: rtl8812au v4.3.20_16317.20160108
[ 15.726304] RTL871X: build time: Jul 29 2017 03:23:09
[ 17.456708] RTL871X: ERROR invalid mac addr:00:00:00:00:00:00, assign random MAC
[ 17.466334] RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=00:e0:4c:e4:1f:a7
[ 17.498947] usbcore: registered new interface driver rtl8812au

If I type ls -al /var/lib/connman I can see multiple entries for the WiFi, which corrospond to each time I re-entered the WiFi config, each with a different MAC address.

drwx------ 2 root root 4096 Aug 18 10:46 wifi_00e04c2e3042_4b6e696c696e6d6f35_managed_psk
drwx------ 2 root root 4096 Aug 18 11:02 wifi_00e04caab84f_4b6e696c696e6d6f35_managed_psk
drwx------ 2 root root 4096 Aug 18 11:11 wifi_00e04ce41fa7_4b6e696c696e6d6f35_managed_psk

Any idea’s how I can fix???

I think the driver is picking a random MAC because it can’t read the real MAC from the EEPROM

I’ve just tested with an old (6.0.4) version of OpenELEC and it seemed to work okay, keeping the settings between reboots (I’m having to re-partition the card to update OpenELEC to the latest version, so will see what it detects as when done)

Any ideas why it’s not able to read the EEPROM in OSMC?

So, OpenELEC 6.0.4 was working and here’s the bits from dmesg

[ 2.842953] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 2.936716] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 2.936753] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.939887] smsc95xx v1.0.4
[ 2.995101] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:xx:xx:xx
[ 3.072962] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[ 3.167281] usb 1-1.5: New USB device found, idVendor=0bda, idProduct=a811
[ 3.167317] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.167334] usb 1-1.5: Product: 802.11ac WLAN Adapter
[ 3.167350] usb 1-1.5: Manufacturer: Realtek
[ 3.167365] usb 1-1.5: SerialNumber: 00e04c000001

[ 14.762611] usbcore: registered new interface driver rtl8812au
[ 15.359179] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup

[ 18.983171] RTL871X: set ssid [mySSIDname] fw_state=0x00000008
[ 20.219160] RTL871X: start auth
[ 20.222973] RTL871X: auth success, start assoc
[ 20.238211] RTL871X: assoc success

After I had upgraded to the latest OpenELEC 8.0.4, I get the same issue as with OSMC, for reference here’s the dmesg from 8.0.4

[ 2.743623] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[ 2.834882] usb 1-1.5: New USB device found, idVendor=0bda, idProduct=a811
[ 2.834905] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.834919] usb 1-1.5: Product: 802.11ac WLAN Adapter
[ 2.834930] usb 1-1.5: Manufacturer: Realtek
[ 2.834939] usb 1-1.5: SerialNumber: 00e04c000001

[ 22.318195] 8812au: loading out-of-tree module taints kernel.
[ 22.531010] RTL871X: module init start
[ 22.531028] RTL871X: rtl8812au v4.3.20_16317.20160108
[ 22.531034] RTL871X: build time: May 29 2017 07:51:37
[ 23.061696] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
[ 23.064487] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 23.372949] RTL871X: ERROR invalid mac addr:00:00:00:00:00:00, assign random MAC
[ 23.386644] RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=00:e0:4c:31:84:9d
[ 23.408644] usbcore: registered new interface driver rtl8812au
[ 23.408665] RTL871X: module init ret=0

Does this help narrow down the issue???

Looks like the older version of OE used 871x from in-tree. The upstream driver
isn’t very good, so we build out of tree.

Unfortunately it looks like a limitation of the current driver. The driver might
have a module_param for MAC. You’d then be able to at least force a
consistent MAC, so ConnMan would remember networks.

That sounds like a good interim solution. How / where do I set the module_param?

Check sysfs to see if it’s possible. I don’t know off the top of my head
if the driver permits it.

How do I “check sysfs”? (I’m still learning/fumbling my way around :slight_smile:)