Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • sebastien
    Participant
    Post count: 10

    Hello,

    I bought a wii controller controlling pro unofficial.

    I use retropie 2.3.

    And I block at the launch of emulationstation, “No gamepads detected” …

    The keys are well marked on evtest and i get to set well retroarch with retroarch-joyconfig.

    Thank you for your help

    sebastien
    Participant
    Post count: 10

    The result of evtest:

    pi@RPI-CONSOLE ~ $ sudo evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0: HID 04f3:0103
    /dev/input/event1: HID 04f3:0103
    /dev/input/event2: Nintendo Wii Remote Accelerometer
    /dev/input/event3: Nintendo Wii Remote IR
    /dev/input/event4: Nintendo Wii Remote
    /dev/input/event5: Nintendo Wii Remote Classic Controller
    /dev/input/event6: Nintendo Wii Remote Motion Plus
    Select the device event number [0-6]:

    /dev/input/event5 should be linked to /dev/input/js0 ?

    pi@RPI-CONSOLE ~ $ ls /dev/input/
    by-id event0 event2 event4 event6 js1
    by-path event1 event3 event5 js0 mice

    Thanks

    sebastien
    Participant
    Post count: 10

    pi@RPI-CONSOLE ~ $ sudo jstest /dev/input/js0
    Driver version is 2.1.0.
    Joystick (Nintendo Wii Remote) has 0 axes ()
    and 7 buttons (BtnX, BtnY, ?, (null), (null), Btn1, Btn2).
    Testing … (interrupt to exit)
    Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off

    pi@RPI-CONSOLE ~ $ sudo jstest /dev/input/js1
    Driver version is 2.1.0.
    Joystick (Nintendo Wii Remote Classic Controller) has 6 axes (Hat1X, Hat1Y, Hat2X, Hat2Y, Hat3X, Hat3Y)
    and 11 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnStart, BtnMode, ?, (null), (null)).
    Testing … (interrupt to exit)
    Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:ofAxes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off

    My /etc/udev/rules.d/99-input.rules :

    SUBSYSTEM==”input”, ATTRS{name}==”Nintendo Wii Remote Classic Controller”, MODE=”0666″, ENV{ID_INPUT_JOYSTICK}=”1″

    How to “Nintendo Wii Remote Controller Classic” on js0?

    Thanks

    Floob
    Member
    Post count: 1629

    Does it configure in RetroArch ok?
    If so, you could manually write the keymappings into the es_input.cfg file?

    Anonymous
    Inactive
    Post count: 6

    [quote=82043]
    My /etc/udev/rules.d/99-input.rules :
    SUBSYSTEM==”input”, ATTRS{name}==”Nintendo Wii Remote Classic Controller”, MODE=”0666″, ENV{ID_INPUT_JOYSTICK}=”1″
    How to “Nintendo Wii Remote Controller Classic” on js0?
    Thanks
    [/quote]
    Last time I got my hand on this, the file was in /etc/udev.rules.d/ (like /etc/udev.rules.d/98-wiiclassic.conf), not /etc/udev/rules.d/, are you sure about this path ?
    You can check if the property is correctly applied with sudo udevadm info --query=all --name=input/eventXX (https://hg.libsdl.org/SDL/file/704a0bfecf75/README-linux.txt#l57)
    I think the property is not present, it looks like the problem I had, because everything else is working. You can also try with this simple program : https://hg.libsdl.org/SDL/file/b9663c77f5c9/src/joystick/linux/SDL_sysjoystick.c.

    I don’t know if the used version of SDL2 has changed, but as said in my comment (https://github.com/retropie/RetroPie-Setup/issues/256#issuecomment-52950792), the version 2.0.1 doesn’t rely on this property (even though it says so). In this case you need a “corrected” hid_wiimote.so that reports the right axes so SDL2 detects it.

    sebastien
    Participant
    Post count: 10

    Thank you for your reply.

    /etc/udev.rules.d/ The folder does not exist in my version.

    I have 2 file /etc/udev/rules.d/:
    40-scratch.rules and 99-input.rules

    I tried to edit these files in all directions but nothing…

    Here is the beginning of udevadm:

    pi@RPI-CONSOLE ~ $ sudo udevadm info -a –name=input/event5

    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.

    looking at device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input55/event5’:
    KERNEL==”event5″
    SUBSYSTEM==”input”
    DRIVER==””

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input55’:
    KERNELS==”input55″
    SUBSYSTEMS==”input”
    DRIVERS==””
    ATTRS{name}==”Nintendo Wii Remote Classic Controller”
    ATTRS{phys}==””
    ATTRS{uniq}==””
    ATTRS{properties}==”0″

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D’:
    KERNELS==”0005:057E:0306.000D”
    SUBSYSTEMS==”hid”
    DRIVERS==”wiimote”
    ATTRS{devtype}==”gen10″
    ATTRS{extension}==”classic”

    ……………………………………….
    js0 :

    pi@RPI-CONSOLE ~ $ sudo udevadm info -a –name=input/js0

    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.

    looking at device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input52/js0’:
    KERNEL==”js0″
    SUBSYSTEM==”input”
    DRIVER==””

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input52’:
    KERNELS==”input52″
    SUBSYSTEMS==”input”
    DRIVERS==””
    ATTRS{name}==”Nintendo Wii Remote”
    ATTRS{phys}==””
    ATTRS{uniq}==””
    ATTRS{properties}==”0″

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D’:
    KERNELS==”0005:057E:0306.000D”
    SUBSYSTEMS==”hid”
    DRIVERS==”wiimote”
    ATTRS{devtype}==”gen10″
    ATTRS{extension}==”classic”

    ………………………………………………
    js1 :

    pi@RPI-CONSOLE ~ $ sudo udevadm info -a –name=input/js1

    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.

    looking at device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input55/js1’:
    KERNEL==”js1″
    SUBSYSTEM==”input”
    DRIVER==””

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D/input/input55’:
    KERNELS==”input55″
    SUBSYSTEMS==”input”
    DRIVERS==””
    ATTRS{name}==”Nintendo Wii Remote Classic Controller”
    ATTRS{phys}==””
    ATTRS{uniq}==””
    ATTRS{properties}==”0″

    looking at parent device ‘/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:42/0005:057E:0306.000D’:
    KERNELS==”0005:057E:0306.000D”
    SUBSYSTEMS==”hid”
    DRIVERS==”wiimote”
    ATTRS{devtype}==”gen10″
    ATTRS{extension}==”classic”

    Anonymous
    Inactive
    Post count: 6

    Hum, right, I misspelled the path, it is /etc/udev/rules.d/ (and I named the file 99-joystick.rules), but anyway your rule is not being applied (or the command you used to check is not showing this property, are you sure about the “-a” option vs “–query=all” ?) ; you should have an output like this :

    
    pi@raspberrypi ~ $ sudo udevadm info --query=all --name=input/event6
    P: /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:71/0005:057E:0306.0005/input/input4/event6
    N: input/event6
    E: BACKSPACE=guess
    E: DEVNAME=/dev/input/event6
    E: DEVPATH=/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:71/0005:057E:0306.0005/input/input4/event6
    E: ID_INPUT=1
    E: ID_INPUT_JOYSTICK=1
    E: ID_INPUT_KEY=1
    E: MAJOR=13
    E: MINOR=70
    E: SUBSYSTEM=input
    E: UDEV_LOG=3
    E: USEC_INITIALIZED=407332809
    E: XKBLAYOUT=fr
    E: XKBMODEL=pc105
    

    If you still don’t have it, maybe some rights problems on the file ? Have you reloaded udev/restarted the Pi after touching the udev rules ?
    But like I said, if SDL2.0.1 is used, this will not even solve your problem, you’ll need a modified hid-wiimote module (I have a precompiled one assuming it’s still the same kernel version).

    sebastien
    Participant
    Post count: 10

    I created a new file /etc/udev/rules.d/99-joystick.rules:

    SUBSYSTEM == “input”, ATTRS {name} == “Nintendo Wii Remote Controller Classic”, MODE = “0666”, ENV {ID_INPUT_JOYSTICK} = “1”

    But I have always the same thing. I have to restart the udev service and even the RPI.

    The udevadm command gives me this:

    pi@RPI-CONSOLE ~ $ sudo udevadm info –query=all –name=input/event5
    P: /devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:43/0005:057E:0306.0003/input/input5/event5
    N: input/event5
    E: BACKSPACE=guess
    E: DEVNAME=/dev/input/event5
    E: DEVPATH=/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:43/0005:057E:0306.0003/input/input5/event5
    E: ID_INPUT=1
    E: ID_INPUT_JOYSTICK=1
    E: ID_INPUT_KEY=1
    E: MAJOR=13
    E: MINOR=69
    E: SUBSYSTEM=input
    E: UDEV_LOG=3
    E: USEC_INITIALIZED=16369308809
    E: XKBLAYOUT=fr
    E: XKBMODEL=pc105

    pi@RPI-CONSOLE ~ $ sudo udevadm info –query=all –name=input/js0
    P: /devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:43/0005:057E:0306.0003/input/input2/js0
    N: input/js0
    E: DEVNAME=/dev/input/js0
    E: DEVPATH=/devices/platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5:1.0/bluetooth/hci0/hci0:43/0005:057E:0306.0003/input/input2/js0
    E: ID_INPUT=1
    E: ID_INPUT_KEY=1
    E: MAJOR=13
    E: MINOR=0
    E: SUBSYSTEM=input
    E: UDEV_LOG=3
    E: USEC_INITIALIZED=16368977015

    I also installed your modified version:
    https://github.com/Alex131089/raspberrypi-linux-3.6

    Thank you

    Anonymous
    Inactive
    Post count: 6

    The rule is applied, so I guess it’s still SDL 2.0.1 being used.
    The modified version you linked was for the old kernel actually (I hope you didn’t lost your time compiling this ^^).
    You can use this module http://alex131089.info/rpi/ if it’s still the same kernel version, or use this modified source to compile the module against your kernel version : https://gist.github.com/Alex131089/01177d7bc593948cac9f/c1839f6f7fab66e78814afeefa4f65259d06e8a4#file-hid-wiimote-modules-c-L1003
    Another solution would be to compile EmulationStation against SDL 2.0.2 at least.

    Edit: btw,

    How to “Nintendo Wii Remote Controller Classic” on js0?

    It doesn’t necessarily have to be on js0 ;)

    sebastien
    Participant
    Post count: 10

    My kernel is the 3.12.29+ release.

    How do we compile your file hid-wiimote-modules.c?

    With the gcc command?

    I try this :
    sudo gcc -o hid-wiimote-modules.o hid-wiimote-modules.c
    hid-wiimote-modules.c:36:26: fatal error: linux/device.h: Aucun fichier ou dossier de ce type
    compilation terminated.

    Thank you

    Anonymous
    Inactive
    Post count: 6
    sebastien
    Participant
    Post count: 10

    Cool my controllers work!

    So i rewrite a clean image on the SD card to install your precompiled module hid-wiimote for 3.12.22+ kernel.

    One last question. This is about the LED on the controller. I own 2 controllers of this type and only the LED n°1 is supported.

    I used your script to associate my controllers:

    https://github.com/Alex131089/Super-RPi/tree/master/etc/profile.d

    Thank you

    Anonymous
    Inactive
    Post count: 6

    Do you also have https://github.com/Alex131089/Super-RPi/blob/master/home/pi/WiimoteConnect.sh (as you can see in the link you give) ?
    Because this script is in charge of settings the leds ; actually it can works without setting the led number, but you have to know which player is each controller.
    If this script don’t works, try to debug it by running it yourself in a terminal with enought privileges then ;)
    The logic to get the led number is a bit tricky though (have to find the right number using informations from /sys).

    sebastien
    Participant
    Post count: 10

    Yes I am also WiimoteConnect script in /home/pi

    The first controller connected become the first player.

    Where we put in your script the second controller must be LED n°2?

    In my case I have:
    1st Controller: /dev/input/event3
    2nd Controller: /dev/input/event8

    Thank you

    Anonymous
    Inactive
    Post count: 6

    As seen in the source code :

    count = 0
    # For each input (must be in numerical order of js*)
    # If Nintendo remote, count it
    count=$((count+1))
    # If mine, set position & quit
    set all leds to 0
    set the led $count to enabled

    What else do you need ?

    sebastien
    Participant
    Post count: 10

    This script works for you ?

    LEDs light up well in order?

    I just first to the LED lights on every controllers .

    Thank you

    sebastien
    Participant
    Post count: 10

    Nothing to do with the LED.

    I noticed that the directional sticks does not work.

    But they are well recognized with the retroarch joyconfig command.

    retroarch.cfg :

    input_player1_joypad_index = “0”
    input_player1_b_btn = “1”
    input_player1_y_btn = “3”
    input_player1_select_btn = “10”
    input_player1_start_btn = “9”
    input_player1_up_btn = “h0up”
    input_player1_down_btn = “h0down”
    input_player1_left_btn = “h0left”
    input_player1_right_btn = “h0right”
    input_player1_a_btn = “0”
    input_player1_x_btn = “2”
    input_player1_l_btn = “4”
    input_player1_r_btn = “5”
    input_player1_l2_btn = “6”
    input_player1_r2_btn = “7”
    input_player1_l3_btn = “10”
    input_player1_r3_btn = “10”
    input_player1_l_x_plus_axis = “+0”
    input_player1_l_x_minus_axis = “-0”
    input_player1_l_y_plus_axis = “-1”
    input_player1_l_y_minus_axis = “+1”
    input_player1_r_x_plus_axis = “+2”
    input_player1_r_x_minus_axis = “-2”
    input_player1_r_y_plus_axis = “-3”
    input_player1_r_y_minus_axis = “+3”

    Thank you

Viewing 17 posts - 1 through 17 (of 17 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.