2

I am using EP-AC1661 WiFi and bluetooth adapter. According to their website the driver is supported only for kernel version 2.6 .I am trying to install the drivers on ubuntu 18.04 with a kernel version 5.0.0.29-generic

when I run the command

sudo make install -s

I get an error

    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)

any pointers in how do I fix this issue?

Edit1: The result of lsusb

:~$ lsusb 
Bus 002 Device 007: ID 0bda:c820 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 04f3:0b23 Elan Microelectronics Corp. 
Bus 001 Device 003: ID 0424:2137 Standard Microsystems Corp. 
Bus 001 Device 002: ID 1307:0330 Transcend Information, Inc. 63-in-1 Multi-Card Reader/Writer
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 002: ID 0424:5537 Standard Microsystems Corp. 
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

The result of tail -f /var/log/syslog

tail -f /var/log/syslog
Sep 23 16:17:42 blue kernel: [ 5578.720943] usb 2-6: new high-speed USB device number 8 using ehci-pci
Sep 23 16:17:43 blue kernel: [ 5578.877878] usb 2-6: New USB device found, idVendor=0bda, idProduct=c820, bcdDevice= 2.00
Sep 23 16:17:43 blue kernel: [ 5578.877881] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 23 16:17:43 blue kernel: [ 5578.877883] usb 2-6: Product: 802.11ac NIC
Sep 23 16:17:43 blue kernel: [ 5578.877885] usb 2-6: Manufacturer: Realtek
Sep 23 16:17:43 blue kernel: [ 5578.877887] usb 2-6: SerialNumber: FF
Sep 23 16:17:43 blue mtp-probe: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-6"
Sep 23 16:17:43 blue mtp-probe: bus: 2, device: 8 was not an MTP device
Sep 23 16:17:43 blue upowerd[1164]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-6
Sep 23 16:17:43 blue kernel: [ 5578.981975] [UFW BLOCK] IN=enp5s0 OUT= MAC=bc:ae:c5:1a:0e:f1:00:bb:c1:75:7a:46:08:00 SRC=10.1.10.68 DST=10.1.10.121 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=49755 PROTO=UDP SPT=8610 DPT=8612 LEN=40 
Sep 23 16:17:43 blue kernel: [ 5578.992093] [UFW BLOCK] IN=enp5s0 OUT= MAC=bc:ae:c5:1a:0e:f1:00:bb:c1:75:7a:46:08:00 SRC=10.1.10.68 DST=10.1.10.121 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=56262 PROTO=UDP SPT=8610 DPT=8612 LEN=40

Edit2:Result of usb-device

usb-devices 
T:  Bus=02 Lev=01 Prnt=01 Port=05 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=FF
C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu
  • It is unclear - what is EP-AC1661? How do you connect it? Do you see it in lsusb / lsusb? How does current kernel react on insertion of this device (see tail -f /var/log/syslog)? – N0rbert Sep 23 '19 at 19:53
  • Please edit your question to add the result of the terminal command: lsusb It was generous of the manufacturer to provide a 15-year-old driver! Welcome to Ask Ubuntu. – chili555 Sep 23 '19 at 19:58
  • Noted. I have added the results of those commands – thesillywhat Sep 23 '19 at 20:24
  • @chili555 ^^^^^ – thesillywhat Sep 23 '19 at 22:10
  • 1
    Possible duplicate of ubuntu 18.04 - dlink dwa171 (revC) shows as a memory stick – chili555 Sep 24 '19 at 1:45
0

This bluetooth device is supported by Linux kernel as you can see in drivers/bluetooth/btusb.c.

/* Realtek Bluetooth devices */
    { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
      .driver_info = BTUSB_REALTEK },

The meaning of (0x0bda, 0xe0, 0x01, 0x01) is exactly what you have in

Vendor=0bda  Cls=e0(wlcon) Sub=01 Prot=01

You have a combo Wi-Fi + BT device, both parts are visible in usb-devices

I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu

is the Wi-Fi device. It loads rtl8821cu driver successfully.

I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)

is the BT device. It doesn't load btusb driver for some reason.

The reasons might be:

  1. Kernel doesn't properly handle combo devices. This can be tested by blacklisting rtl8821cu. It should load btusb. If this is the case, it is a kernel bug that should be reported.

  2. You already installed some driver that blacklists btusb, but doesn't work.

If you get btusb loading, you need to make sure there is firmware in lib/firmware/rtl_bt. The file is called rtl8821a_config.bin.

This file hasn't been added to linux-firmware yet, but you can find it in the old driver that you downloaded previuosly, that didn't install.

I see a file there in linux/2017.../BT/2017...BT_ANDROID/rtkbt/system/etc/firmware/rtl8821a_config

Try to rename it to rtl8821a_config.bin and copy to /lib/firmware/rtl_bt.

If this file works, I'll send it upstream.

  • So I now added the bluetooth module in another linux environment. I ran the same command. This is the result. If#= 0 Alt= 0 #EPs= 3 Cls=eo(wlcon) Sub=01 Prot=01 Driver=btusb If#= 1 Alt= 0 #EPs= 2 Cls=eo(wlcon) Sub=01 Prot=01 Driver=btusb I see the btusb module is now loaded under lsmod but hciconfig does not list a BD Address – thesillywhat Sep 24 '19 at 15:56
  • Look into dmesg | grep -i bluetooth. – Pilot6 Sep 24 '19 at 16:00
  • So in dmesg i do get hci0: Direct firmware load for rtl_bt/rtl8821a_config.bin failed with error -2 is this the problem? – thesillywhat Sep 24 '19 at 16:08
  • Exatctly. I updated the answer. I am looking for this file. – Pilot6 Sep 24 '19 at 16:13
  • So now I got a hci0:download fw command failed (-110) So I followed the similar procedure to copy rtl8821a_fw.bin I still get the same error hci0:command 0xfc20 tx timeout and hci0:download fw command failed (-110) – thesillywhat Sep 24 '19 at 17:40

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.