rtl8822bu icon indicating copy to clipboard operation
rtl8822bu copied to clipboard

Module Troubleshooting with x86_64 Kali Linux

Open mahatah opened this issue 7 years ago • 11 comments

First, I want to say thanks for making this driver. Although I may be struggling to get it to work, I appreciate your efforts to provide a working Linux module for the community.

With that, the issue I seem to be having is with the kernel module. Compilation goes fine with no errors, but the module doesn't load when using the nano device. I've ran modinfo on the 8822bu module and will output the information below. You'll notice that the "parms" for the module appear incorrect. At present, I'm not sure how to fix this and was hoping you may have some inclination as where to look.

Output of "uname -a": Linux IT 4.9.0-kali4-amd64 #1 SMP Debian 4.9.25-1kali1 (2017-05-04) x86_64 GNU/Linux

Output of "modinfo 8822bu": filename: /lib/modules/4.9.0-kali4-amd64/kernel/drivers/net/wireless/8822bu.ko version: v5.1.0-5_17968.20160601_BTCOEX20160411-1400_beta author: Brandon Bailey <[email protected]> description: Realtek Wireless Lan Driver license: GPL srcversion: D781967881506A8D57ADDAB alias: usb:v0BDApB82Cd*dc*dsc*dp*icFFiscFFipFFin* alias: usb:v7392pB822d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v0B05p1812d*dc*dsc*dp*ic*isc*ip*in* depends: usbcore,cfg80211 vermagic: 4.9.0-kali4-amd64 SMP mod_unload modversions parm: rtw_ips_mode:The default IPS mode (int) parm: rtw_usb_rxagg_mode:int parm: rtw_drv_log_level:set log level when insert driver module, default log level is _DRV_INFO_ = 4 (uint) parm: rtw_country_code:The default country code (in alpha2) (charp) parm: rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int) parm: rtw_excl_chs:exclusive channel array (array of uint) parm: rtw_btcoex_enable:BT co-existence on/off, 0:off, 1:on, 2:by efuse (int) parm: rtw_ant_num:Antenna number setting, 0:by efuse (int) parm: rtw_force_igi_lb:force IGI low-bound, 0:no specified (int) parm: rtw_qos_opt_enable:int parm: ifname:The default name to allocate for first interface (charp) parm: if2name:The default name to allocate for second interface (charp) parm: rtw_pwrtrim_enable:int parm: rtw_initmac:charp parm: rtw_special_rf_path:int parm: rtw_chip_version:int parm: rtw_rfintfs:int parm: rtw_lbkmode:int parm: rtw_network_mode:int parm: rtw_channel:int parm: rtw_mp_mode:int parm: rtw_wmm_enable:int parm: rtw_vrtl_carrier_sense:int parm: rtw_vcs_type:int parm: rtw_busy_thresh:int parm: rtw_ht_enable:int parm: rtw_bw_mode:int parm: rtw_ampdu_enable:int parm: rtw_rx_stbc:int parm: rtw_ampdu_amsdu:int parm: rtw_vht_enable:int parm: rtw_lowrate_two_xmit:int parm: rtw_rf_config:int parm: rtw_power_mgnt:int parm: rtw_smart_ps:int parm: rtw_low_power:int parm: rtw_wifi_spec:int parm: rtw_full_ch_in_p2p_handshake:int parm: rtw_antdiv_cfg:int parm: rtw_antdiv_type:int parm: rtw_drv_ant_band_switch:int parm: rtw_switch_usb_mode:int parm: rtw_enusbss:int parm: rtw_hwpdn_mode:int parm: rtw_hwpwrp_detect:int parm: rtw_hw_wps_pbc:int parm: rtw_max_roaming_times:The max roaming times to try (uint) parm: rtw_mc2u_disable:int parm: rtw_80211d:Enable 802.11d mechanism (int) parm: rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint) parm: rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint) parm: rtw_adaptivity_en:0:disable, 1:enable (uint) parm: rtw_adaptivity_mode:0:normal, 1:carrier sense (uint) parm: rtw_adaptivity_dml:0:disable, 1:enable (uint) parm: rtw_adaptivity_dc_backoff:DC backoff for Adaptivity (uint) parm: rtw_adaptivity_th_l2h_ini:TH_L2H_ini for Adaptivity (int) parm: rtw_adaptivity_th_edcca_hl_diff:TH_EDCCA_HL_diff for Adaptivity (int) parm: rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint) parm: rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint) parm: rtw_RFE_type:default init value:64 (uint) parm: rtw_powertracking_type:default init value:64 (uint) parm: rtw_GLNA_type:default init value:0 (uint) parm: rtw_TxBBSwing_2G:default init value:0xFF (uint) parm: rtw_TxBBSwing_5G:default init value:0xFF (uint) parm: rtw_OffEfuseMask:default open Efuse Mask value:0 (uint) parm: rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint) parm: rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint) parm: rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint) parm: rtw_rxgain_offset_5gh:uint parm: rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint) parm: rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint) parm: rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int) parm: rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int) parm: rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_5g_a:5G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_5g_b:5G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_5g_c:5G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_5g_d:5G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_phy_file_path:The path of phy parameter (charp) parm: rtw_load_phy_file:PHY File Bit Map (int) parm: rtw_decrypt_phy_file:Enable Decrypt PHY File (int)

mahatah avatar May 25 '17 07:05 mahatah

What is the result of lsusb

jeremyb31 avatar Jun 02 '17 10:06 jeremyb31

Doing just lsusb is the following: Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 006: ID 0b05:184c ASUSTek Computer, Inc. Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

With that said, if doing lsusb -vv then the relevant USB information for the nano is as follows: Bus 002 Device 006: ID 0b05:184c ASUSTek Computer, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0b05 ASUSTek Computer, Inc. idProduct 0x184c bcdDevice 2.10 iManufacturer 1 Realtek iProduct 2 802.11ac NIC iSerial 3 123456 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 53 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 5 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 2 802.11ac NIC Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x08 EP 8 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 22 bNumDeviceCaps 2 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000002 Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x0006 Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 10 micro seconds bU2DevExitLat 1023 micro seconds Device Status: 0x0000 (Bus Powered)

mahatah avatar Jun 02 '17 15:06 mahatah

Please check the latest commit, I just added your device descriptor.

brandon-bailey avatar Jun 02 '17 15:06 brandon-bailey

Thank you much for the help. Removed the old driver, re-downloaded the repo, recompiled and reinstalled with make and make install. Restarted, made sure the 8822bu driver was loaded with modprobe and confirmed that it was with "cat /proc/modules/ | grep 8822". Plugged in the Nano and... nothing. :-(

I'm downloading a fresh copy of the OS and will try to install the kernel module on that to verify whether some personal configuration is to blame or not. I'll post the results after that's complete.

mahatah avatar Jun 02 '17 16:06 mahatah

After doing as mentioned in my previous post, I can confirm that there is no change with the fresh OS. Compilation is fine, the module does not load on it's own at OS start but can be invoked with modprobe 8822bu. After plugging in the Nano, however, there is no change from the original post.

mahatah avatar Jun 02 '17 17:06 mahatah

What usb wireless device are you using? From the device id you described it appears to be ASUS USB-AC68 Dual-Band AC1900, and should not be using this driver.

brandon-bailey avatar Jun 02 '17 17:06 brandon-bailey

I'm using the "ASUS AC-53 NANO". The exact device is this one: https://www.asus.com/Networking/USB-AC53-Nano/

I believe this is the same device as the one listed on the README page of your Git repo?

mahatah avatar Jun 02 '17 17:06 mahatah

Looks like Brandon fixed it so you should be able to go into the rtl8822bu directory in terminal and do a git pull make clean make sudo make install And have it working again after a reboot

jeremyb31 avatar Jun 03 '17 10:06 jeremyb31

Assuming below is the correct VID:PID for the ASUS adapter.

Bus 002 Device 006: ID 0b05:184c ASUSTek Computer, Inc.

And if the adapter is indeed using RTL8822BU chipset, shouldn't the descriptor be under #ifdef CONFIG_RTL8822B section instead of '#ifdef CONFIG_RTL8812A' in usb_intf.c' file? The Makefile only configures for 'CONFIG_RTL8822B = y'.

However, I'm just guessing here...

lkw16 avatar Jun 06 '17 20:06 lkw16

@jeremyb31 This was already tried as per my responses. I even went so far as to try the changes made on a fresh OS. This did not work.

@lkw16 I hadn't noticed that. Good catch. I can try recompilation after making that edit and post back if there is any change. Thanks for the post.

mahatah avatar Jun 06 '17 20:06 mahatah

@lkw16 You sir, are a gentleman and a scholar! Your suggestion works!

@brandon-bailey and @jeremyb31 the following two sections of 'usb_intf.c' were edited as per the advice of @lkw16

Thanks again to everyone who helped me solve this. I really appreciate it. Driver is working great! Thank you!

Original Section 1: #ifdef CONFIG_RTL8812A /*=== Realtek demoboard ===*/ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8812), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881A), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881B), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881C), .driver_info = RTL8812}, /* Default ID */ /*=== Customer ID ===*/ {USB_DEVICE(0x050D, 0x1106), .driver_info = RTL8812}, /* Belkin - sercomm */ {USB_DEVICE(0x2001, 0x330E), .driver_info = RTL8812}, /* D-Link - ALPHA */ {USB_DEVICE(0x7392, 0xA822), .driver_info = RTL8812}, /* Edimax - Edimax */ {USB_DEVICE(0x0DF6, 0x0074), .driver_info = RTL8812}, /* Sitecom - Edimax */ {USB_DEVICE(0x04BB, 0x0952), .driver_info = RTL8812}, /* I-O DATA - Edimax */ {USB_DEVICE(0x0789, 0x016E), .driver_info = RTL8812}, /* Logitec - Edimax */ {USB_DEVICE(0x0409, 0x0408), .driver_info = RTL8812}, /* NEC - */ {USB_DEVICE(0x0B05, 0x17D2), .driver_info = RTL8812}, /* ASUS - Edimax */ {USB_DEVICE(0x0B05, 0x184C), .driver_info = RTL8812}, /* ASUS - Edimax */ {USB_DEVICE(0x0E66, 0x0022), .driver_info = RTL8812}, /* HAWKING - Edimax */ {USB_DEVICE(0x0586, 0x3426), .driver_info = RTL8812}, /* ZyXEL - */ {USB_DEVICE(0x2001, 0x3313), .driver_info = RTL8812}, /* D-Link - ALPHA */ {USB_DEVICE(0x1058, 0x0632), .driver_info = RTL8812}, /* WD - Cybertan*/ {USB_DEVICE(0x1740, 0x0100), .driver_info = RTL8812}, /* EnGenius - EnGenius */ {USB_DEVICE(0x2019, 0xAB30), .driver_info = RTL8812}, /* Planex - Abocom */ {USB_DEVICE(0x07B8, 0x8812), .driver_info = RTL8812}, /* Abocom - Abocom */ {USB_DEVICE(0x2001, 0x3315), .driver_info = RTL8812}, /* D-Link - Cameo */ {USB_DEVICE(0x2001, 0x3316), .driver_info = RTL8812}, /* D-Link - Cameo */ #endif

Updated Section 1: #ifdef CONFIG_RTL8812A /*=== Realtek demoboard ===*/ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8812), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881A), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881B), .driver_info = RTL8812}, /* Default ID */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881C), .driver_info = RTL8812}, /* Default ID */ /*=== Customer ID ===*/ {USB_DEVICE(0x050D, 0x1106), .driver_info = RTL8812}, /* Belkin - sercomm */ {USB_DEVICE(0x2001, 0x330E), .driver_info = RTL8812}, /* D-Link - ALPHA */ {USB_DEVICE(0x7392, 0xA822), .driver_info = RTL8812}, /* Edimax - Edimax */ {USB_DEVICE(0x0DF6, 0x0074), .driver_info = RTL8812}, /* Sitecom - Edimax */ {USB_DEVICE(0x04BB, 0x0952), .driver_info = RTL8812}, /* I-O DATA - Edimax */ {USB_DEVICE(0x0789, 0x016E), .driver_info = RTL8812}, /* Logitec - Edimax */ {USB_DEVICE(0x0409, 0x0408), .driver_info = RTL8812}, /* NEC - */ {USB_DEVICE(0x0B05, 0x17D2), .driver_info = RTL8812}, /* ASUS - Edimax */ {USB_DEVICE(0x0E66, 0x0022), .driver_info = RTL8812}, /* HAWKING - Edimax */ {USB_DEVICE(0x0586, 0x3426), .driver_info = RTL8812}, /* ZyXEL - */ {USB_DEVICE(0x2001, 0x3313), .driver_info = RTL8812}, /* D-Link - ALPHA */ {USB_DEVICE(0x1058, 0x0632), .driver_info = RTL8812}, /* WD - Cybertan*/ {USB_DEVICE(0x1740, 0x0100), .driver_info = RTL8812}, /* EnGenius - EnGenius */ {USB_DEVICE(0x2019, 0xAB30), .driver_info = RTL8812}, /* Planex - Abocom */ {USB_DEVICE(0x07B8, 0x8812), .driver_info = RTL8812}, /* Abocom - Abocom */ {USB_DEVICE(0x2001, 0x3315), .driver_info = RTL8812}, /* D-Link - Cameo */ {USB_DEVICE(0x2001, 0x3316), .driver_info = RTL8812}, /* D-Link - Cameo */ #endif

Original Section 2: #ifdef CONFIG_RTL8822B /*=== Realtek demoboard ===*/ {USB_DEVICE(0x0B05, 0x1812), .driver_info = RTL8812}, /* ASUS - Edimax */ {USB_DEVICE(0x7392, 0xB822), .driver_info = RTL8822B}, /* Edimax - EW-7822ULC */ {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB82C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID */ #endif /* CONFIG_RTL8822B */

Updated Section 2: #ifdef CONFIG_RTL8822B /*=== Realtek demoboard ===*/ {USB_DEVICE(0x0B05, 0x1812), .driver_info = RTL8812}, /* ASUS - Edimax */ {USB_DEVICE(0x0B05, 0x184C), .driver_info = RTL8822B}, /* ASUS - Edimax */ {USB_DEVICE(0x7392, 0xB822), .driver_info = RTL8822B}, /* Edimax - EW-7822ULC */ {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB82C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID */ {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x184C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID */ #endif /* CONFIG_RTL8822B */

mahatah avatar Jun 06 '17 21:06 mahatah