sedilson
Posts: 4
Joined: Sat Jan 16, 2016 4:21 pm

(Solved) Sixaxis DS3 Force Feedback tootls

Sat Jan 16, 2016 4:45 pm

Hi,

Hope I´m posting this in the right place.

Well, i´m using Raspberry Pi 2 along with Sixaxis game-pad. As far as I have found in my research, sixaxis should work out of the box when connected as USB and that Force Feedback (or vibration or rumble) is supported by Linux kernel since 3.16.

Everything works beside Vibration. Tried Wheezy and Jessie builds.

Using the tools packed in "Joystick" package, ffcfstress and fftest:

Code: Select all

pi@raspberrypi ~ $ ffcfstress -u 15
ERROR: device (or driver) has no force feedback support [ffcfstress.c:166]

pi@raspberrypi ~ $ fftest
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event0 opened
Axes query:
Effects:
Number of simultaneous effects: 0
Upload effects[0]: Function not implemented
Upload effects[1]: Function not implemented
Upload effects[2]: Function not implemented
Upload effects[3]: Function not implemented
Upload effects[4]: Function not implemented
Upload effects[5]: Function not implemented
Enter effect number, -1 to exit
So my question is that the tools are deprecated/outdated or do I need to enable/configure something else?
Any tips?

Code: Select all

pi@raspberrypi ~ $ cat /proc/bus/input/devices
I: Bus=0003 Vendor=054c Product=0268 Version=0111
N: Name="Sony PLAYSTATION(R)3 Controller"
P: Phys=usb-3f980000.usb-1.3/input0
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:054C:0268.0004/input/input3
U: Uniq=
H: Handlers=js0 event0
B: PROP=0
B: EV=1b
B: KEY=7 0 0 0 0 0 0 0 0 0 0 0 0 ffff 0 0 0 0 0 0 0 0 0
B: ABS=7fffff00 27
B: MSC=10

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
Last edited by sedilson on Fri Jan 22, 2016 2:31 pm, edited 2 times in total.

sedilson
Posts: 4
Joined: Sat Jan 16, 2016 4:21 pm

Re: Sixaxis DS3 Force Feedback tootls

Thu Jan 21, 2016 1:22 pm

Have been comparing Ubuntu vs Raspbian,since on Ubuntu it works:

EVTest on Ubuntu:

Code: Select all

$ cat /proc/bus/input/devices 

I: Bus=0003 Vendor=054c Product=0268 Version=0111
N: Name="Sony PLAYSTATION(R)3 Controller"
P: Phys=usb-0000:00:1d.0-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/0003:054C:0268.0001/input/input11
U: Uniq=
H: Handlers=event10 js0 
B: PROP=0
B: EV=20001b
B: KEY=7 0 0 0 0 0 0 ffff00000000 0 0 0 0
B: ABS=7fffff0000000027
B: MSC=10
B: FF=107030000 0

$ evtest /dev/input/event10
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x54c product 0x268 version 0x111
Input device name: "Sony PLAYSTATION(R)3 Controller"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 288 (BTN_TRIGGER)
    Event code 289 (BTN_THUMB)
    Event code 290 (BTN_THUMB2)
    Event code 291 (BTN_TOP)
    Event code 292 (BTN_TOP2)
    Event code 293 (BTN_PINKIE)
    Event code 294 (BTN_BASE)
    Event code 295 (BTN_BASE2)
    Event code 296 (BTN_BASE3)
    Event code 297 (BTN_BASE4)
    Event code 298 (BTN_BASE5)
    Event code 299 (BTN_BASE6)
    Event code 300 (?)
    Event code 301 (?)
    Event code 302 (?)
    Event code 303 (BTN_DEAD)
    Event code 704 (BTN_TRIGGER_HAPPY1)
    Event code 705 (BTN_TRIGGER_HAPPY2)
    Event code 706 (BTN_TRIGGER_HAPPY3)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    126
      Min        0
      Max      255
      Flat      15
    Event code 1 (ABS_Y)
      Value    131
      Min        0
      Max      255
      Flat      15
    Event code 2 (ABS_Z)
      Value    126
      Min        0
      Max      255
      Flat      15
    Event code 5 (ABS_RZ)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 40 (ABS_MISC)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 41 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 42 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 43 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 44 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 45 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 46 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 49 (ABS_MT_TOUCH_MINOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 50 (ABS_MT_WIDTH_MAJOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 51 (ABS_MT_WIDTH_MINOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 52 (ABS_MT_ORIENTATION)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 55 (ABS_MT_TOOL_TYPE)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 56 (ABS_MT_BLOB_ID)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 59 (ABS_MT_DISTANCE)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 60 (ABS_MT_TOOL_X)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 61 (ABS_MT_TOOL_Y)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 62 (?)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
  Event type 21 (EV_FF)
    Event code 80 (FF_RUMBLE)
    Event code 81 (FF_PERIODIC)
    Event code 88 (FF_SQUARE)
    Event code 89 (FF_TRIANGLE)
    Event code 90 (FF_SINE)
    Event code 96 (FF_GAIN)
Properties:
Testing ... (interrupt to exit)
Event: time 1453380381.972462, type 3 (EV_ABS), code 59 (ABS_MT_DISTANCE), value 501

uname -r
3.19.0-25-generic
$ uname -a
Linux edilson-Latitude-D630 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
EVTest on Raspbian:

Code: Select all

pi@raspberrypi ~ $ sudo evtest /dev/input/event0 EV_LED 00
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x54c product 0x268 version 0x111
Input device name: "Sony PLAYSTATION(R)3 Controller"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 288 (BTN_TRIGGER)
    Event code 289 (BTN_THUMB)
    Event code 290 (BTN_THUMB2)
    Event code 291 (BTN_TOP)
    Event code 292 (BTN_TOP2)
    Event code 293 (BTN_PINKIE)
    Event code 294 (BTN_BASE)
    Event code 295 (BTN_BASE2)
    Event code 296 (BTN_BASE3)
    Event code 297 (BTN_BASE4)
    Event code 298 (BTN_BASE5)
    Event code 299 (BTN_BASE6)
    Event code 300 (?)
    Event code 301 (?)
    Event code 302 (?)
    Event code 303 (BTN_DEAD)
    Event code 704 (BTN_TRIGGER_HAPPY1)
    Event code 705 (BTN_TRIGGER_HAPPY2)
    Event code 706 (BTN_TRIGGER_HAPPY3)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    126
      Min        0
      Max      255
      Flat      15
    Event code 1 (ABS_Y)
      Value    131
      Min        0
      Max      255
      Flat      15
    Event code 2 (ABS_Z)
      Value    126
      Min        0
      Max      255
      Flat      15
    Event code 5 (ABS_RZ)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 40 (ABS_MISC)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 41 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 42 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 43 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 44 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 45 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 46 (?)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 49 (ABS_MT_TOUCH_MINOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 50 (ABS_MT_WIDTH_MAJOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 51 (ABS_MT_WIDTH_MINOR)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 52 (ABS_MT_ORIENTATION)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 55 (ABS_MT_TOOL_TYPE)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 56 (ABS_MT_BLOB_ID)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max      255
      Flat      15
    Event code 59 (?)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 60 (?)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 61 (?)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
    Event code 62 (?)
      Value      0
      Min        0
      Max     1023
      Fuzz       3
      Flat      63
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1453380134.295186, type 3 (EV_ABS), code 59 (?), value 501
Event: time 1453380134.295186, -------------- SYN_REPORT ------------
Ubuntu has the bunch of events of Raspbian plus the Event 21 EV_FF

Event type 21 (EV_FF)
Event code 80 (FF_RUMBLE)
Event code 81 (FF_PERIODIC)
Event code 88 (FF_SQUARE)
Event code 89 (FF_TRIANGLE)
Event code 90 (FF_SINE)
Event code 96 (FF_GAIN)

sedilson
Posts: 4
Joined: Sat Jan 16, 2016 4:21 pm

Re: Sixaxis DS3 Force Feedback tootls

Fri Jan 22, 2016 2:27 pm

After extensive googling, I could find a way to check and configure kernel to have FFB enabled for SixaxiS.
During my research, I found xboxdrv and someone mentioned that FFB is disabled on kernel due to compatibility to some games. But xboxdrv has a way to enable the FFB support for Xbox gamepad for what I think that is called "User Space". So I'm pretty sure that it's also possible to do it for SixaxiS from "User Sapce" but since I could not find how anywhere, I had to configure and compile kernel to enable FFB for SixaxiS.

To do so, I followed the steps and tools described here:

https://learn.adafruit.com/raspberry-pi ... c/overview

Once you reach the kernel configuration screen, go to "-->Driver --> HID --> special HID --> Sony (something)" and then enable FFB, then follow the rest of the steps.

This is solved.

sedilson
Posts: 4
Joined: Sat Jan 16, 2016 4:21 pm

Re: (Solved) Sixaxis DS3 Force Feedback tootls

Fri Jan 22, 2016 2:51 pm

And also, thanks to Adafruit guys for the excellent guide and Kernel-o-Matic tool .

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 23 guests