Skip to main content
New Participant
April 27, 2013

USB drivers?

So,

I got a device.

Played with it a little and my next step is to make it do something.

I have no intention of using windows (OK maybe XP at a pinch) or any apple devices. I've put a fair bit of effort into supporting both over the years and lets say I've finally learnt my lesson.

So, pretty much all of your samples are useless :)

Rendering wise, I don't see any problems.

Where I see issues is in reading the head tracking information from the USB device.

Is anyone looking at sorting out USB support for Linux or Android?

I was hopping it might just show up as a HID joystick controller but since it didn't when I plugged it in, I'm guessing its going to need some hacking around to even get to that point. Maybe just a case of adding its ID to the appropriate kernel module? I'm not sure exactly how these things works but that sounds plausible.

Reading thorough the forums I'm not seeing any questions about this yet so I'm asking here and will hopefully follow through with a solution.

    6 replies

    kojack
    Honored Contributor
    April 27, 2013
    Linux rift library:
    viewtopic.php?f=20&t=667
    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3
    Inspiring
    April 29, 2013
    We may actually be officially supporting Linux in the future, but for now you can look at the work people in the community are doing.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    xixAuthor
    New Participant
    May 3, 2013
    Thanx for the links but I'm going to approach this from a slightly simpler angle than porting the SDK so I can slide it into my engine.

    For anyone interested.

    hidapi seems a reasonable (and very simple, single.c file per platform) cross platform library http://www.signal11.us/oss/hidapi/

    With that I'm pulling in device packets sensibly across linux or window or mac.

    The only problem is standard linux permissions, need to muck about in order for normal code to be able to access the device, or you know just run as root. Same problem as hitting keyboard or mice at this level but its something you need to remember.

    OVR_SensorImpl.cpp from the sdk contains the packet decode logic so with a bit of bit twiddling I now have a very simple cross platform interfacer to the sensors in the headset.

    I'll put up some code when I get some of the drawing side working, I'm liking the idea of a small computer device plugged into the hardware so plan on setting something up with either a raspberry pi or gamestick depending on how things go.
    Up and Coming
    May 3, 2013
    "xix" wrote:
    ... The only problem is standard linux permissions, need to muck about in order for normal code to be able to access the device, or you know just run as root. Same problem as hitting keyboard or mice at this level but its something you need to remember.

    OVR_SensorImpl.cpp from the sdk contains the packet decode logic so with a bit of bit twiddling I now have a very simple cross platform interfacer to the sensors in the headset.

    I'll put up some code when I get some of the drawing side working, I'm liking the idea of a small computer device plugged into the hardware so plan on setting something up with either a raspberry pi or gamestick depending on how things go.

    With the Rift USB plugged in, you can change permissions on the /dev/hid* devices so that later you can access them from userland apps. I did that on both an x86 linux VM, and in my RasPi, and I can read my Rift tracker data in both environments (using the linux/C library mentioned above), without needing to run as root.

    And there is an Android port now too, in another thread. But more is always better -- they each provide new or different things to use...
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    New Participant
    July 2, 2013
    Hey Guys well i also gives my opinion for Linux.Thanks!!
    S-Type Beams
    Up and Coming
    July 2, 2013
    A (very simple) Android lib exists that lets you play with headtracking on compatible devices:
    viewtopic.php?f=20&t=652