0

Fairly new to Linux and this is the first time really I have worked on installing drivers. Ubuntu has always been a server and never really used it as desktop. I am building an openHAB server, and thus the need for wifi and bluetooth. I was not thinking and ordered this "Blueshadow USB WiFi Bluetooth 4.2 Adapter 600Mbps - Dual Band Wireless Network External Receiver, Mini WiFi Dongle for PC/Laptop/Desktop, for All Windows 10 8.1 8 7 XP Vista (600M)"

https://www.amazon.com/gp/product/B08GSBG17K/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1

Ubuntu 18.04

uname -r
4.15.0-128-generic

lsusb
Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp. 

https://github.com/andydvsn/rtl8821cu_wlan - Installed - wireless works.

https://github.com/andydvsn/rtl8821cu_bt - I cannot get the Bluetooth driver to install

seemed simple enough

git clone https://github.com/andydvsn/rtl8821cu_bt.git
Cloning into 'rtl8821cu_bt'...
remote: Enumerating objects: 44, done.
remote: Total 44 (delta 0), reused 0 (delta 0), pack-reused 44
Unpacking objects: 100% (44/44), done.
[16:58:49] root@linux1:~# cd rtl8821cu_bt
[16:59:00] root@linux1:~/rtl8821cu_bt# make
make -C 8821CU -s
Copy 8821CU firmware to /lib/firmware/rtl8821cu_fw
Copy 8821CU config to /lib/firmware/rtl8821cu_config
make -C ./bluetooth_usb_driver
make[1]: Entering directory '/root/rtl8821cu_bt/bluetooth_usb_driver'
make -C /lib/modules/4.15.0-128-generic/build M=/root/rtl8821cu_bt/bluetooth_usb_driver modules
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-128-generic'
  CC [M]  /root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.o
/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.c: In function ‘rtk_check_setup_timer’:
/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.c:544:3: error: implicit declaration of function ‘setup_timer’; did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
   setup_timer(&(btrtl_coex.a2dp_count_timer),
   ^~~~~~~~~~~
   sk_stop_timer
/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.c: In function ‘rtk_btcoex_open’:
/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.c:2532:2: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
  init_timer(&btrtl_coex.polling_timer);
  ^~~~~~~~~~
  init_timers
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.o' failed
make[3]: *** [/root/rtl8821cu_bt/bluetooth_usb_driver/rtk_coex.o] Error 1
Makefile:1587: recipe for target '_module_/root/rtl8821cu_bt/bluetooth_usb_driver' failed
make[2]: *** [_module_/root/rtl8821cu_bt/bluetooth_usb_driver] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-128-generic'
Makefile:10: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/rtl8821cu_bt/bluetooth_usb_driver'
Makefile:10: recipe for target 'install' failed
make: *** [install] Error 2
[16:59:06] root@linux1:~/rtl8821cu_bt# 

I have tried to delete and start over, thank you for reading and any would help would be greatly appreciated.

Edit-1 - removed [github.com/andydvsn/rtl8821cu_wlan] and using github.com/brektrou/rtl8821CU.git

wlan is working, but bluetooth is still not seeing the adapter.

ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtl8821cu
8821cu.ko



    >     T:  Bus=02 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
    >     D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    >     P:  Vendor=0bda ProdID=c820 Rev=02.00
    >     S:  Manufacturer=Realtek
    >     S:  Product=802.11ac NIC
    >     S:  SerialNumber=123456
    >     C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
    >     I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    >     I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    >     I:  If#= 2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu

3 Answers 3

1

I have bought a ACEPC T11 8/128Gb. I have installed Ubuntu 20.04 and everything worked fine but Wi-Fi. I found that the chipset is RTL8821CU even if it is somehow shown as Broadcom. I tried many fixes with no results. Finally I fixed the issue.

I fixed the issue with:

  1. git clone https://github.com/brektrou/rtl8821cu.git
  2. cd rtl8821cu
  3. sudo ./dkms-install.sh
  4. Reboot
1
  • Thanks for sharing, it worked like a charm for the ACEPC T6 as well. Feb 13 at 16:05
0

The driver repository you linked is for an older / different linux kernel. To my understanding, the init_timer function was replaced by a timer_setup function sometime in 2017, which is why the code doesn't compile.

You could try opening a PR or changing the code yourself, or you may try a different driver for bluetooth.

I ordered a similar usb device which seems to use the same chipset. A different driver worked for the WiFi portion, and bluetooth simply works with the kernel btusb driver.

One minor annoyance with this setup is that WiFi needs to have been active at some point after booting for bluetooth to work. I'm not sure whether this is specific to my setup or a problem of the combined WiFi+Bluetooth devices.

The relevant portion of the output of usb-devices looks like this on my machine:

P:  Vendor=0bda ProdID=c820 Rev=02.00
S:  Manufacturer=Realtek
S:  Product=802.11ac NIC
S:  SerialNumber=123456
C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#=0x2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu

Note that I'm using a newer kernel release (5.8.0-7630-generic), so things may work out differently for you. The driver README says that 4.4.x upwards are supported though.

Good Luck!

3
  • Thank you very much @maxi-k. my usb-devices is below. I will try to remove current WiFi driver, and install [github.com/brektrou/rtl8821CU] P: Vendor=0bda ProdID=c820 Rev=02.00 S: Manufacturer=Realtek S: Product=802.11ac NIC S: SerialNumber=123456 C: #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)'
    – zahid
    Jan 4, 2021 at 15:57
  • lsusb Bus 002 Device 003: ID 0bda:c820 Realtek Semiconductor Corp.
    – zahid
    Jan 4, 2021 at 20:00
  • > T: Bus=02 Lev=02 Prnt=02 Port=06 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=0bda ProdID=c820 Rev=02.00 > S: Manufacturer=Realtek > S: Product=802.11ac NIC > S: SerialNumber=123456 > C: #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA > I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb > I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb > I: If#= 2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu
    – zahid
    Jan 4, 2021 at 20:07
0
[13:55:56] root@linux1:~# bluetoothctl show
[NEW] Controller 00:13:EF:2F:0B:94 linux1 [default]
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:13:EF:2F:0B:94 Discovering: yes
[NEW] Device 3E:93:4A:78:96:CD 3E-93-4A-78-96-CD

After days of fighting, I made two changes, usermod -aG lp $USER and then found this article [bluetooth]# power on https://computingforgeeks.com/connect-to-bluetooth-device-from-linux-terminal/

I cannot imagine root needing to be added to group 'lp', but I am not sure and wanted to document. power on seems to have worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.