Code Monkey home page Code Monkey logo

Comments (5)

mholgatem avatar mholgatem commented on July 22, 2024

The vendor and product numbers get set in config/device.py
Vendor = 9999
product = 8888
But better than either of those, you can use any of the following to find the keyboard/joystick that you want (much more accurate)

ATTRS{name}=="GPIOnext Keyboard"
ATTRS{name}=="GPIOnext Joypad1"
ATTRS{name}=="GPIOnext Joypad2"
ATTRS{name}=="GPIOnext Joypad3"
ATTRS{name}=="GPIOnext Joypad4"

So, the problem that you are going to have is that you can no longer rename kernel device nodes (the tutorial that you are following is pretty old). You can test this for yourself by adding this line to /etc/udev/rules.d/73-persistent-joystick.rules

KERNEL=="js?", ATTRS{name}=="GPIOnext Joypad 1", NAME="input/js5"

then run the following commands (these are used to test udev rules against specific devices, so you'll want to hang onto them as you test things out)

sudo udevadm control --reload-rules
udevadm test $(udevadm info -q path -n input/js0) 2>&1

you will see in the output

NAME="input/js5" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/73-persistent-joystick.rules:1

You can however create symlinks which will put them in '/dev'. I'm not really sure if it will help you, but I think that it is probably your best shot. Something like this:

KERNEL=="js?", ATTRS{name}=="GPIOnext Joypad 1", SYMLINK+="js5"

from gpionext.

fedekrum avatar fedekrum commented on July 22, 2024

Thanks.

Sorry if I am not that good at this. Suppose that I want my only GPIOnext joystick to be always /dev/input/js0.... in kind of tutorial way, which would be the steps to make this happen even after a reboot ?

I have done what I understood from your post with no results.

Thanks again for your work

from gpionext.

mholgatem avatar mholgatem commented on July 22, 2024

unfortunately you can't. The only thing that you may be able to do is find a script that can disable each of the usb ports, then run gpionext, then re-enable each usb port.

from gpionext.

fedekrum avatar fedekrum commented on July 22, 2024

Thanks again.
For now, I will just plug the USB stuff after Retropie starts.

Best regards

from gpionext.

mholgatem avatar mholgatem commented on July 22, 2024

yeah, sorry I don't have a better answer. One of my biggest wishes is for linux to make it easier to assign joystick numbers.

from gpionext.

Related Issues (20)

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.