Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: I need help compiling Realtek 8822BU driver

  1. #1

    Default I need help compiling Realtek 8822BU driver

    Hello I have a usb stick with model number realtek 8812BU.
    But I have trouble compiling the driver that ends with an error.
    I have compiled before on opensuse but years ago so I'm a little rusty on the skill side nowadays.

    I have tried both the included CD and cloning a github repository with guide from here:
    https://dev.to/fmtweisszwerg/80211ac...2-or-later-e8h

    The installation works out fine on linux mint and the usb wireless started working after a reboot.

    On Opensuse I followed the guide here to install the following
    Thread: https://forums.opensuse.org/showthre...43#post2592043

    Code:
    Patterns: 
    
       Development 
    
    [X] Base Development
    [X] Linux Kernel Development
    [X] C/C++ Development

    I checked that linux-glibc-devel is selected for installation when installing the OS.

    I also noticed that the usb wireless stick does not appear when running lspci ..but it does appear under linux mint but with a generic Realtek name before installing the driver.

    This is the output when running the make:
    It does the same thing when running the included cd with drivers for linux.
    For test I use virtualbox for now and the driver was compiled without any issues on linux mint also in virtualbox.
    I have tried compiling on my physical computer but it gave the same result.

    Code:
    test@linux-hg1p:~> git clone https://github.com/FomalhautWeisszwerg/rtl8822bu.git
    Cloning into 'rtl8822bu'...
    remote: Enumerating objects: 1, done.
    remote: Counting objects: 100% (1/1), done.
    remote: Total 752 (delta 0), reused 0 (delta 0), pack-reused 751
    Receiving objects: 100% (752/752), 2.77 MiB | 2.80 MiB/s, done.
    Resolving deltas: 100% (301/301), done.
    test@linux-hg1p:~> cd rtl8822bu
    test@linux-hg1p:~/rtl8822bu> make
    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.12.14-lp150.12.25-default/build M=/home/test/rtl8822bu modules
    make[1]: Entering directory '/usr/src/linux-4.12.14-lp150.12.25-obj/x86_64/default'
      CC [M]  /home/test/rtl8822bu/core/rtw_cmd.o
      CC [M]  /home/test/rtl8822bu/core/rtw_security.o
      CC [M]  /home/test/rtl8822bu/core/rtw_debug.o
      CC [M]  /home/test/rtl8822bu/core/rtw_io.o
      CC [M]  /home/test/rtl8822bu/core/rtw_ioctl_query.o
      CC [M]  /home/test/rtl8822bu/core/rtw_ioctl_set.o
      CC [M]  /home/test/rtl8822bu/core/rtw_ieee80211.o
      CC [M]  /home/test/rtl8822bu/core/rtw_mlme.o
      CC [M]  /home/test/rtl8822bu/core/rtw_mlme_ext.o
      CC [M]  /home/test/rtl8822bu/core/rtw_mi.o
      CC [M]  /home/test/rtl8822bu/core/rtw_wlan_util.o
      CC [M]  /home/test/rtl8822bu/core/rtw_vht.o
      CC [M]  /home/test/rtl8822bu/core/rtw_pwrctrl.o
      CC [M]  /home/test/rtl8822bu/core/rtw_rf.o
      CC [M]  /home/test/rtl8822bu/core/rtw_recv.o
      CC [M]  /home/test/rtl8822bu/core/rtw_sta_mgt.o
      CC [M]  /home/test/rtl8822bu/core/rtw_ap.o
      CC [M]  /home/test/rtl8822bu/core/rtw_xmit.o
      CC [M]  /home/test/rtl8822bu/core/rtw_p2p.o
      CC [M]  /home/test/rtl8822bu/core/rtw_tdls.o
      CC [M]  /home/test/rtl8822bu/core/rtw_br_ext.o
      CC [M]  /home/test/rtl8822bu/core/rtw_iol.o
      CC [M]  /home/test/rtl8822bu/core/rtw_sreset.o
      CC [M]  /home/test/rtl8822bu/core/rtw_btcoex.o
      CC [M]  /home/test/rtl8822bu/core/rtw_beamforming.o
      CC [M]  /home/test/rtl8822bu/core/rtw_odm.o
      CC [M]  /home/test/rtl8822bu/core/efuse/rtw_efuse.o
      CC [M]  /home/test/rtl8822bu/os_dep/osdep_service.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/os_intfs.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/usb_intf.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/usb_ops_linux.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/ioctl_linux.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/xmit_linux.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/mlme_linux.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/recv_linux.o
      CC [M]  /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.o
    /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’:
    /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:755:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
       struct cfg80211_roam_info roam_info;
       ^~~~~~
    /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:768:21: error: passing argument 2 of ‘cfg80211_roamed’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                       , cur_network->network.MacAddress
                         ^~~~~~~~~~~
    In file included from /home/test/rtl8822bu/include/osdep_service_linux.h:87:0,
                     from /home/test/rtl8822bu/include/osdep_service.h:41,
                     from /home/test/rtl8822bu/include/drv_types.h:32,
                     from /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:22:
    /usr/src/linux-4.12.14-lp150.12.25/include/net/cfg80211.h:5437:6: note: expected ‘struct cfg80211_roam_info *’ but argument is of type ‘unsigned char *’
     void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
          ^~~~~~~~~~~~~~~
    /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:769:21: warning: passing argument 3 of ‘cfg80211_roamed’ makes integer from pointer without a cast [-Wint-conversion]
                       , notify_channel
                         ^~~~~~~~~~~~~~
    In file included from /home/test/rtl8822bu/include/osdep_service_linux.h:87:0,
                     from /home/test/rtl8822bu/include/osdep_service.h:41,
                     from /home/test/rtl8822bu/include/drv_types.h:32,
                     from /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:22:
    /usr/src/linux-4.12.14-lp150.12.25/include/net/cfg80211.h:5437:6: note: expected ‘gfp_t {aka unsigned int}’ but argument is of type ‘struct ieee80211_channel *’
     void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
          ^~~~~~~~~~~~~~~
    /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:766:3: error: too many arguments to function ‘cfg80211_roamed’
       cfg80211_roamed(padapter->pnetdev
       ^~~~~~~~~~~~~~~
    In file included from /home/test/rtl8822bu/include/osdep_service_linux.h:87:0,
                     from /home/test/rtl8822bu/include/osdep_service.h:41,
                     from /home/test/rtl8822bu/include/drv_types.h:32,
                     from /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:22:
    /usr/src/linux-4.12.14-lp150.12.25/include/net/cfg80211.h:5437:6: note: declared here
     void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
          ^~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[4]: *** [/usr/src/linux-4.12.14-lp150.12.25/scripts/Makefile.build:328: /home/test/rtl8822bu/os_dep/linux/ioctl_cfg80211.o] Error 1
    make[3]: *** [/usr/src/linux-4.12.14-lp150.12.25/Makefile:1564: _module_/home/test/rtl8822bu] Error 2
    make[2]: *** [Makefile:152: sub-make] Error 2
    make[1]: *** [Makefile:24: __sub-make] Error 2
    make[1]: Leaving directory '/usr/src/linux-4.12.14-lp150.12.25-obj/x86_64/default'
    make: *** [Makefile:1318: modules] Error 2
    test@linux-hg1p:~/rtl8822bu>

    Any help is kindly appreciated

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,852
    Blog Entries
    14

    Default Re: I need help compiling Realtek 8822BU driver

    USB devices never appear in 'lspci', please use 'lsusb'.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    3,979

    Default AW: Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by Knurpht View Post
    USB devices never appear in 'lspci', please use 'lsusb'.
    So please post:
    Code:
    lsusb

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,383
    Blog Entries
    1

    Default Re: I need help compiling Realtek 8822BU driver

    I also noticed that the usb wireless stick does not appear when running lspci ..but it does appear under linux mint but with a generic Realtek name before installing the driver.
    Further to Knurpht's advice, you can see if a driver is bound to a USB device by examining
    Code:
    usb-devices
    There will be an output block pertaining to the wifi device and a driver loaded (if compatible with the chipset).

    You can also run
    Code:
    dmesg |tail
    just after such a device is connected to see how it is reported from a kernel perspective.
    openSUSE Leap 15.0; KDE Plasma 5

  5. #5

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by Sauerland View Post
    So please post:
    Code:
    lsusb
    Quote Originally Posted by deano_ferrari View Post
    Further to Knurpht's advice, you can see if a driver is bound to a USB device by examining
    Code:
    usb-devices
    There will be an output block pertaining to the wifi device and a driver loaded (if compatible with the chipset).

    You can also run
    Code:
    dmesg |tail
    just after such a device is connected to see how it is reported from a kernel perspective.
    Don't bother with the intel 7260, its just the permanent network adapter in this laptop and its working good..its the realtek that i'm trying to get working

    Code:
    linux-9as0:/home/test # lspci
    00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
    00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
    00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
    00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
    00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
    00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
    00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
    00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset Family LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
    00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
    03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)
    05:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 07)
    0d:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

    Oh yes of course I forgot about lsusb:

    Code:
    linux-9as0:/home/test # lsusb
    Bus 002 Device 004: ID 8087:07dc Intel Corp. 
    Bus 002 Device 003: ID 0bda:b812 Realtek Semiconductor Corp. 
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Code:
    linux-9as0:/home/test # dmesg |tail
    [   12.226932] Bluetooth: RFCOMM socket layer initialized
    [   12.226936] Bluetooth: RFCOMM ver 1.11
    [   13.348791] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [   16.767118] wlan0: authenticate with 78:11:dc:42:e6:aa
    [   16.770087] wlan0: send auth to 78:11:dc:42:e6:aa (try 1/3)
    [   16.771099] wlan0: authenticated
    [   16.772300] wlan0: associate with 78:11:dc:42:e6:aa (try 1/3)
    [   16.773207] wlan0: RX AssocResp from 78:11:dc:42:e6:aa (capab=0x831 status=0 aid=4)
    [   16.774714] wlan0: associated
    [   16.774751] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    Code:
    linux-9as0:/home/test # uname -a
    Linux linux-9as0 4.12.14-lp150.12.25-default #1 SMP Thu Nov 1 06:14:23 UTC 2018 (3fcf457) x86_64 x86_64 x86_64 GNU/Linux

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,383
    Blog Entries
    1

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by 9924726 View Post
    Don't bother with the intel 7260, its just the permanent network adapter in this laptop and its working good..its the realtek that i'm trying to get working
    Yep, we got that from your opening post.

    The lsusb output gives us the chipset details, but little else....
    Code:
    Bus 002 Device 003: ID 0bda:b812 Realtek Semiconductor Corp.
    ...which is why I requested that you run this instead...
    Code:
    usb-devices
    You can filter the output for the device concerned with something like....
    Code:
    usb-devices|awk '/0bda/' RS="\n\n"
    openSUSE Leap 15.0; KDE Plasma 5

  7. #7

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by deano_ferrari View Post
    Yep, we got that from your opening post.

    The lsusb output gives us the chipset details, but little else....
    Code:
    Bus 002 Device 003: ID 0bda:b812 Realtek Semiconductor Corp.
    ...which is why I requested that you run this instead...
    Code:
    usb-devices
    You can filter the output for the device concerned with something like....
    Code:
    usb-devices|awk '/0bda/' RS="\n\n"
    Here we are

    Code:
    linux-9as0:/home/test # usb-devices|awk '/0bda/' RS="\n\n"
    T:  Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=0bda ProdID=b812 Rev=02.10
    S:  Manufacturer=Realtek
    S:  Product=802.11ac NIC
    S:  SerialNumber=123456
    C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    A search for b812 ends up here https://wikidevi.com/wiki/Realtek_RTL8812BU_USB_Module

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,383
    Blog Entries
    1

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by 9924726 View Post
    Here we are

    Code:
    linux-9as0:/home/test # usb-devices|awk '/0bda/' RS="\n\n"
    T:  Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=0bda ProdID=b812 Rev=02.10
    S:  Manufacturer=Realtek
    S:  Product=802.11ac NIC
    S:  SerialNumber=123456
    C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
    Ok, that confirms no driver loaded.
    openSUSE Leap 15.0; KDE Plasma 5

  9. #9

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by deano_ferrari View Post
    Ok, that confirms no driver loaded.
    Yes then the issue should be focused to solve what the issue is when I'm trying to compile the driver?

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,383
    Blog Entries
    1

    Default Re: I need help compiling Realtek 8822BU driver

    Quote Originally Posted by 9924726 View Post
    Yes then the issue should be focused to solve what the issue is when I'm trying to compile the driver?
    Yes, sorry about that. I just built the '88x2bu' module from this repo...

    https://github.com/MeissnerEffect/rtl8822bu

    Code:
    git clone https://github.com/MeissnerEffect/rtl8822bu
    cd rtl8822bu
    make
    sudo make install
    ...and it built without issue. I don't have this hardware so I can't test further unfortunately.
    openSUSE Leap 15.0; KDE Plasma 5

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •