Skip to content

TripTimeKing/steamcontroller-gyro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

138 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Standalone Steam Controller Driver

This project is a standalone userland driver for the steam controller to be used where the steam client can't be installed.

Two modes are already working with haptic feedback:

  • xbox360: gamepad emulator
  • desktop: mouse, keyboard mode

The final purpose is to have support for custom mapping created with a stand-alone tool or imported from steam vdf files.

The initial target is GNU/Linux, but I'll welcome any contributor that want to port input generation for other OS (OSX, Windows, *BSD, Android/Linux, ...)

This project is licensed under MIT.

Usage

  1. Exit Steam.
  2. Start:
  • sc-xbox.py start for the simple xbox360 emulator. You may boot up steam again and use the controller on steam games
  1. Stop: sc-xbox.py stop

Other test tools are installed:

  • sc-dump.py : Dump raw message from the controller.
  • sc-gyro-print.py : Testing ground for the project
  • sc-test-cmsg.py : Permit to send control message to the contoller. For example: echo 8f07005e 015e01f4 01000000 | sc-test-cmsg.py will make the controller beep.

TODO / Status

  1. Add support for gyroscopes in the event mapper:
    • Enable gyro condition (always on, or on specific button event)
    • Use gyro as mouse (add yaw, pitch, roll accell to mouse event with a scale factor).
    • Use gyro as an axis (compute yawn, pitch or roll from quaternion, normalize to -32768 32768 and use it as an axe)

Control Messages Capture

  1. sudo modprobe usbmon
  2. lsusb -d 28de:1142 and look at bus and device numbers (B & D)
  3. sudo cat /sys/kernel/debug/usb/usbmon/Bu | grep Co:B:D:0 (B=3 and D=003 for example)

Disable auto feedback on rpad:

  • 81000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Enable Gyro

  • 87153284 03180000 31020008 07000707 00301400 2f010000 00000000 00000000

Disable Gyro

  • 87153284 03180000 31020008 07000707 00300000 2f010000 00000000 00000000

Stop Controller

  • 9f046f66 66210000 ...

Control Messages formats

Haptic feedback format:

  • u8 : 8f
  • u8 : 07
  • u8 : 00 for Right 01 for Left
  • u16 : Amplitude
  • u16 : Period
  • u16 : count
  • pads the end with 00

About

Steam controller Gyro control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.9%
  • C 4.1%