Android Server + Client on ArchLinux

9 posts / 0 new
Last post
cwalker
Android Server + Client on ArchLinux

Hello!
I am trying to run Android server and ChimeraOS (ArchLinux) client.
(Android server + Windows 10 client works flawlessly)
I have 2 devices: XBOX Wireless Adapter and BT Controller
When accessing the device, it turns off.

uname -a:
Linux chimeraos 5.12.12-arch1-1 #1 SMP PREEMPT Fri, 18 Jun 2021 21:59:22 +0000 x86_64 GNU/Linux

dmesg:

[ 3833.562598] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(10)
[ 3833.562604] vhci_hcd vhci_hcd.0: devid(4) speed(3) speed_str(high-speed)
[ 3833.562615] vhci_hcd vhci_hcd.0: Device attached
[ 3833.791948] usb 3-1: new high-speed USB device number 13 using vhci_hcd
[ 3833.807600] vhci_hcd vhci_hcd.0: pdev(0) rhport(1) sockfd(10)
[ 3833.807608] vhci_hcd vhci_hcd.0: devid(5) speed(2) speed_str(full-speed)
[ 3833.807619] vhci_hcd vhci_hcd.0: Device attached
[ 3833.922079] usb 3-1: SetAddress Request (13) to port 0
[ 3833.972404] usb 3-1: New USB device found, idVendor=045e, idProduct=02fe, bcdDevice= 1.00
[ 3833.972412] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3833.972415] usb 3-1: Product: XBOX ACC
[ 3833.972418] usb 3-1: Manufacturer: Microsoft Inc.
[ 3833.972420] usb 3-1: SerialNumber: 390451
[ 3833.985097] audit: type=1130 audit(1626680230.654:176): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=xow comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3834.181842] vhci_hcd: vhci_device speed not set
[ 3834.238503] usb 3-2: new full-speed USB device number 14 using vhci_hcd
[ 3834.311830] vhci_hcd: vhci_device speed not set
[ 3834.368499] usb 3-2: SetAddress Request (14) to port 1
[ 3834.435232] usb 3-2: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[ 3834.435240] usb 3-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 3834.435244] usb 3-2: Product: CSR8510 A10
[ 3834.444718] audit: type=1130 audit(1626680231.114:177): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3835.338514] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3836.231861] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3836.938714] vhci_hcd: unlink->seqnum 306
[ 3836.938722] vhci_hcd: urb->status -104
[ 3836.938936] vhci_hcd: unlink->seqnum 307
[ 3836.938941] vhci_hcd: urb->status -104
[ 3836.939068] vhci_hcd: unlink->seqnum 308
[ 3836.939080] vhci_hcd: urb->status -104
[ 3837.128534] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3838.021864] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3838.022027] audit: type=1701 audit(1626680234.694:178): auid=4294967295 uid=64499 gid=64499 ses=4294967295 pid=2197 comm="xow" exe="/usr/bin/xow" sig=6 res=1
[ 3838.022039] usb 3-1: USB disconnect, device number 13
[ 3838.032191] audit: type=1334 audit(1626680234.704:179): prog-id=35 op=LOAD
[ 3838.032279] audit: type=1334 audit(1626680234.704:180): prog-id=36 op=LOAD
[ 3838.032344] audit: type=1334 audit(1626680234.704:181): prog-id=37 op=LOAD
[ 3838.033205] audit: type=1130 audit(1626680234.704:182): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@2-2206-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3838.096090] audit: type=1131 audit(1626680234.767:183): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=xow comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[ 3838.096903] audit: type=1131 audit(1626680234.767:184): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@2-2206-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3838.178587] audit: type=1334 audit(1626680234.850:185): prog-id=37 op=UNLOAD
[ 3838.918527] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3839.446934] kauditd_printk_skb: 2 callbacks suppressed
[ 3839.446937] audit: type=1131 audit(1626680236.117:188): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3839.811848] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3839.811869] usb usb3-port1: attempt power cycle
[ 3840.718530] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3841.611860] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 3841.611880] usb usb3-port1: unable to enumerate USB device

Michael
.

OK looks like the xbox dongle wont be compatible , however does the bluetooth dongle work ok? I dont see any error thrown for that device

cwalker
Same:

Same:

[ 3888.836222] usb 3-2: USB disconnect, device number 3
[ 3888.841617] audit: type=1130 audit(1626685530.633:133): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 3888.906219] vhci_hcd: vhci_device speed not set
[ 3889.112867] vhci_hcd: vhci_device speed not set
[ 3889.319541] vhci_hcd: vhci_device speed not set
[ 3889.526218] vhci_hcd: vhci_device speed not set
[ 3889.732884] vhci_hcd: vhci_device speed not set
[ 3889.732906] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 3889.799554] vhci_hcd: vhci_device speed not set
[ 3890.009551] vhci_hcd: vhci_device speed not set
[ 3890.216234] vhci_hcd: vhci_device speed not set
[ 3890.422877] vhci_hcd: vhci_device speed not set
[ 3890.629551] vhci_hcd: vhci_device speed not set
[ 3890.629572] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 3890.629590] usb usb3-port2: attempt power cycle

cwalker
Try BT scan:

Try BT scan:

bluetoothctl -- scan on

More logs:

[ 4306.784454] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(10)
[ 4306.784469] vhci_hcd vhci_hcd.0: devid(4) speed(3) speed_str(high-speed)
[ 4306.784487] vhci_hcd vhci_hcd.0: Device attached
[ 4307.011970] usb 3-1: new high-speed USB device number 16 using vhci_hcd
[ 4307.034515] vhci_hcd vhci_hcd.0: pdev(0) rhport(1) sockfd(10)
[ 4307.034520] vhci_hcd vhci_hcd.0: devid(5) speed(2) speed_str(full-speed)
[ 4307.034529] vhci_hcd vhci_hcd.0: Device attached
[ 4307.141979] usb 3-1: SetAddress Request (16) to port 0
[ 4307.177243] usb 3-1: New USB device found, idVendor=045e, idProduct=02fe, bcdDevice= 1.00
[ 4307.177251] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4307.177254] usb 3-1: Product: XBOX ACC
[ 4307.177256] usb 3-1: Manufacturer: Microsoft Inc.
[ 4307.177258] usb 3-1: SerialNumber: 390451
[ 4307.187854] audit: type=1130 audit(1626685948.977:167): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=xow comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 4307.381982] vhci_hcd: vhci_device speed not set
[ 4307.438648] usb 3-2: new full-speed USB device number 17 using vhci_hcd
[ 4307.508649] vhci_hcd: vhci_device speed not set
[ 4307.568641] usb 3-2: SetAddress Request (17) to port 1
[ 4307.625548] usb 3-2: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[ 4307.625556] usb 3-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4307.625559] usb 3-2: Product: CSR8510 A10
[ 4307.635126] audit: type=1130 audit(1626685949.423:168): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 4308.528677] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4309.422009] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4310.129838] vhci_hcd: unlink->seqnum 293
[ 4310.129850] vhci_hcd: urb->status -104
[ 4310.130045] vhci_hcd: unlink->seqnum 294
[ 4310.130051] vhci_hcd: urb->status -104
[ 4310.130192] vhci_hcd: unlink->seqnum 295
[ 4310.130198] vhci_hcd: urb->status -104
[ 4310.315347] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4311.208699] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4311.208867] audit: type=1701 audit(1626685953.000:169): auid=4294967295 uid=64499 gid=64499 ses=4294967295 pid=2032 comm="xow" exe="/usr/bin/xow" sig=6 res=1
[ 4311.208870] usb 3-1: USB disconnect, device number 16
[ 4311.219864] audit: type=1334 audit(1626685953.010:170): prog-id=32 op=LOAD
[ 4311.219996] audit: type=1334 audit(1626685953.010:171): prog-id=33 op=LOAD
[ 4312.105357] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4312.639969] kauditd_printk_skb: 7 callbacks suppressed
[ 4312.639973] audit: type=1131 audit(1626685954.430:179): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 4313.002082] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4313.002101] usb usb3-port1: attempt power cycle
[ 4313.908700] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4314.802036] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4314.802057] usb usb3-port1: unable to enumerate USB device
[ 4320.032067] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4320.928739] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4320.928757] usb usb3-port1: attempt power cycle
[ 4321.205396] Bluetooth: hci0: command 0x2005 tx timeout
[ 4321.838746] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4322.735418] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[ 4322.735438] usb usb3-port1: unable to enumerate USB device
[ 4322.735461] usb 3-2: USB disconnect, device number 17
[ 4322.740912] audit: type=1130 audit(1626685964.530:180): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 4322.802078] vhci_hcd: vhci_device speed not set
[ 4323.008743] vhci_hcd: vhci_device speed not set
[ 4323.215411] vhci_hcd: vhci_device speed not set
[ 4323.422078] vhci_hcd: vhci_device speed not set
[ 4323.628747] vhci_hcd: vhci_device speed not set
[ 4323.628768] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 4323.695415] vhci_hcd: vhci_device speed not set
[ 4323.905410] vhci_hcd: vhci_device speed not set
[ 4324.112083] vhci_hcd: vhci_device speed not set
[ 4324.318753] vhci_hcd: vhci_device speed not set
[ 4324.525413] vhci_hcd: vhci_device speed not set
[ 4324.525434] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 4324.525453] usb usb3-port2: attempt power cycle
[ 4324.608748] vhci_hcd: vhci_device speed not set
[ 4324.815421] vhci_hcd: vhci_device speed not set
[ 4325.022089] vhci_hcd: vhci_device speed not set
[ 4325.228751] vhci_hcd: vhci_device speed not set
[ 4325.435444] vhci_hcd: vhci_device speed not set
[ 4325.435462] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 4325.502091] vhci_hcd: vhci_device speed not set
[ 4325.708762] vhci_hcd: vhci_device speed not set
[ 4325.915428] vhci_hcd: vhci_device speed not set
[ 4326.122098] vhci_hcd: vhci_device speed not set
[ 4326.328767] vhci_hcd: vhci_device speed not set
[ 4326.328790] usb usb3-port2: Cannot enable. Maybe the USB cable is bad?
[ 4326.328808] usb usb3-port2: unable to enumerate USB device

Michael
.

OK i shall install chimeraos on my intel NUC test machine and see if i can figure it out. I'll let you know if i find the issue or not...

Michael
.

OK i got it working but i had to patch the kernel. If you know how to recompile your kernel then you need to comment out the if in lines 458/459 (or if (1) to make it always true)

https://github.com/torvalds/linux/blob/2734d6c1b1a089fb593ef6a23d4b70903...

and then recompile the usbip drivers.

I did that and the xbox controller was passed through ok. And so was the bluetooth adapter

Now i have to figure out how to commit upstream... :)

On ubuntu i did this:

(Enable Source in Software & Updates)

sudo apt install -y build-essential dwarves flex bison libssl-dev libelf-dev
apt-get source linux-image-unsigned-$(uname -r)
cd linux-5.11.0
make oldconfig
make prepare
make scripts
cp -v /usr/src/linux-headers-5.11.0-25-generic/Module.symvers .
sudo mv -v /lib/modules/5.11.0-25-generic/kernel/drivers/usb/usbip/usbip-core.ko /lib/modules/5.11.0-25-generic/kernel/drivers/usb/usbip/usbip-core.bak
sudo mv -v /lib/modules/5.11.0-25-generic/kernel/drivers/usb/usbip/vhci-hcd.ko /lib/modules/5.11.0-25-generic/kernel/drivers/usb/usbip/vhci-hcd.bak
cd drivers/usb/usbip
vi vhci_hcd.c
459 shift G
add || VDEV_ST_USED to the if statement
escape :wq
make -C /lib/modules/5.11.0-25-generic/build M=$(pwd) modules
sudo make -C /lib/modules/5.11.0-25-generic/build M=$(pwd) modules_install
sudo depmod
sudo modprobe -v usbip-core
sudo modprobe -v vhci_hcd
cd ~
wget https://www.virtualhere.com/sites/default/files/usbclient/vhclientx86_64
chmod +x ./vhclientx86_64
sudo ./vhclientx86_64 -n
./vhclientx86_64 -t "LIST"
./vhclientx86_64 -t "USE,address found in previous command"
sudo dmesg (to confirm working)
cwalker
I will try to build chimera

I will try to build chimera os with your patch.
Thank you!

Michael
.

You can track this issue upstream https://lkml.org/lkml/2021/7/21/1117

Michael
.

OK good news, i submitted a patch to mainline and its gone in and will be in linux 5.15 when that is released soon. So if you update to linux 5.15 it will be fixed

Log in or register to post comments