Client on board devices stop working

My current setup:

Client: Windows 11 laptop.

Server: Raspberry Pi 4 running the optimized server distribution.

USB devices plugged into the Raspberry Pi:
1) a USB webcam
2) a USB bluetooth dongle

The goal is for the Raspberry Pi to be in one room, with the Windows PC in another room. There is a trainer on the PC who is able to control the webcam from their room while watching and listening in, and they can use the PC's microphone to send audio to a bluetooth earpiece worn by the trainee in the other room. The PC also records the video from the camera, and both microphones.

I am able to get this working, but my issue comes once I am done with this setup. My laptop no longer recognizes its built in camera or bluetooth radio, even after I close the VirtualHere client, or even after I reset (at least for the Camera. I didn't actually test the Bluetooth individually). The only solution I have figured out is to go into the Windows Device Manager, show hidden devices, and uninstall all the USB and Bluetooth devices, then after restarting everything works again (although I have to re-pair Bluetooth devices).

I saw in another thread that Windows can only handle one Bluetooth radio at a time, and as I mentioned earlier I didn't try to see if the onboard Bluetooth works once the VirtualHere client is closed and/or the computer is reset. I just assumed it was the same issue as the webcam problem, which I had encountered before even trying to use the Bluetooth dongle on the Raspberry Pi.

My question is if there is something I can do other than what I am currently doing to ensure the onboard devices work properly when not trying this training setup. If it was just me using the setup I would probably just deal with the inconvenience of uninstalling things in the device manager, but there will be other, less tech-savvy people using this setup with their own laptops.

#2

Correct, you cannot have two Bluetooth radios attached to a windows PC. It will automatically disable the internal one if you do that. https://superuser.com/questions/1291037/operate-two-bluetooth-radios-on… 

You can have any number of cameras connected to a windows PC, i don't know the limitation but its probably a lot of simultaneous webcams attached.

After you stop using the devices via virtualhere, can you check in Windows Device manager on the laptop -  Is the internal Bluetooth "Disabled" and the internal webcam disabled? 

Or does it say the "Device is operating normally" when you look at the properties. 

If its disabled can you "Enable" it by clicking the button. 

#3

I've created series of screenshots to show you what my Device Manager looks like in different stages.

  1. Prior to using VirtualHere, when my camera and Bluetooth are working normally:
    1. Bluetooth and Camera (showing hidden devices): https://photos.app.goo.gl/1zTzdhVup5Nux7FF7
    2. USB devices (showing hidden): https://photos.app.goo.gl/ftWqBiwbGbvVqM2X6
  2. After setting up VirtualHere (I didn't specifically test if it works this time, but it has previously):
    1. Bluetooth (showing hidden): https://photos.app.goo.gl/mQgsLsHBH2tbJ3WD7
    2. Camera (showing hidden): https://photos.app.goo.gl/7YkRtELP658bHRFy8
    3. USB devices (showing hidden): https://photos.app.goo.gl/HiaZ4jgEeQEbjKQz7
  3. After closing out of VirtualHere, and even restarting my computer, where neither my onboard camera or Bluetooth work anymore. Neither device shows up in Device Manager unless I show hidden:
    1. The full Device Manager, (not showing hidden): https://photos.app.goo.gl/gX3LtSziVn7eAUq16
    2. Bluetooth (showing hidden): https://photos.app.goo.gl/bcSPsKDAGTySFHda8
    3. Camera (showing hidden): https://photos.app.goo.gl/RxjLC2jGcTmWqKgD6
    4. USB (showing hidden): https://photos.app.goo.gl/S52Z8GTtrUNVP66y6

This is a screenshot of the "Properties" dialog box for the Camera: https://photos.app.goo.gl/KL7YBfJtxaWrRCiy7

So basically after I set up VirtualHere, even when I don't have VirtualHere open my computer no longer believes the hardware for the onboard camera or Bluetooth are even connected to the computer. I initially tried reinstalling drivers for the camera, but nothing I did worked. Everything I did kept saying no camera was connected. Noticing the error flag next to "Intel(R) USB 3.10 eXtensible Host Controller - 1.20 (Microsoft)" I figured maybe there was some USB controller setting that got changed with VirtualHere which made my laptop no longer believe there was a webcam attached. That was when I went through and uninstalled everything under the USB and Bluetooth headings, and after a restart the camera and USB work again.

I'm hoping there's an easier (and ideally more automated) way to re-enable the devices. This set-up is primarily for my wife to do training sessions, and she wouldn't be comfortable having to do this every time. Honestly, I haven't even tested it on her computer yet (a Lenovo IdeaPad 3). Maybe this is just an issue for my laptop (Microsoft Surface Laptop Studio 2), but I am still hoping for a fix or easier workaround.

Thanks for your help and prompt reply.

#4

Interesting, the fact that the Intel(R) USB 3.10 eXtensible Host Controller - 1.20 (Microsoft) is being disabled leads me to believe its related to this issue. Can you make that registry change and reboot and see if that resolves it

#5

.

That fix appears to have worked. Thank you for your prompt support.

Looking through that thread you posted it appears like Intel had previously (potentially) fixed the issue, but that doesn't seem to be the case anymore. Or am I mistaken? Is there anything else I can or should be doing?

#6

Ok, so things are definitely working better than before, but I was hoping you could help me with one more hiccup. Now when I connect to the USB Bluetooth dongle in the Raspberry Pi it doesn't work (likely because of the "only one Bluetooth radio at a time"). I can go into Device Manager which shows an error:
This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)

{Operation Failed}
The requested operation was unsuccessful.

If I disable my onboard Bluetooth radio before connecting the the USB dongle through VirtualHere then it will work fine. Is there a way to set my system up so that either it preferentially uses the USB Bluetooth dongle radio, or so that it disables the onboard Bluetooth device prior to connecting to the USB through VirtualHere?

#7

Yes you can automatically disable the on-board Bluetooth,

  1. Open windows device manager and find the inbuilt adapter under Bluetooth. E.g my laptop has "Intel(R) Wireless Bluetooth(R)" and right click Properties 
  2. Open the Details tab and the Device Instance Path, right click Copy
  3. Start the virtualhere client "as administrator" or run the client as a service so it has admin privileges
  4. Right click on the Bluetooth adapter in the virtualhere client and select Custom Event handler then paste in this line (modify for the value copied on step 2)

onClientBeforeBind.$VENDOR_ID$.$PRODUCT_ID$=pnputil /disable-device "<device instance id>"

e.g on my laptop 

onClientBeforeBind.$VENDOR_ID$.$PRODUCT_ID$=pnputil /disable-device "USB\\VID_8087&PID_0033\\5&53D51F0&0&10"
 

5. Right click on the Bluetooth adapter again in the virtualhere client and paste in a similar onClientAfterBind e.g

onClientAfterUnbind.$VENDOR_ID$.$PRODUCT_ID$=pnputil /enable-device "USB\\VID_8087&PID_0033\\5&53D51F0&0&10"

 

See the bottom of this page for more information https://www.virtualhere.com/client_api

You must run the virtualhere client with admin priveleges (or as a service) so that it can call /disable-device or /enable-device otherwise it wont have permission

 

#8

Thank you!

I did have to change the second event to:

onClientAfterUnbind.$VENDOR_ID$.$PRODUCT_ID$=pnputil /enable-device "<device instance id>"

and now I think everything is working as I need it. I really appreciate your help.

#9

Sorry i made a mistake it should be for the second event (I updated the previous post)

onClientAfterUnbind

because you want it to happen after the usb bluetooth is unbound from the client

#10

Thanks, yeah, I caught that, and that's what I was using, but made the same mistake in my post :-D

Corrected now.