Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nowrep/dualsensectl
Linux tool for controlling PS5 DualSense controller
https://github.com/nowrep/dualsensectl
dualsense linux
Last synced: 5 days ago
JSON representation
Linux tool for controlling PS5 DualSense controller
- Host: GitHub
- URL: https://github.com/nowrep/dualsensectl
- Owner: nowrep
- License: gpl-2.0
- Created: 2021-07-08T07:05:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-29T14:44:27.000Z (about 2 months ago)
- Last Synced: 2024-10-30T06:58:20.449Z (19 days ago)
- Topics: dualsense, linux
- Language: C
- Homepage:
- Size: 72.3 KB
- Stars: 214
- Watchers: 12
- Forks: 14
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DualSense Control
Linux tool for controlling Sony PlayStation 5 DualSense controller.
Usage: dualsensectl [options] command [ARGS]
Options:
-l List available devices
-d DEVICE Specify which device to use
-w Wait for shell command to complete (monitor only)
-h --help Show this help message
-v --version Show version
Commands:
power-off Turn off the controller (BT only)
battery Get the controller battery level
info Get the controller firmware info
lightbar STATE Enable (on) or disable (off) lightbar
lightbar RED GREEN BLUE [BRIGHTNESS] Set lightbar color and brightness (0-255)
player-leds NUMBER Set player LEDs (1-5) or disabled (0)
microphone STATE Enable (on) or disable (off) microphone
microphone-led STATE Enable (on) or disable (off) microphone LED
speaker STATE Toggle to 'internal' speaker, 'headphone' or both
volume VOLUME Set audio volume (0-255) of internal speaker and headphone
attenuation RUMBLE TRIGGER Set the attenuation (0-7) of rumble/haptic motors and trigger vibration
trigger TRIGGER off remove all effects
trigger TRIGGER feedback POSITION STRENGTH set a resistance starting at position with a defined strength
trigger TRIGGER weapon START STOP STRENGTH Emulate weapon like gun trigger
trigger TRIGGER bow START STOP STRENGTH SNAPFORCE Emulate weapon like bow
trigger TRIGGER galloping START STOP FIRST_FOOT SECOND_FOOT FREQUENCY Emulate a galloping
trigger TRIGGER machine START STOP STRENGTH_A STRENGTH_B FREQUENCY PERIOD Switch vibration between to strength at a specified period
trigger TRIGGER vibration POSITION AMPLITUDE FREQUENCY Vibrates motor arm around specified position
trigger TRIGGER feedback-raw STRENGTH[10] set a resistance starting using array of strength
trigger TRIGGER vibration-raw AMPLITUDE[10] FREQUENCY Vibrates motor arm at position and strength specified by an array of amplitude
trigger TRIGGER MODE [PARAMS] set the trigger (left, right or both) mode with parameters (up to 9)
monitor [add COMMAND] [remove COMMAND] Run shell command COMMAND on add/remove eventsAUR: [dualsensectl-git](https://aur.archlinux.org/packages/dualsensectl-git/)
### Dependencies
* meson
* libhidapi-hidraw
* libdbus-1
* libudev### Building
meson setup build
cd build
ninja
ninja install### udev rules
Also installed by Steam, so you may already have it configured. If not, create `/etc/udev/rules.d/70-dualsensectl.rules`:
# PS5 DualSense controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", MODE="0660", TAG+="uaccess"# PS5 DualSense controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess"# PS5 DualSense Edge controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0df2", MODE="0660", TAG+="uaccess"# PS5 DualSense Edge controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:0DF2*", MODE="0660", TAG+="uaccess"Use `sudo udevadm trigger` to refresh udev rules without rebooting
### Credit
the following docs:
- https://controllers.fandom.com/wiki/Sony_DualSense/Data_Structures
- https://gist.github.com/Nielk1/6d54cc2c00d2201ccb8c2720ad7538db