Git Product home page Git Product logo

gear-vr-controller-linux's Introduction

gear-vr-controller-linux

This little mapper creates a mouse + web navigator device from Samsung Gear VR Controller. My work was inspired by this project https://github.com/jsyang/gearvr-controller-webbluetooth

How To use?

  1. $ pip3 install python-uinput pygatt gatt more-itertools --user
  2. Change the bluetooth MAC address in the .py file to yours!!!
  3. Pair Controller with (Linux) PC
  4. Connect Controller
  5. As root load uinput: # modprobe uinput
  6. As root enable user access to uinput: # chmod 666 /dev/uinput
  7. Run my program
  8. Enjoy

To avoid steps 4 and 5:

As root do this once, a change YOURGROUP to the group of your user

echo 'KERNEL=="uinput", MODE="0660", GROUP="YOURGROUP", OPTIONS+="static_node=uinput"' > /etc/udev/rules.d/99-uinput.rules

What's the usecase? a.k.a. Why?

I am sitting at my desk while holding my litte son while he sleeps, but I sill need do nerdy stuff like browsing the web. An air mouse is not that convenient, but this controller ... is a perfect match. It could be considered as the one hand equivalent of the Steam Controller. BTW I hope sc-controller will intergate this controller in his project as well.

ISSUES

Consider this project at this point as a Proof Of Concept.

Plans for the future

I had the idea to implement the esp-GearVRController-Mouse-adapter, but I am stuck with it. ESP32 https://www.espressif.com/en/products/hardware/esp32/overview was my best choice. Really good piece of hardware, but handling the 128bit uuid notification event stucks by waiting for a semaphore in the readValue() ...

NodeJS: as the original reverse engineering was done in Javascript and nodejs has mouse emulation libraries, this could work.

Android-GearVRController-Mouse-adapter: https://github.com/rdady/BLE-HID-Peripheral-for-Android An Android phone could pretend to be a BLE mouse / joystick. Advantage is, no special hardware is needed and no special knowledge is needed for its programming, but installing an app. I am working on this one, wait for it :)

gear-vr-controller-linux's People

Contributors

rdady avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gear-vr-controller-linux's Issues

Remote controller for any android device?

i am not sure if you are still working on this project or not but gearvr controller is really well built and almost absolute now with the dead of gearvr. But it would be great to use this as a slide pointer or as a remote for android tv's or tablets. touc surface as a mouse and trigger as a left click , volume and home buttons etc.

Android TV

I want to use Gear VR controller as Android TV remote controller. Can you make it possible?

Incomplete Readme, pip error, some buttons not working

First off, Thank you!!!

The read me leaves out these instructions that are in the script.
Prerequisite:
pip3 install python-uinput pygatt gatt more-itertools cmath --user

I needed to add numpy to the line, and I got this error:

Collecting cmath
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/cmath/

I assumed the mouse would move when i moved the remote, then realized you use the touchpad.

Possibility of creating a Kernel module?

Hi there, I have just stumbled on your project, I am honestly surprised that only about 3 people in the world (as far as I can tell) have tinkered with this controller. I think it would be great if this could be integrated as a kernel module, and used with the likes of retroarch for gaming.

What do you think would be the challenges with this?

Porting to Windows

As this is Python, is there any fundamental barriers that prevent this code from working with Windows? Does windows have a uinput module equivalent that would need to be modified or interfaced with to function?

use driver for SteamVR

hey, is there a possible solution to use the GearVR Controller with your driver as input device for SteamVR?

i found this project: triad_openvr but the controller wont be detected as tracking device within VR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.