USB mouse not being passed through on Android phone

Hi, I have just started using VirtualHere again, and am trying to connect my USB mouse through a hub attached to my Android phone. The mouse moves a cursor on my phone and won't get passed through VirtualHere, even though the hub is showing on the PC. Is there something I can do to fix this? Thanks

#3

Thanks 👍 I had found some old threads when I searched, just had hoped there was a workaround or update since. No worries

#4

I've seen that someone has it working with a mouse on the PICO 4,that could be a really interesting selling point of VirtualHere-with being able to play vr games completely remotely (with virtual desktop) with passing through sim rigs etc. 

The PICO 4 is android based though, so don't know how it's passing through the mouse. Is the limitation with only certain versions of android? seems like it's 10 and above from the comments in the forum, but the pico is surely based off android 10 and above, thanks

#5

yep, I've got my steering wheel, handbrake, shifter, mouse and keyboard all working just fine on pico 4.

i think because it does not currently have mouse support in OS (no cursor after connecting either usb or bluetooth)  it works with virtualhere!

#6

Yes mouse pass-through in virtualhere used to work fine until Android 10 then Google changed it so mice/keyboard couldnt be redirected.

https://issuetracker.google.com/issues/193949757

You will see ive requested they reenable it and many people have commented here and on the android bug tracker and apparently google has assigned someone to do something (rather than just e.g closing wont-fix) so i suspect they will enable it. The PICO4 probably uses a version of android that doesnt have that limitation

#7

@GMOLargely,

Could you describe your setup a bit more. I don't think the mouse would pass through. Are you using a bluetooth mouse or a gaming mouse or something?

#8

Just plugged in my Logitech mouse and keyboard that i use on my pc.

https://imgur.com/a/folguba

Works just fine, can control desktop viewing through Virtual desktop on Pico 4 with virtualhere in the background on Pico 4.

 

Setup (not showing mouse and keyboard was added after video) 

https://youtu.be/IPjaxLRkSys

I can cut down on the daisy chain and use a single cable matters usb C dock/hub that I use for my steamdeck, but the hdmi out from it wasn't working for me.

Even with daisy chain, everything works, there is no flash to 'allow' devices when plugged in within Pico 4 window though so I still need to add one by one first before everything goes into the multi hub 

 

But after that, works great.

 

 

 

 

 

#9

Will also add, Pico 4 is still based on android 10 like oculus quest, haven't checked to see if that headset allows mouse or keyboard.

#10

Thanks gmo thats helpful!

#11

Thanks, I'll try connecting each device separately before putting it into a hub 👍

#12

I think experienced this on Android OS 12 (Chromecast 4K TV + USB hub) where by default the OS loaded the USB devices making it work on the host OS not the client.

Mouse Hardware

1: Logitech universal dongle i have for a mx series mouse and keyboard

2:  An older wired USB Logitech mouse.

Android servers tested (no v10 sorry)

1: Android 9 kernel 4.4 (Samsung)

2: Android OS 12 https://i.imgur.com/rRmJEx7.png

Note: The Virtualhere client is my PC

The V9 server works as expected and passes through with no issues when using just the mouse via USB. With the hub it always asks to connect the hub device AX88179A and never any of the specific USB devices connected. This was true of another budget hub I used as well.

The v12 server works but has a peculiar behavior. I'll explain as I must use a USB hub with power delivery to do this on CC.

When I start Virtualhere Server it will ask me which device to connect except that is seems to cycle the connected device list starting from the first connected device (USB Receiver which is the Logitech unified dongle in the images)

The Device I need to be selected is the HUB - AX88179A (google say sit's this https://www.asix.com.tw/en/product/USBEthernet)

You can see in this image it's the third option after starting/stopping the server

https://i.imgur.com/ApeMC6n.png

When I get this option everything will work as intended and I see this in my client

https://i.imgur.com/J5oWBGa.png

So it appears mouse passthrough is working in Android 12 OS but it must keep restarting the server until it asks for the hub. I assume the OS is causing the different behavior in what should be the same Virtualhere server version? Connecting the induvial devices won't matter until the HUB is selected.

Now I know it's not 100% the same as connecting a single device via USB to an Android server but it's not possible to do that with a CC unless the USB device could power it and I also experience the HOST hijacking of the mouse on two device who can then be passthrough successfully to the client. So I assume the latter must be relevant as this thread is about how you cannot do that on Android 10+ at all.

Need any log info or stuff just tell me what to do.

 

 

#13

Thanks for the detailed info!

There looks like there is another bug in Android, i will need to log with Google. It shouldnt ask if it can "use" a usb hub. I think the hub should be transparent and it should just ask to use the devices attached to the hub. I will log this with google. Actually that device is not a hub it is a USB -> Ethernet adapter, so android should ask if it can use it, however you shouldn't have use it via virtualhere because i don't think its relevant to working with the attached devices. I'm not sure if this is a bug in android or if it is meant to do things this way.

Yes some mice do work with virtualhere and Android but the mouse cant actually be a standard mouse. The reason is android will detect a standard mouse as an HID device which is blocked and I'm sure of this because i can see the Android 12 source code here https://github.com/aosp-mirror/platform_frameworks_base/blob/android12-…

If your mouse appears as a Bluetooth, or wireless, or custom USB device then it fools android, and android will pass it through to virtualhere. Wireless mice, Bluetooth mice and gaming mice don't appear as HID devices so they can be used via virtualhere

#14

Yes, these are usb-c to ethernet adapters. My other one was some cheap one (£6.99) but appears to have the same chip AX88179A https://www.amazon.co.uk/gp/product/B09NNHF6MK

The Android 9 did occasionally ask to use this but never asked for anything else. they just worked when connected

It's the Android 12 which behaves differently in that

1: It uses the USB dongle/USB mouse attached via the usb hub before I load Virtualhere

2: If Virtualhere asks me for to use the AX88179A it will then take over and it stops working on CC and becomes active on the client and I see all devices attached and can use them.

3: If it asks about one of the attached items, the rest will never show in the client. Unless I remove and insert them again but not always.

So since there is literally no was to do it without a PD hub with the CC I guess I can't test the direct USB method.

It's not exactly the same issue but there is some overlap and maybe also show that if they use a hub they can overcome the limitation?

#15

OK i dont know why its doing what its doing with the AX88179A .

#16

This is what see on the Android 9 phone sometimes

https://imgur.com/a/zg9wGVo

But it also worked properly when i plugged in the USB mouse via a usb-a to usb-c adapter to pass through. Something I cannot test on the CC for lack of power to device.

#17

Any updates on how to connect a keyboard on android 12?

#18

See note above this is the current solution:

"If your mouse appears as a Bluetooth, or wireless, or custom USB device then it fools android, and android will pass it through to virtualhere. Wireless mice, Bluetooth mice and gaming mice don't appear as HID devices so they can be used via virtualhere"

#19

This is not always true. I am able to get only my razer mouse working on pixel 7 only through the wireless dongle, but not bluetooth (it has both).  my logitech keyboard does not work through the wireless dongle, the onn mouse and keyboard combo i just got does not work with the wireless dongle, and my microsoft arc mouse does not work through bluetooth. Android recoginizes it all. No idea whats so special about the razer with the dongle.