How to modify the Plug n Play Raspberry Pi package to support other devices

Due to logistical issues, I can only offer one flash for the Arduino, and one image for the Raspberry Pi. However, both can be changed relatively easily to support anything that Gimx supports.

To flash the DIY adapter, follow this link. You can unplug the usb adapter from the Rpi and plug it into the PC as normal to flash it.

To change the config xml file, log into the Rpi. NOTE: all instructions assume you are using the latest gimx_dietpi.img image. Write this image to your sd card using Win32DiskImager if you want to follow along exactly, otherwise your steps might vary some.

[Skip this if you know how to log into the Rpi] You can connect the Rpi to a TV and use a mouse and keyboard. The login is the default Dietpi login (user: root, pw: dietpi). You can also connect via ssh from a PC, using a program like PuTTY. In order to get the IP address of the Rpi, you can boot it up with a TV connected, and Dietpi will print out the IP address. If you can’t connect a TV but need to find out the IP address, you can simply connect it to your router with an Ethernet cable, and look up the DHCP lease of the Rpi in your router setup (Ex: on Asus it’s found under System Log\DHCP Leases – the Rpi will have a recognizable name like DietPi or RaspberryPi). Once you have the IP address, ssh into the Rpi using PuTTY, and log in.

Once logged in, list all the config files:

./gimx_list_configs.sh

Then pick the xml you want and run gimx_change_config.sh with your xml file. Ex:

./gimx_change_config.sh LogitechG27_G29.xml

The script will copy the new xml over .gimx/config/active.xml and restart the gimx service to use the new config.

Of course, you can also create new config files in the .gimx/config folder and set them as active with gimx_change_config.sh. You can also edit active.xml directly and restart the service or reboot to take effect.

Debugging issues with Gimx

If Gimx doesn’t appear to be working correctly, you can get the console output that might point to were the problem is:

Once you have access to the rpi command line (see above), stop the gimx service, so it doesn’t try to start gimx over and over in the background, where you cant see what it’s doing.

sudo systemctl stop gimx

Then you can start gimx manually:

/usr/bin/gimx -p /dev/ttyUSB0 -c LogitechG27_G29.xml --nograb

You should see some console output, that should indicate why gimx is not succeeding. Ex:

global option -c with value 'Logitech G27_G29.xml'

grab flag is unset

USB adapter detected, controller type is G29 PS4.

No controller was found on USB buses.

gimx.c:208 main: no adapter detected.
In this case it means the Arduino is working (“USB adapter detected, controller type is G29 PS4.”), but your Dualshock4 is not connected properly to the Rpi – possibly a bad usb cable (“No controller was found on USB buses.”).

41 thoughts on “How to modify the Plug n Play Raspberry Pi package to support other devices”

  1. G25 and g27 are same just with fewer/more buttons accordingly. Does this product work in the g25 as well? I’m no where near knowing how to program or do any of that stuff

    1. Yes, the G25 is supported. Please refer to Gimx documentation gimx.fr

      The usb adapter already supports it. The gimx profile that’s pre-loaded (g27) might or might not work fine. There is technically a separate g25 profile, but you’d have to research for yourself whether the g25 profile will work for you. But pretty much anyone should be able to follow these instructions step by step. There’s no programming involved. If anything is not clear, I should update the instructions.

  2. Hi, I placed an order last night for this, but didn’t get an email confirmation receipt or anything. Can you confirm whether or not the order was received through paypal?

    Thanks.

  3. Hi Steve, I’ve got a couple of questions while I’m going through this process, would I be able to email you; I feel like that may be easier for communication all around, or would you rather me just post questions in the comments section? Thanks!

  4. Steve,
    I received the Raspberry Pi total package today , but I found out, I got a Driving Force GT wheel instead off a G27. So it doesnt work. Is there any solution for this?

    Thanks
    Rico

    1. Yeah, you need to change the config xml for gimx on the rpi to dfgt. The Arduino doesn’t need to be changed. You can follow the instructions on this page.

  5. Hi Steve,

    I managed to get the complete package to work with my Driving Force Pro! However, I was looking into using mouse/keyboard as well with the PS4, but I haven’t been able to reflash the DIY adapter.. I tried it using the arduino builder, but I always get the message ‘no new port found’. I have both the USB from the adapter as well as a USB cable from the arduino board plugged into the PC. Any ideas?

      1. Maybe I select the wrong Arduino device in arduino builder? I use the Arduino Leonardo, maybe I should select another like Arduino Micro or something?

        1. It should be Leonardo. But please follow the instructions word for word. The thing that tripped me up most often was if I didn’t have both ends connected before I opened Arduino Builder. You have to disconnect and reconnect the Arduino exactly in the order directed to be recognized. If you’re still having trouble, seek help on the gimx forum. Many people have re-flashed these adapters, including myself, so it definitely works.

  6. this is what I get:

    global option -c with value `MyGT_G29_W10_config.xml’
    controller #1: option -p with value `COM3′
    now reading arguments for controller #2
    subpos flag is set
    force_updates flag is set
    curses flag is set
    ../common/windows/async.c:344 async_read_timeout: ReadFile failed: timeout expired.
    can’t read packet header
    ../common/windows/async.c:344 async_read_timeout: ReadFile failed: timeout expired.
    can’t read packet header
    ../common/windows/async.c:344 async_read_timeout: ReadFile failed: timeout expired.
    can’t read packet header

    what is the packet header that it cant read? Is the adapter not working properly?How do I know i have the wires on correctly?

  7. hello,
    I tried to change the configuration to LogitechDrivingForceGT.xml in RPi3 following the instructions above but it doesn´t work. I tried with my computer and it woks perfectly. Any idea or how can I check the file was changed?

  8. Ciao Steve hai fatto un buon lavoro GRAZIE a te ho fatto funzionare il mio G27 PS4 ho solo un problema il G27 perde il force feedback nelle curve veloce con project cars di cosa puo dipendere, io uso raspberry pi 3 B CIAO e Grazie

    1. Sorry to hear that. That’s weird… I wonder if it has to do with power supply issues? Try powering the rpi with a phone charger or similar. Alternatively, you might try burning a fresh image on the sd card (see my post with dietpi image).

      1. Ciao steve Grazie :purtroppo ho provato a mettere un 1 alimentatore su USB EXT Ma purtoppo fa lo stesso il led power rosso rpi lampeggia ogni 5 secondi ti dico unaltra cosa mi sta capitando che quando vado fuori pista lo sterzo non rimane piu al centro e devo riaviare RPI ,scusami se mi dici cosa posso cambiare valore in config.txt per migliorare ti ringrazio, io uso dietpi. image.zip (plug n play) Grazie CIAO apresto

  9. How can I use my own config files? I can’t find a directory on the sd card where the config files are saved.

    Thanks in advance,

  10. I have a problem when I try to play with wrc7.
    The steering wheel is not recognized while for all the other driving games I have no problem. I tried both with rpi3 and with pc but i have the same runtime. can you help me?

    In the live area, the steering wheel works perfectly while not playing the game after the steering wheel no longer responds.

    1. Sounds like a compatibility issue with the game. Upgrading gimx might help. A web search or forum search might also give you clues.

  11. Ciao,io mentre gioco perde la connessione e non funziona più il logitech g27.cosa potrebbe essere?grazie Manuel

  12. Do you recommend updating the DietPi image? I notice when I turn-on my RPi is says that an update is available?

    1. I don’t think there’s any point in updating, but feel free to try. If the wheel stops working, just re-flash the sd card with my image,

  13. Hi, I’m trying to connect Logitech G920 to PS4. All works fine while connecting via PC, unfortunatelly it’s not working with RPi.
    I have RPi3 configured with your instruction, also manualy added profile LogitechG920_G29.xml using ‘grep’. My debug shows that all is fine, but still wheel is not working.

    controller #1: option -p with value `/dev/ttyUSB0′
    now reading arguments for controller #2
    global option -c with value `LogitechG920_G29.xml’
    grab flag is unset
    USB adapter detected, controller type is: G29 PS4.
    using default refresh period: 5.00ms

  14. Hi Steve, this is exactly what I was looking for in convenience as a disabled gamer so first of all thank you!
    I would like to ask though, as someone new to pi, how exactly would someone create a new profile and upload it on to the pi so it becomes selectable?

    1. If you do

      type gimx_list_configs.sh

      It should tell you what folder the configs are in. I think you should be able to plug the sd card into your pc and browse the folder structure and put your config file in there. I don’t have the setup in front of me, but I think that should get you started. If the sd card is not readable on the pc, you can plug a usb drive into the pi and copy your file that way. Or use curl to download your file from google drive or similar.

      1. Thats great thank you, I managed to find the directory and overwrite the active.xml with my own profile.
        I am however still having issues. It seems no matter what I try I get the packet header issue where no adapter is detected. I have tried 2 different USB adapters, a leonardo and a micro both to no avail. Swapped out RX and TX in all set ups and am at a loss.

  15. Do I need to have the OS already installed on the Raspberry Pi or does the new SD Card image take the place of that? Or is it both? Can you explain it to me please?

  16. Muy buenas, no se como configurar el driving force gt en la imagen de dietpi.
    Me gustaria que me dijeran como poder añadir ese volante a la lista para poder seleccionarlo despues.
    Gracias.
    Copio y pego lo que no se como se hace:
    Por supuesto, también puede crear nuevos archivos de configuración en la carpeta .gimx/config y configurarlos como activos con gimx_change_config.sh. También puede editar active.xml directamente y reiniciar el servicio o reiniciar para que surta efecto.

Leave a Reply

Your email address will not be published. Required fields are marked *