thought i would outline the steps it took to get an all-in-one bluetooth + wifi adapter working on a single USB port -- the goal being able to use both simultaneously. the exact device linked works great with my MiSTer so i thought why not try it with the freeplay CM3.
hardware: USB WiFi Bluetooth Adapter, 600Mbps Dual Band 2.4/5Ghz
< install drivers >
i used these instructions as follows:
this got wifi component working successfully.
< fix BT: missing rtl8821a_config file >
unfortunately the bluetooth did not work out-of-the-box. doing `dmesg | grep -i blue` revealed that rtl8821a_config.bin file was not being loaded because it was not found.
using these instructions i replaced rtl8821a with rtl8821c, e.g.
cd /lib/firmware/rtl_bt
sudo wget http://sources.buildroot.net/linux-firmw...config.bin
sudo wget http://sources.buildroot.net/linux-firmw...21c_fw.bin
sudo mv rtl8821a_fw.bin rtl8821a_fw.bin.orig
sudo cp rtl8821c_config.bin rtl8821a_config.bin
sudo cp rtl8821c_fw.bin rtl8821a_fw.bin
sudo update-initramfs -u
sudo reboot
(make sure to keep original rtl8821a_fw.bin.orig somewhere incase you need to undo anything)
< fix BT: change driver to rtk_btusb >
bluetooth still not being found
hcitool dev
Devices:
usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=00 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
so driver btusb is being loaded by the adapter and this isn't working. install correct driver rtl8821cu_bt using these instructions:
this still didn't change driver so i used this post as motivation to get rid of all other custom bluetooth drivers so that the new driver can take over:
success! bluetooth adapter was being recognized:
hcitool dev
Devices:
hci0 1C:BF:CE:E7:FB:E8
usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.14
S: Manufacturer=Linux 4.14.98-v7+ dwc_otg_hcd
S: Product=DWC OTG Controller
S: SerialNumber=3f980000.usb
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=01 Lev=01 Prnt=01 Port=00 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=rtk_btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=rtk_btusb
I: If#= 2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu
pi@retropie:~ $ dmesg | grep -i blue
[ 5.372441] Bluetooth: Core ver 2.22
[ 5.372547] Bluetooth: HCI device and connection manager initialized
[ 5.375654] Bluetooth: HCI socket layer initialized
[ 5.375676] Bluetooth: L2CAP socket layer initialized
[ 5.375722] Bluetooth: SCO socket layer initialized
[ 5.405298] rtk_btusb: Realtek Bluetooth USB driver ver 3.1
[ 6.273534] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 6.273547] Bluetooth: BNEP filters: protocol multicast
[ 6.273572] Bluetooth: BNEP socket layer initialized
[ 107.619679] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 107.619715] Bluetooth: HIDP socket layer initialized
[ 107.710736] input: Wireless Controller Touchpad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input2
[ 107.711226] input: Wireless Controller Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input3
[ 107.712389] input: Wireless Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input1
[ 107.712926] sony 0005:054C:05C4.0001: input,hidraw0: BLUETOOTH HID v81.00 Gamepad [Wireless Controller] on 1c:bf:ce:e7:fb:e8
hope this helps someone
hardware: USB WiFi Bluetooth Adapter, 600Mbps Dual Band 2.4/5Ghz
< install drivers >
i used these instructions as follows:
- sudo apt-get install bc
- clone repo
- install with dkms using executable: cd rtl8821CU/; sudo ./dkms-install.sh (<-- this takes several minutes)
- implement 'make it permanent' section -- the default worked out-of-the box for me: `# Realtek 8211CU Wifi AC USB
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"`
- sudo reboot
this got wifi component working successfully.
< fix BT: missing rtl8821a_config file >
unfortunately the bluetooth did not work out-of-the-box. doing `dmesg | grep -i blue` revealed that rtl8821a_config.bin file was not being loaded because it was not found.
using these instructions i replaced rtl8821a with rtl8821c, e.g.
cd /lib/firmware/rtl_bt
sudo wget http://sources.buildroot.net/linux-firmw...config.bin
sudo wget http://sources.buildroot.net/linux-firmw...21c_fw.bin
sudo mv rtl8821a_fw.bin rtl8821a_fw.bin.orig
sudo cp rtl8821c_config.bin rtl8821a_config.bin
sudo cp rtl8821c_fw.bin rtl8821a_fw.bin
sudo update-initramfs -u
sudo reboot
(make sure to keep original rtl8821a_fw.bin.orig somewhere incase you need to undo anything)
< fix BT: change driver to rtk_btusb >
bluetooth still not being found
hcitool dev
Devices:
usb-devices
T: Bus=01 Lev=01 Prnt=01 Port=00 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
so driver btusb is being loaded by the adapter and this isn't working. install correct driver rtl8821cu_bt using these instructions:
- mkdir bt_build
- cd bt_build/
- git clone https://github.com/andydvsn/rtl8821cu_bt.git
- cd rtl8821cu_bt
- sudo make
- sudo modprobe rtk_btusb
- sudo reboot
this still didn't change driver so i used this post as motivation to get rid of all other custom bluetooth drivers so that the new driver can take over:
- cd /lib/modules/$(uname -r)/kernel/drivers
- sudo mv bluetooth/ bluetooth_orig
- sudo mkdir bluetooth
- cd bluetooth_orig/
- sudo cp rtk_btusb.ko ../bluetooth
- sudo reboot
success! bluetooth adapter was being recognized:
hcitool dev
Devices:
hci0 1C:BF:CE:E7:FB:E8
usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.14
S: Manufacturer=Linux 4.14.98-v7+ dwc_otg_hcd
S: Product=DWC OTG Controller
S: SerialNumber=3f980000.usb
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=01 Lev=01 Prnt=01 Port=00 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=rtk_btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=rtk_btusb
I: If#= 2 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu
pi@retropie:~ $ dmesg | grep -i blue
[ 5.372441] Bluetooth: Core ver 2.22
[ 5.372547] Bluetooth: HCI device and connection manager initialized
[ 5.375654] Bluetooth: HCI socket layer initialized
[ 5.375676] Bluetooth: L2CAP socket layer initialized
[ 5.375722] Bluetooth: SCO socket layer initialized
[ 5.405298] rtk_btusb: Realtek Bluetooth USB driver ver 3.1
[ 6.273534] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 6.273547] Bluetooth: BNEP filters: protocol multicast
[ 6.273572] Bluetooth: BNEP socket layer initialized
[ 107.619679] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 107.619715] Bluetooth: HIDP socket layer initialized
[ 107.710736] input: Wireless Controller Touchpad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input2
[ 107.711226] input: Wireless Controller Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input3
[ 107.712389] input: Wireless Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/bluetooth/hci0/hci0:1/0005:054C:05C4.0001/input/input1
[ 107.712926] sony 0005:054C:05C4.0001: input,hidraw0: BLUETOOTH HID v81.00 Gamepad [Wireless Controller] on 1c:bf:ce:e7:fb:e8
hope this helps someone