I have a program on the VirtualHere server that (also) sends commands to a USB device. Note: Only only application will ever connect to a USB device at a time. I'm not trying to have simultaneous access to the device from more than one client.
This works until a VH client ever connects to a USB device via vhusbarm. Killing and starting vhusbarm does not seem to work. My only workaround is to restart the entire server.
This blocks not only access to device that was opened, but to any USB device on the server. This uses the hidapi (https://github.com/libusb/hidapi) and hd_init() fails before it ever accesses the device. Perhaps there a better library to use or someway to reset vhusbarm?
Perhaps there is some workaround I can do before and after the call to my application (e.g., stop vhusbarm with some special option (disconnecting any vh clients), run the app, and then start vhusbarm).