Timocop / PSMoveServiceEx-Virtual-Device-Manager

A virtual device manager for PSMoveServiceEx.
GNU General Public License v3.0
35 stars 1 forks source link

Playstation VR Management showing USB Driver Issues as not data transmitted #12

Closed TiagoSantos81 closed 3 months ago

TiagoSantos81 commented 6 months ago

I discovered PSMoveServiceEx recently and found that it was a good way to replace Trinus PSVR to make my PSVR1-v2 work on my PC. However, I may be missing some step on VDM the install, since it shows no data is being sent to the USB cable after installing the VDM driver for PSVR HMD as shown below:

image

The extended display is shown in the HMD as a virtual screen, even after VMD driver install, but no stereoscopic output is shown.

I am using Windows 10 22H2, and VDM version 13.3.6.0.

VMD Debug Exceptions:

[2141043967]
Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
StackTrace=   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\n   at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)\n   at PSMSVirtualDeviceManager.UCVmtManagement.OscStatusThread()
Date=04/23/2024 18:03:31
Count=1
Version=13.3.6.0
[-1476424085]
Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
StackTrace=   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\n   at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)\n   at PSMSVirtualDeviceManager.UCVmtManagement.OscDeviceStatusThread()
Date=04/23/2024 18:03:31
Count=1
Version=13.3.6.0

Please, advise.

TiagoSantos81 commented 6 months ago

I seem to have "fixed it" in the meantime, but a initialization bug may be thre, and it would be nice to have it referred to in the documentation -- if it is not shown already, since I could not find the official wiki.

  1. Using duplicated mode seen to activate the usual 3D stereo mode for ReShade. Maybe it would be nice to make the GUI mention it, instead of showing the duplicated option as an error.
  2. After configuring PS Moves on the PSMoveServiceEx, and adding all the required PlayStation drivers and Bluetooth configs, the USB Connected green check was achieved.

image

I have yet to test gyro head tracking, since unlike Trinus, it does not automatically convert gyro to mouse. Since this program seems to be designed for VR APIs, maybe adding an option associated with the duplicated screen mode to enable HMD gyro to mouse axis would also be nice.

Timocop commented 5 months ago

Glad you fixed the issue. VDM currently only supports SteamVR and not modded FlatscreenVR for emulating Desktop games for VR. Alos for optimal performance Extended Display Mode should be used. As Duplicated Display can reduce the visual quality and frequency of the PSVR display. Resulting in terrible experience and motion sickness. Just drag the game onto the PSVR monitor instead if you really need to view it in the PSVR HMD.

Adding a FlatscreenVR mode is currently not on my to do list. And if it would, it would be low priority. Most FlatscreenVR games are made to support SteamVR anyways.

Timocop commented 5 months ago

Also FYI: You have to run PSMoveServiceEx (Run Service in VDM) to connect to the PSVR HMD. As described in the USB not receiving data warning.

TiagoSantos81 commented 5 months ago

Thank you for your feedback, Timocop. Definitely useful feedback here.

Glad you fixed the issue.

Sort of. After writing the issue, I ended up with the same issue in the following day, after reboot. So the issue is still there.

You have to run PSMoveServiceEx (Run Service in VDM) to connect to the PSVR HMD. As described in the USB not receiving data warning.

I wrote the issue here, considering the PSMoveServiceEx was already running, and after having it restarted several times, with different tweak to the program and graphic settings. Considering the intermittent nature of the problem, I would guess there is some other service or driver interfering with the PSMoveService.

Adding a FlatscreenVR mode is currently not on my to do list. And if it would, it would be low priority. Most FlatscreenVR games are made to support SteamVR anyways.

I understand it is very outside the curret scope, although -- as a noobie to VR --, I find that a preferable mode to dabble into VR motion controls. UEVR and REFramework allow Steam output, but getting rid of Steam for VR2Flat mods would be great.

Would adding a toggle/sidebar entry to switch between direct passthrough and virtual desktop mode be too far outside the scope? I found PSVRToolbox that presumably does that, but, it is also not working correctly for me.

Timocop commented 5 months ago

Please attach the PSMoveServiceEx.log (you can also find it in VDM as Show service logs)

If you have connection problems with the PSVR HMD make sure the USB connection is stable. Always use a USB 3.0 port and avoid bandwidth bottlenecks (e.g. combining PSEyes and PSVR onto a single USB host controller might be a bad idea) Most of the time a powered USB Hub can also fix tons of connection issues. If USB issues still persists, make sure you dont block PSMoveServiceEx by other programs that also interact with the device. Only one device at the time can use the device.

PSMoveServiceEx is currently just 2 years old, including all the other ~5 projects that im working on at the side (VDM, moveTrack, VMT etc.). There are currently way more important things on my roadmap to deal with right now (you can find the roadmap on the PSMSX discord server). Theres a lot of users having feature request as well as you. But currently im working on this alone and it might take some time.

BUT, once the plugin system for VDM is implemented, people can make their own extensions to control input/output easily. And maybe youre luck and someone makes a plugin for that what you wish for. So far, SteamVR, is a pretty stable foundation and is much more popular. I want to get everything working before i go full bleeding edge. Hope you understand. Of course taht does not mean it will never be implemented, it just takes time.

TiagoSantos81 commented 5 months ago

If you have connection problems with the PSVR HMD make sure the USB connection is stable

As I mentioned earlier, it is working flawlessly with Trinus PSVR, and I am at the moment switching between PSMoveServiceEx and TrinusPSVR driver while testing. I have both the stereoscopic output and the gyroscope reading working correctly on it after calibration. However, Trinus only does 3DoF, is closed-source, and it does not control nor configure any other peripheral. I would like to configure PSMOVEServiceEX so I can also recommend open-source for VR purposes.

I am focusing on PSVR since it is a decent affordable headset. Its resolution is good enough even in 2024, since it still challenges SOTA consumer GPUs to run flat games at maximum graphical settings, native resolution and 120Hz, especially when modded for VR. Therefore, a good foundation to build on.

There are currently way more important things on my roadmap to deal with right now.

I am sorry if I sounded ungrateful. I do not feel that at all, your effort is great. I believe I have missed a step, or there is a bug, and I would like to solve it, so I can also enjoy the benefits of this program. The ideas, are just that, suggestions. I look forward to see the plugin system implemented.

Thank you once more for sharing your work and time.

TiagoSantos81 commented 5 months ago
[2141043967]
Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
StackTrace=   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\n   at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)\n   at PSMSVirtualDeviceManager.UCVmtManagement.OscStatusThread()
Date=04/23/2024 18:03:31
Count=1
Version=13.3.6.0
[-1476424085]
Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
StackTrace=   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\n   at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)\n   at PSMSVirtualDeviceManager.UCVmtManagement.OscDeviceStatusThread()
Date=04/23/2024 18:03:31
Count=1
Version=13.3.6.0
[-1024182387]
Message=Unable to connect to the remote server
StackTrace=   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)\n   at System.Net.WebClient.DownloadString(Uri address)\n   at PSMSVirtualDeviceManager.ClassUpdate.ClassVdm.GetNextVersion(String& r_sLocationInfo)
Date=04/22/2024 01:18:32
Count=1
Version=13.3.6.0
[188634225]
Message=Unable to find update files
StackTrace=   at PSMSVirtualDeviceManager.ClassUpdate.ClassVdm.GetNextVersion(String& r_sLocationInfo)\n   at PSMSVirtualDeviceManager.ClassUpdate.ClassVdm.CheckUpdateAvailable(String sFile, String& r_sLocationInfo, String& r_sNextVersion, String& r_sCurrentVersion)\n   at PSMSVirtualDeviceManager.ClassUpdate.ClassVdm.CheckUpdateAvailable(String sFile, String& r_sLocationInfo)\n   at PSMSVirtualDeviceManager.FormMain.ClassUpdateChecker.UpdateCheckThread()
Date=04/22/2024 01:18:32
Count=1
Version=13.3.6.0
[1404957938]
Message=Exception of type 'PSMoveServiceExCAPI.ServiceExceptions+ServiceRequestFailed' was thrown.
StackTrace=   at PSMoveServiceExCAPI.ServiceExceptions.ThrowExceptionServiceRequest(String sMessage, PSMResult iResult)\n   at PSMoveServiceExCAPI.PSMoveServiceExCAPI.Service.Connect(Int32 iTimeout)\n   at PSMSVirtualDeviceManager.ClassServiceClient.ProcessingThread()
Date=04/23/2024 18:16:49
Count=110
Version=13.3.6.0
[1816132491]
Message=Changing display frequency failed with error: -2 - DISP_CHANGE_BADMODE
StackTrace=   at PSMSVirtualDeviceManager.FormDisplayFrequency.Button_Apply_Click(Object sender, EventArgs e)
Date=04/22/2024 01:19:52
Count=1
Version=13.3.6.0
[-1541440430]
Message=PSMoveServiceEx is running. Please close PSMoveServiceEx!
StackTrace=   at PSMSVirtualDeviceManager.UCStartPage._Lambda$__429-0()
Date=04/22/2024 02:25:37
Count=1
Version=13.3.6.0
[-37516125]
Message=PSMoveServiceEx is running. Please close PSMoveServiceEx!
StackTrace=   at PSMSVirtualDeviceManager.UCStartPage._Lambda$__435-0()
Date=04/22/2024 01:59:29
Count=1
Version=13.3.6.0
[826564273]
Message=PSMoveServiceEx is running. Please close PSMoveServiceEx!
StackTrace=   at PSMSVirtualDeviceManager.UCStartPage.LinkLabel_ServiceFactory_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e)
Date=04/22/2024 02:05:48
Count=1
Version=13.3.6.0
[1601676771]
Message=Controller is not available.
StackTrace=   at PSMSVirtualDeviceManager.UCVmtPlayspaceCalib.PlayspaceCalibrationThread()
Date=04/22/2024 02:12:19
Count=1
Version=13.3.6.0
[-1299107333]
Message=Invalid pipe index.
StackTrace=   at PSMSVirtualDeviceManager.UCVirtualTrackerItem.ClassCaptureLogic.DoPipeLogic(Int32 iPipeID)
Date=04/22/2024 02:27:32
Count=854
Version=13.3.6.0
Timocop commented 5 months ago

I am sorry if I sounded ungrateful

Its all good no worries, i wasnt upset or anything, just wanted to explain the situation. Your suggestion and feature requests have been noted 👌 Join the Discord server to keep yourself updated. Theres currently a lot on the roadmap but I hope people can help me add extend features using the plugin system in the future.

Also thats the VDM exception logs, not PSMSX logs. Click Show Service logs in VDM to show PSMSX log, not Show Virtual Device Manager exceptions those are just for VDM itself.

TiagoSantos81 commented 5 months ago

Here is the log.

[2024-04-27 17:36:13.987]: main - Starting PSMoveServiceEx v0.24.4.0 (protocol v0.9-alpha 9.0.0)
[2024-04-27 17:36:14.3]: USBAsyncRequestManager::startup - Requested LibUSBApi
[2024-04-27 17:36:14.4]: USBAsyncRequestManager::startup - Creating LibUSBApi
[2024-04-27 17:36:14.10]: USBAsyncRequestManager::startup - Initialized USB API
[2024-04-27 17:36:14.18]: DeviceManager::startup - Platform Hotplug API is ENABLED
[2024-04-27 17:36:14.434]: bluetooth_get_host_address - Found a bluetooth radio
[2024-04-27 17:36:14.436]: bluetooth_get_host_address - Retrieved radio info
[2024-04-27 17:36:14.453]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 17:36:14.455]: PSMoveServiceEx - Startup successful! Entering main loop...
[2024-04-27 17:36:14.456]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 17:36:14.457]: PSMoveServiceEx - GitHub: https://github.com/Timocop/PSMoveServiceEx
[2024-04-27 17:36:14.459]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 17:36:14.487]: VirtualController::open - Opening VirtualController(VirtualController_0).
[2024-04-27 17:36:14.497]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualController) opened
[2024-04-27 17:36:14.500]: VirtualController::open - Opening VirtualController(VirtualController_1).
[2024-04-27 17:36:14.509]: DeviceTypeManager::update_connected_devices - Device device_id 1 (VirtualController) opened
[2024-04-27 17:36:14.517]: PS3EyeTracker::open - Opening PSEyeVideoCapture(VirtualTracker_0, camera_virt_index=0, camera_index=0)
[2024-04-27 17:36:14.540]: SharedMemory::initialize() - Allocating shared memory: tracker_view_0
[2024-04-27 17:36:14.845]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualTracker) opened
[2024-04-27 17:36:14.854]: VirtualHMD::open - Opening VirtualHMD(VirtualHMD_0).
[2024-04-27 17:36:14.865]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualHMD) opened
[2024-04-27 17:36:14.867]: MorpheusHMD::open - Opening MorpheusHMD(USB\VID_054c&PID_09af).
[2024-04-27 17:36:14.875]: morpeus_open_usb_device - Morpheus USB device not found!
[2024-04-27 17:36:14.876]: MorpheusHMD::open - Failed to open MorpheusHMD(USB\VID_054c&PID_09af)
[2024-04-27 17:36:14.877]: MorpheusHMD::close - Closing MorpheusHMD sensor interface(\\?\hid#vid_054c&pid_09af&mi_04#7&1101ce14&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
[2024-04-27 17:36:14.880]: DeviceTypeManager::update_connected_devices - Device device_id 1 (USB\VID_054c&PID_09af) failed to open!
[2024-04-27 17:36:14.882]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 17:36:14.883]: PSMoveServiceEx - Successfully Initialized!
[2024-04-27 17:36:14.884]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 17:36:14.886]: PSMoveServiceEx - Maximum thread framerate is: 200
[2024-04-27 17:36:14.887]: PSMoveServiceEx - Calculating average main thread FPS...
[2024-04-27 17:36:14.894]: OrientationFilterExternal::update - \\.\pipe\PSMoveSerivceEx\VirtPSmoveStream_0 pipe created.
[2024-04-27 17:36:14.896]: OrientationFilterExternal::update - \\.\pipe\PSMoveSerivceEx\VirtPSmoveStream_1 pipe created.
[2024-04-27 17:36:16.12]: ClientConnection::start - Starting client connection id 0
[2024-04-27 17:36:16.14]: ClientConnection::send_connection_info - Sending connection id to client 0
[2024-04-27 17:36:16.90]: ServerRequestHandler - Start controller(0) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 17:36:16.106]: ServerRequestHandler - Start controller(1) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 17:36:16.117]: ServerRequestHandler - Start hmd(0) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 17:36:24.890]: PSMoveServiceEx - Main thread running at 195 FPS average. Lowest FPS was 188.

Right now it is still showing the No data, despite the USB cable being connected, PSMoveServiceEx running, and PSVR VDM driver being installed.

TiagoSantos81 commented 5 months ago

I think I figured out the trigger to make it work. I have a Logitech G305 on this computer. Removing the dongle and inserting it again makes PSMoveServiceEX-VDM recognize the USB stream from the PSVR and make everything work as intended -- i.e., extended mode with direct passthrough and gyro readings. Asking in Windows Device Manager for a check on hardware changes after starting the PSMoveService does not enable the PSVR USB feed. Only the wireless dongle unplugging and replugging.

So it is confirmed an interference from driver issue, and might be solved with a call to restart USB interface ports. Might solve other people issues as well.

I resubmit the log for your records.

[2024-04-27 18:41:24.887]: main - Starting PSMoveServiceEx v0.24.4.0 (protocol v0.9-alpha 9.0.0)
[2024-04-27 18:41:24.895]: USBAsyncRequestManager::startup - Requested LibUSBApi
[2024-04-27 18:41:24.897]: USBAsyncRequestManager::startup - Creating LibUSBApi
[2024-04-27 18:41:24.900]: USBAsyncRequestManager::startup - Initialized USB API
[2024-04-27 18:41:24.904]: DeviceManager::startup - Platform Hotplug API is ENABLED
[2024-04-27 18:41:25.129]: bluetooth_get_host_address - Found a bluetooth radio
[2024-04-27 18:41:25.131]: bluetooth_get_host_address - Retrieved radio info
[2024-04-27 18:41:25.139]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 18:41:25.141]: PSMoveServiceEx - Startup successful! Entering main loop...
[2024-04-27 18:41:25.142]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 18:41:25.143]: PSMoveServiceEx - GitHub: https://github.com/Timocop/PSMoveServiceEx
[2024-04-27 18:41:25.145]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 18:41:25.172]: VirtualController::open - Opening VirtualController(VirtualController_0).
[2024-04-27 18:41:25.177]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualController) opened
[2024-04-27 18:41:25.179]: VirtualController::open - Opening VirtualController(VirtualController_1).
[2024-04-27 18:41:25.184]: DeviceTypeManager::update_connected_devices - Device device_id 1 (VirtualController) opened
[2024-04-27 18:41:25.191]: PS3EyeTracker::open - Opening PSEyeVideoCapture(VirtualTracker_0, camera_virt_index=0, camera_index=0)
[2024-04-27 18:41:25.208]: SharedMemory::initialize() - Allocating shared memory: tracker_view_0
[2024-04-27 18:41:25.340]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualTracker) opened
[2024-04-27 18:41:25.348]: VirtualHMD::open - Opening VirtualHMD(VirtualHMD_0).
[2024-04-27 18:41:25.352]: DeviceTypeManager::update_connected_devices - Device device_id 0 (VirtualHMD) opened
[2024-04-27 18:41:25.354]: MorpheusHMD::open - Opening MorpheusHMD(USB\VID_054c&PID_09af).
[2024-04-27 18:41:25.361]: morpeus_open_usb_device - Morpheus USB device not found!
[2024-04-27 18:41:25.362]: MorpheusHMD::open - Failed to open MorpheusHMD(USB\VID_054c&PID_09af)
[2024-04-27 18:41:25.364]: MorpheusHMD::close - Closing MorpheusHMD sensor interface(\\?\hid#vid_054c&pid_09af&mi_04#7&1101ce14&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
[2024-04-27 18:41:25.366]: DeviceTypeManager::update_connected_devices - Device device_id 1 (USB\VID_054c&PID_09af) failed to open!
[2024-04-27 18:41:25.368]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 18:41:25.370]: PSMoveServiceEx - Successfully Initialized!
[2024-04-27 18:41:25.371]: PSMoveServiceEx - ------------------------------------------
[2024-04-27 18:41:25.372]: PSMoveServiceEx - Maximum thread framerate is: 200
[2024-04-27 18:41:25.373]: PSMoveServiceEx - Calculating average main thread FPS...
[2024-04-27 18:41:25.380]: OrientationFilterExternal::update - \\.\pipe\PSMoveSerivceEx\VirtPSmoveStream_0 pipe created.
[2024-04-27 18:41:25.382]: OrientationFilterExternal::update - \\.\pipe\PSMoveSerivceEx\VirtPSmoveStream_1 pipe created.
[2024-04-27 18:41:26.924]: ClientConnection::start - Starting client connection id 0
[2024-04-27 18:41:26.926]: ClientConnection::send_connection_info - Sending connection id to client 0
[2024-04-27 18:41:27.5]: ServerRequestHandler - Start controller(0) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 18:41:27.16]: ServerRequestHandler - Start controller(1) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 18:41:27.26]: ServerRequestHandler - Start hmd(0) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 18:41:35.375]: PSMoveServiceEx - Main thread running at 195 FPS average. Lowest FPS was 191.
[2024-04-27 18:42:12.409]: MorpheusHMD::open - Opening MorpheusHMD(USB\VID_054c&PID_09af).
[2024-04-27 18:42:12.420]: WorkerThread::start - Starting worker thread: MorpheusSensorProcessor
[2024-04-27 18:42:12.424]: MorpheusHMD::open - Turning on MorpheusHMD power.
[2024-04-27 18:42:12.426]: MorpheusHMD::open - Turning on MorpheusHMD VR-Mode.
[2024-04-27 18:42:13.928]: DeviceTypeManager::update_connected_devices - Device device_id 1 (Morpheus) opened
[2024-04-27 18:42:13.932]: updatePoseFilter() - Incoming packet count: 3039 (1509.26ms), trimming: 2039
[2024-04-27 18:42:14.91]: ServerRequestHandler - Start hmd(0) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
[2024-04-27 18:42:14.168]: ServerRequestHandler - Start hmd(1) stream (pos=0,phys=0,raw_sens=0,cal_sens=0,trkr=0,roi=0)
Timocop commented 3 months ago

With the recent update, PSVR detection has been fixed. If you still encounter this problem you can reopen this issue. Thanks for reporting the issue!