thaytan / OpenHMD

Free and Open Source API and drivers for immersive technology.
Boost Software License 1.0
142 stars 11 forks source link

OpenHMD started failing connecting to Rift using Ubuntu. #47

Closed Fredrum closed 2 years ago

Fredrum commented 2 years ago

Hello! I'm using OpenHMD to get rotational HMD tracking on a RPi4b+Ubuntu 22.04 and it worked fine a bit earlier but now 'm getting errors that it can't connect to device so I'm curious as to why that might be.

I have added the udev rules.

The Rift CV1 seems to be found and reported correctly,

OpenHMD version: 0.3.0
num devices: 7
device 0
  vendor:  Oculus VR, Inc.
  product: Rift (CV1)
  path:    1-1.1.1:1.0
  class:   HMD
  flags:   04
    null device:         no
    rotational tracking: yes
    positional tracking: no
    left controller:     no
    right controller:    no

But I'm then getting the error:

[EE] Could not open /dev/bus/usb/001/000.
Check your permissions: https://github.com/OpenHMD/OpenHMD/wiki/Udev-rules-list
[EE] Could not open device with index: 0, check device permissions?

I tried re-plugging the Rifts hdmi and usb.
I tried running the program with 'sudo'.

I saw in your howto that you say sometimes it's just not working and I have to re-boot? Any ideas what might be causing this? Could it be a re-ordering of devices post some init in the ohmd code?

EDIT: I am using a tool/program to send signals to the Rift to keep the screen awake maybe it has something to do with that. Maybe it's somehow blocking it for ohmd I'll have to take a closer look. EDIT2: I think that's it. If I close my program and quickly launch the main program that's using ohmd it works. The main program also takes over and keeps the Rift alive.

Cheers!