Hi I'm no programmer too just a hack.
Unfortunately, I haven't build for 8814au in a while since I switch to a dedicated AP and I tried to build a few times before I post this and no luck.
The makefile is basically derived from openwrt/package/kernel/rtl8812au-ct/Makefile
I'll post mine anyway, you might find something useful.
Depends on your target platform, I also had to make changes to the src Makefile to get something compiling. Last time I was able to build the module I think I had to remove -Werror in OpenWrt just to build the module, but can't remember were exactly.
This is as far as I was able to build untill I got an error:
./include/net/iw_handler.h:528:7: note: expected 'struct iw_event *' but argument is of type 'struct iw_event *'
char *iwe_stream_add_point(struct iw_request_info *info, char *stream,
^~~~~~~~~~~~~~~~~~~~
./include/net/iw_handler.h: At top level:
./include/net/iw_handler.h:549:39: warning: 'struct iw_event' declared inside parameter list will not be visible outside of this definition or declaration
char *value, char *ends, struct iw_event *iwe,
^~~~~~~~
In file included from /home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/include/drv_types.h:30:0,
from /home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/core/rtw_cmd.c:17:
/home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/include/ieee80211.h:386:5: warning: "WIRELESS_EXT" is not defined, evaluates to 0 [-Wundef]
#if WIRELESS_EXT < 17
^~~~~~~~~~~~
In file included from /home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/core/rtw_cmd.c:17:0:
/home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/include/drv_types.h:1510:23: error: field 'iwstats' has incomplete type
struct iw_statistics iwstats;
^~~~~~~
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:304: /home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/core/rtw_cmd.o] Error 1
make[4]: *** [Makefile:1517: _module_/home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe] Error 2
make[4]: Leaving directory '/home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.69'
make[3]: *** [Makefile:1599: modules] Error 2
make[3]: Leaving directory '/home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe'
make[2]: *** [Makefile:46: /home/dell/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/rtl8814au-2019-09-02-57871abe/.built] Error 2
make[2]: Leaving directory '/home/dell/myfeeds/rtl8814au'
time: package/feeds/localfeed/rtl8814au/compile#4.05#1.12#4.79
make[1]: *** [package/Makefile:113: package/feeds/localfeed/rtl8814au/compile] Error 2
make[1]: Leaving directory '/home/dell/openwrt'
make: *** [/home/dell/openwrt/include/toplevel.mk:218: package/rtl8814au/compile] Error 2
I will try to keep building and see how far I can go.
BTW I build from git master.
I am using a rtl8812au dongle on Raspberri PI4 on snapshot
The dongle is recognized but the first strange thing comes from the configuration page, where in 5Ghz there is no possibility to change between AC and N mode.
But trying to bring up and access point in 5Ghz oe 2.4Ghz return hostpad errors and after a while the drivers is uninit
Try building the driver from this source:https://github.com/aircrack-ng/rtl8812au/pull/619
I had tested with rtl8811, rtl8812au and rtl8814au USB WiFi dongles, working well and has AC mode support.
@jeff1 Are you able to give a look at the 8812BU driver and try to build it in Openwrt?
I tried but with no success, I have limited knowledge of Openwrt build system
BTW tried the driver built in the latest snapshot
Actually it is working as bad as the -ct one currently in the repo
I am not able to run it in AC mode, sometimes it works in N mode @2.4Ghz, but slow and for example there is no rate indication
Thanks @jeff1 I was able to compile the WiFi driver for the NanoPi R2S and confirm working with my dongle Alfa AWUS036ACS with no issues at all, also this driver works better than the one used on friendlywrt as this support AC WiFi.
The problem is, that I am not able to successfully connect to a hotspot:
root@Gate:~# logread | grep -e radio2 -e wlan4wan2 -e wwan2
Sun Aug 9 18:30:00 2020 cron.info crond[1026]: USER root pid 14653 cmd /usr/sbin/hotspot-login wlan4wan2>/dev/null
Sun Aug 9 18:45:00 2020 cron.info crond[1026]: USER root pid 25764 cmd /usr/sbin/hotspot-login wlan4wan2>/dev/null
Sun Aug 9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' is disabled
Sun Aug 9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' has link connectivity loss
Sun Aug 9 18:52:21 2020 daemon.notice netifd: wwan2 (25295): udhcpc: received SIGTERM
Sun Aug 9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' is now down
Sun Aug 9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: wlan4wan2: CTRL-EVENT-DISCONNECTED bssid=ec:58:ea:12:10:88 reason=3 locally_generated=1
Sun Aug 9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: nl80211: deinit ifname=wlan4wan2 disabled_11b_rates=0
Sun Aug 9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: wlan4wan2: CTRL-EVENT-TERMINATING
Sun Aug 9 18:52:22 2020 daemon.notice netifd: radio2 (31285): command failed: Not supported (-95)
Sun Aug 9 18:52:22 2020 kern.info kernel: [ 8665.496512] IPv6: ADDRCONF(NETDEV_UP): wlan4wan2: link is not ready
Sun Aug 9 18:52:22 2020 daemon.notice netifd: Network device 'wlan4wan2' link is up
Sun Aug 9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' is enabled
Sun Aug 9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' has link connectivity
Sun Aug 9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' is setting up now
Sun Aug 9 18:52:22 2020 daemon.notice netifd: wwan2 (31551): udhcpc: started, v1.30.1
Sun Aug 9 18:52:22 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
Sun Aug 9 18:52:27 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
Sun Aug 9 18:52:27 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: Trying to associate with ec:58:ea:12:10:88 (SSID='WiFi4rlp' freq=2437 MHz)
Sun Aug 9 18:52:27 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-STARTED-CHANNEL-SWITCH freq=2437 ht_enabled=1 ch_offset=0 ch_width=20 MHz cf1=2437 cf2=0
Sun Aug 9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: Associated with ec:58:ea:12:10:88
Sun Aug 9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-CONNECTED - Connection to ec:58:ea:12:10:88 completed [id=0 id_str=]
Sun Aug 9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sun Aug 9 18:52:29 2020 kern.info kernel: [ 8672.120113] IPv6: ADDRCONF(NETDEV_CHANGE): wlan4wan2: link becomes ready
Sun Aug 9 18:52:31 2020 user.notice mwan3[32642]: Execute ifdown event on interface wwan2 (unknown)
Sun Aug 9 18:52:31 2020 user.info mwan3track[3548]: Detect ifdown event on interface wwan2 (wlan4wan2)
Sun Aug 9 18:52:31 2020 user.notice mwan3track[3548]: Interface wwan2 (wlan4wan2) is offline
Sun Aug 9 18:52:32 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
config interface 'wwan2'
option proto 'dhcp'
option hostname 'android-xxxxxxxxxx'
option macaddr 'XX:XX:XX:XX:XX:XX'
option metric '2'
option peerdns '0'
list dns '8.8.8.8'
list dns '1.1.1.1'
list dns '8.8.4.4'
list dns '1.0.0.1'
config interface 'wwan2_6'
option ifname '@wwan2'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option metric '2'
Any idea why the wifi disconnects directly? The same config works on a other device.